Re: Auto WB correction
Posted: 2017-01-28T16:42:21-07:00
Where did you get the warm and cold images? Do you have links to them or are they your photographs?
Use https://github.com/ImageMagick/ImageMagick/discussions instead.
https://imagemagick.com/discourse-server/
https://imagemagick.com/discourse-server/viewtopic.php?t=31296
Code: Select all
WxH=`convert warm.jpg -format "%wx%h" info:`
color=`convert warm.jpg -resize 1x1! -modulate 100,100,0 -format "%[pixel:u.p{0,0}]" info:`
convert warm.jpg -colorspace sRGB \
\( -clone 0 -fill "$color" -colorize 50% \) \
-compose colorize -composite -colorspace sRGB \
tmp2.jpg
Code: Select all
WxH=`convert warm.jpg -format "%wx%h" info:`
color=`convert warm.jpg -resize 1x1! -modulate 100,100,0 -format "%[pixel:u.p{0,0}]" info:`
convert warm.jpg -colorspace RGB \
\( -clone 0 -fill "$color" -colorize 50% \) \
-compose colorize -composite -colorspace sRGB \
tmp3.jpg
Code: Select all
WxH=`convert warm.jpg -format "%wx%h" info:`
convert warm.jpg \
\( -clone 0 -colorspace sRGB -resize 1x1! -resize $WxH\! -modulate 100,100,0 \) \
\( -clone 0 -fill "gray(50%)" -colorize 100 \) \
-compose colorize -composite -colorspace sRGB \
tmp5.jpg
Code: Select all
WxH=`convert warm.jpg -format "%wx%h" info:`
convert warm.jpg \
\( -clone 0 -colorspace RGB -resize 1x1! -resize $WxH\! -modulate 100,100,0 \) \
\( -clone 0 -fill "gray(50%)" -colorize 100 \) \
-compose colorize -composite -colorspace sRGB \
tmp6.jpg