Hello,
I'm writing a simple app for photographers and I want to have a feature that I see many cameras have built in.
The camera actually highlights and blinks the areas that are blown out in the photo.
I guess Blown out means over exposed, for example if you take a picture, and some areas are really bright, that would be considered blown out.
Can ImageMagick take an image and generate a new image containing the blown out regions highlighted in some way?
In my app I could take that new highlighted image and alternate it with the original one so that it would look like its blinking the high lighted area.
So the question is if imagemagick can take the original image and generate a new one with the blown out areas highlighted?
thanks
rough
highlight blown out areas in a picture
-
- Posts: 2
- Joined: 2013-06-18T05:58:16-07:00
- Authentication code: 6789
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: highlight blown out areas in a picture
Here are three methods. Windows script; adjust for other languages.
You can adapt them to also highlight pixels that are zero or near zero in one or all channels.
Code: Select all
rem Make test images.
%IM%convert -size 100x100 gradient: test.png
%IM%convert -size 100x100 gradient:red-blue test2.png
rem Any pixels that are exactly white are turned red.
%IM%convert test.png -fill Red -opaque White out1.png
rem Any pixels that are close to white are turned red.
%IM%convert test.png -fuzz 5%% -fill Red -opaque White out2.png
rem Any pixels that have any channel close to maximum have that channel set to zero.
%IM%convert test2.png ^
-separate ^
( -clone 0 -fuzz 5%% -fill Black -opaque White ) ^
( -clone 1 -fuzz 5%% -fill Black -opaque White ) ^
( -clone 2 -fuzz 5%% -fill Black -opaque White ) ^
-delete 0-2 ^
-combine ^
out3.png
snibgo's IM pages: im.snibgo.com
-
- Posts: 2
- Joined: 2013-06-18T05:58:16-07:00
- Authentication code: 6789
Re: highlight blown out areas in a picture
Awesome, I will try it out
thanks!
rough
thanks!
rough