Page 1 of 1

-compose Blur problem (bug?)

Posted: 2011-03-16T10:00:46-07:00
by el_supremo
I've been trying out Anthony's tilt-shift example and cannot get the same result. He has two different methods of producing the result, one uses a single all-inclusive command and the other does it in three steps. Neither of these works for me even though my intermediate results are the same as Anthony's in the three-step version - which suggests that the problem lies with the -compose Blur in the final step.
Here is the result I get: http://members.shaw.ca/el.supremo/beijing_model_dos.jpg
Notice that the blurring is completely different than what Anthony obtains even though I have basically cut-and-pasted the identical commands.
I am using IM 6.6.8-4 Q16 (Win 7 Pro x64) whereas his webpages were produced with 6.6.8-2. Has something changed in -compose Blur between these two versions?

Pete

Re: -compose Blur problem (bug?)

Posted: 2011-03-16T10:14:59-07:00
by fmw42
I can confirm a different blurred result (more horizontal than vertical steaked blurring) with

convert beijing_md.jpg -sigmoidal-contrast 15x30% \
\( +clone -sparse-color Barycentric '0,0 black 0,%[fx:h-1] gray80' \
-solarize 50% -level 50%,0 \) \
-compose Blur -set option:compose:args 15 -composite \
beijing_model.jpg


In IM 6.6.8.4 Q16 Mac OSX Tiger

Re: -compose Blur problem (bug?)

Posted: 2011-03-16T19:43:07-07:00
by anthony
el_supremo...
I thought you said the command line version was working fine.
It was only your MagickWand version that seemed to have problems.

Also note that the all in one command is slightly different, using a linear gradient rather than a parabolic curve.

However I also see the same problem using the all in one command.

Code: Select all

  convert beijing_md.jpg -sigmoidal-contrast 15x30% \
          \( +clone -sparse-color Barycentric '0,0 black 0,%[fx:h-1] gray80' \
             -solarize 50% -level 50%,0 \) \
          -compose Blur -set option:compose:args 15 -composite \
          beijing_model.jpg
I verified that bot source (map) and destination (photo) images are what is expected.
EG: replace -compose Blur with -compose Src and -compose Dst respectivally.

Applying the composite blur as a separate command...

Code: Select all

convert beijing_model_3.jpg beijing_model_2.jpg \
           -compose Blur -set option:compose:args 15 -composite \
            beijing_model_4.jpg
and it also came out wrong!

It looks as if I have stuffed up something in the code.

I'll look into this tonight.

Re: -compose Blur problem (bug?)

Posted: 2011-03-17T05:20:34-07:00
by anthony
I have removed my previous fixes to BlurComposition as it is not only not working right .

Currently (with patch appiled one month ago)

Code: Select all

time  convert beijing_contrast.jpg  beijing_blurmap.jpg \
        -compose Blur -set option:compose:args 20 -composite show:
real    0m28.979s
user    0m28.477s
sys     0m0.118s
With the code back tracked to previous form (Fail to do blurs of less that 1 sigma)
It blurs basically correct, but is slower, which I suppose makes sense considering it is blurring correctly.

I have submitted the backout patch into the SVN.