Does Image Magick have Tonemapping operators?

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Does Image Magick have Tonemapping operators?

Post by fmw42 »

IM only has one way to do bilateral filtering using -selective-blur which does a gaussian blur with a simply gray level threshold to limit the range of graylevels. But I found that using it (in my limited tests) it left ringing artifacts. So I went back to a different -adaptive-blur, which did not leave such artifacts. I am sure this is not an optimal bilateral filtering, but at least it followed the other concepts as best I could understand from the Durand paper. It seemed to me to be better than my other methods. Best I could do by scripting.

Yes, I noticed the halo on the last image, but have no idea why it is there as this method was not dual process that separate the shadows and highlights as in my dualtonemap and duotonemap.

Again, it seems to me that if these psfto algorithms are open source c code, then perhaps the IM developers could fold at least one or two of the better ones into IM.

Quote from one of my old colleagues in image processing:

"90% of the result comes from the simplest 10% of the processing; it is the other 10% of the result that takes 90% of the effort"
Last edited by fmw42 on 2011-08-11T09:49:17-07:00, edited 1 time in total.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Does Image Magick have Tonemapping operators?

Post by fmw42 »

Decreasing the edge enhancement parameter from 60 to 30, decreases the haloing


convert cascata_praia_da_ursa4.exr -auto-level -evaluate log 10000 -colorspace HSB -separate \
\( -clone 1 -evaluate multiply 2.5 - \) \
\( -clone 2 -adaptive-blur 0x5 -write tmp2.png \) \
\( -clone 2 -clone 4 +swap -compose divide -composite -level 30,100% \) \
\( -clone 4 +level 0x90% \) \
\( -clone 5 -clone 6 -compose multiply -composite \) \
-delete 1,2,4,5,6 -set colorspace HSB -combine -colorspace RGB \
cascata_praia_da_ursa4_al_log10000_hsb_ab_0x5_sat2p5_l30x100_p0x90.jpg

Image
rnbc
Posts: 109
Joined: 2010-04-11T18:27:46-07:00
Authentication code: 8675308

Re: Does Image Magick have Tonemapping operators?

Post by rnbc »

"90% of the result comes from the simplest 10% of the processing; it is the other 10% of the result that takes 90% of the effort"
I agree with you, but in art it tends to be that last 10% making the difference between vulgar and sublime, and this is as much science as it's art ;)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Does Image Magick have Tonemapping operators?

Post by fmw42 »

I have added two more tonemapping scripts (tonemap1 and tonemap2) to my web site. See the link below.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Does Image Magick have Tonemapping operators?

Post by fmw42 »

I have added one more tonemapping script (tonemap3) to my web site. It seems to work better than the previous two. See the link below.
Post Reply