Nicolas came up with a new method of blending gamma adjusted linear RGB magnification with the negated same so as to reduce both bright and dark halos.
see
http://www.luminous-landscape.com/forum ... #msg746689
Here is the (unix syntax) command lines that I used for testing (in IM 6.8.9.5 Q16 Mac OSX). All tests were 800% magnification, except for the first example with the checker pattern, which is 3200% magnification.
Code: Select all
sRGB:
convert input_small.png -set colorspace sRGB \
-filter LanczosRadius -distort Resize 800% \
-depth 8 input_small_LanczosRadius_s800_sRGB.png
RGB:
convert input_small.png -depth 16 -set colorspace sRGB -colorspace RGB \
-filter LanczosRadius -distort Resize 800% \
-set colorspace RGB -colorspace sRGB \
-depth 8 input_small_LanczosRadius_s800_RGB.png
LAB:
convert input_small.png -depth 16 -set colorspace sRGB -colorspace LAB \
-filter LanczosRadius -distort Resize 800% \
-set colorspace LAB -colorspace sRGB \
-depth 8 input_small_LanczosRadius_s800_LAB.png
Blended (gamma 2 adjusted with no gamma) RGB:
convert \( input_small.png -depth 16 -set colorspace sRGB -colorspace RGB \) \
\( -clone 0 -gamma 2 -filter LanczosRadius -distort Resize 800% -gamma 0.5 \) \
\( -clone 0 -filter LanczosRadius -distort Resize 800% \) \
\( -clone 2 -colorspace gray -auto-level \) \
-delete 0 -compose over -composite \
-set colorspace RGB -colorspace sRGB \
-depth 8 input_small_LanczosRadius_blended_s800_g2_RGB.png
Blended (gamma 3 adjusted with no gamma) RGB:
convert \( input_small.png -depth 16 -set colorspace sRGB -colorspace RGB \) \
\( -clone 0 -gamma 3 -filter LanczosRadius -distort Resize 800% -gamma 0.333333333333333 \) \
\( -clone 0 -filter LanczosRadius -distort Resize 800% \) \
\( -clone 2 -colorspace gray -auto-level \) \
-delete 0 -compose over -composite \
-set colorspace RGB -colorspace sRGB \
-depth 8 input_small_LanczosRadius_blended_s800_g3_RGB.png
Dual Blending (gamma 3 and negated image with gamma 3), RGB:
convert \( input_small.png -depth 16 -set colorspace sRGB -colorspace RGB \) \
\( -clone 0 -gamma 3 -filter LanczosRadius -distort Resize 800% -gamma 0.333333333333333 \) \
\( -clone 0 -negate -gamma 3 -filter LanczosRadius -distort Resize 800% -gamma 0.333333333333333 -negate \) \
\( -clone 1 -clone 2 -evaluate-sequence mean -colorspace gray -auto-level \) \
-delete 0 -compose over -composite \
-set colorspace RGB -colorspace sRGB \
-depth 8 input_small_LanczosRadius_dualblended_s800_g3_RGB.png
Here are results for various images. The mitigation of haloing is most evident on the puzzle and valiant images.
All the images can be downloaded at
http://www.fmwconcepts.com/misc_tests/R ... ests_8.zip
input (checker):
sRGB:
RGB:
LAB:
Blended gamma=2 RGB:
Blended gamma=3 RGB:
Dual Blended gamma=3 RGB:
input (puzzle):
sRGB:
RGB:
LAB:
Blended gamma=2 RGB:
Blended gamma=3 RGB:
Dual Blended gamma=3 RGB:
input (valiant):
sRGB:
RGB:
LAB:
Blended gamma=2 RGB:
Blended gamma=3 RGB:
Dual Blended gamma=3 RGB:
input (chip):
sRGB:
RGB:
LAB:
Blended gamma=2 RGB:
Blended gamma=3 RGB:
Dual Blended gamma=3 RGB:
input (wizzard):
sRGB:
RGB:
LAB:
Blended gamma=2 RGB:
Blended gamma=3 RGB:
Dual Blended gamma=3 RGB:
input (person):
sRGB:
RGB:
LAB:
Blended gamma=2 RGB:
Blended gamma=3 RGB:
Dual Blended gamma=3 RGB:
All the images can be downloaded at
http://www.fmwconcepts.com/misc_tests/R ... ests_8.zip