-compose Blur problem (bug?)

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

-compose Blur problem (bug?)

Post 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
Sorry, my ISP shutdown all personal webspace so my MagickWand Examples in C is offline.
See my message in this topic for a link to a zip of all the files.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -compose Blur problem (bug?)

Post 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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: -compose Blur problem (bug?)

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: -compose Blur problem (bug?)

Post 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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply