Page 1 of 1

motion-blur may still have a bug in IM 6.4.0-11

Posted: 2008-04-28T19:35:47-07:00
by fmw42
For reference see viewtopic.php?f=3&t=11122

In IM 6.4.0-11 Q16-hdri (Mac OSX Tiger PPC), motion blur is now appearing offset to the left and possibly too wide and/or sloped wrong for the filter radiusxsigma, but the filtered result does correctly produce a linear profile for its sides, now.

Here is the original image:
Image

Here is the result using radiusxsigma+angle = 0x5+0 which I would assume would create a horizontal blur about 15 pixels wide (as the filter width in other similar functions mentions that radius=0 produces a filter width about 3xsigma)
Image

Here is the profile of the above:
Image

If I reduce the parameter to 0x3+0, I get:
Image

and its profile is:
Image


Here is a correct motion blur for a 15 pixel horizontal blur (using -convolve):
Image

and its profile is:
Image


This is not urgent as I can get around it for reasonable size horizontal blurs using -convolve. But I wanted to give you feedback as you attempted to fix it for IM 6.4.0-11. Eventually it would be nice to have it correct so that I can more easily generate motion-blur at an arbitrary angle. (Can you clarify how the width and slope are determined? They should duplicate the result for -convolve with a 15x15 horizontal line filter, I would hope/expect?, for 0x5+0. Am I expecting too much due to the implementation method?)

For reference, here is how I generated the -convolve example:
filt15="\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,\
"
convert square31.png -convolve $filt15 square31_IM_filt15.png


Thanks

Fred

Re: motion-blur may still have a bug in IM 6.4.0-11

Posted: 2008-04-28T20:18:33-07:00
by magick
We can reproduce the problem and will have a patch in ImageMagick 6.4.1-0 sometime tomorrow.