I am trying to reduce ringing around lettering in an FFT processing with a mask jinc mask.
It seems that much of the ringing is due to strong components in the middle of the frequency range caused by image border discontinuities.
I would like smooth this transition by rolling the image 50% and blurring say 5% strip now at the centre of the image (first X , then Y).
This would degrade that part of the image but it gets pretty much blown out by ringing anyway if there are significant differences between LH and RH borders as is often the case.
I have not been able to see how to blur just the middle strip.
Suggestions , please.
roll and blur
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: roll and blur
try setting -region before the blur
http://www.imagemagick.org/script/comma ... php#region
You can also create a mask the size of the image with white where you want the blur and black every where else. then blur a copy of the image. Then use the mask to composite the unblurred and blurred images together.
see
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/compose/#mask
http://www.imagemagick.org/script/comma ... php#region
You can also create a mask the size of the image with white where you want the blur and black every where else. then blur a copy of the image. Then use the mask to composite the unblurred and blurred images together.
see
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/compose/#mask
Re: roll and blur
Thanks I have managed to blur a +/-5% strip that I rolled to centre and then back afterwards, repeated in x and y. This drastically reduces ringing due to boundary discontinuities, however, it's very clumsy.
what would be nearer to what is needed is a progressive blur, like a linear gaussian blur with a sigma that drops off with the distance from the centre point.
I could approximate in piecewise strips but it's getting messy.
The idea is to soften the boundary discontinuity before applying any DFT that wraps the image.
what would be nearer to what is needed is a progressive blur, like a linear gaussian blur with a sigma that drops off with the distance from the centre point.
I could approximate in piecewise strips but it's getting messy.
The idea is to soften the boundary discontinuity before applying any DFT that wraps the image.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: roll and blur
How did you manage to blur the center area? -blur will be a gaussian roll off function. Do I misunderstand your question? Do you want a variable blur? If so, see
http://www.imagemagick.org/Usage/blur/
http://www.imagemagick.org/Usage/mapping/#blur
http://www.fmwconcepts.com/imagemagick/ ... /index.php
http://www.fmwconcepts.com/imagemagick/ ... /index.php
I am not sure I understand what you are doing? Is this for FFT deconvolution? If so, to what are you applying the blur and in which domain (spatial or frequency)?
http://www.imagemagick.org/Usage/blur/
http://www.imagemagick.org/Usage/mapping/#blur
http://www.fmwconcepts.com/imagemagick/ ... /index.php
http://www.fmwconcepts.com/imagemagick/ ... /index.php
I am not sure I understand what you are doing? Is this for FFT deconvolution? If so, to what are you applying the blur and in which domain (spatial or frequency)?
Re: roll and blur
thanks, that gives me some homework for tonight
That looks like I should be able to do exactly what I want with a bit of digging.
what did already was this
It's a bit crude segmentation wise and I was not getting a strong enough blur in some images that had a large tonal difference left and right.
Look like I should be able to do just what I want with elliptical burring.
There's not end to what you can do with IM but your need a Sherpa to guide you through the mountains of documentation.
Thanks for your help.
That looks like I should be able to do exactly what I want with a bit of digging.
what did already was this
Code: Select all
wid=`identify -format "%w" $src`
half=$(($wid/2))
blur=52
convert -gravity Center $src \
-roll +$half+0 \
-region 6%x100% -blur 3x$(($blur*${wid}/100)) \
-region 10%x100% -blur 3x$(($blur*${wid}/100)) \
-region 100%x100% -roll -$half-0 \
-roll +0+$half \
-region 100%x6% -blur 3x$(($blur*${wid}/100)) \
-region 100%x10% -blur 3x$(($blur*${wid}/100)) \
-region 100%x100% -roll +0-$half \
$dest
Look like I should be able to do just what I want with elliptical burring.
There's not end to what you can do with IM but your need a Sherpa to guide you through the mountains of documentation.
Thanks for your help.