Can I use a mask to change exposure values?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
sja2249

Can I use a mask to change exposure values?

Post by sja2249 »

I have a few thousand images with a horseshoe shaped shadow caused by interference with my flash. I was wondering if it would be possible
to increase the gain in the shadow areas to bring them up to a level similar to the rest of the photo? Is there an easy way to do this? Thanks.

Sam
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Can I use a mask to change exposure values?

Post by fmw42 »

Probably no easy way. You need to process the image to brighten the areas as you want them (while the other areas get overly bright). Then create a tapered mask for that area as the shadow areas probably do not have clearly defined edges. Then use the mask image to blend or composite the original and the processed image to merge them so that outside the shadow part of the mask you use the original image and inside the shadow part of the mask you use the enhanced image and in the taper area you blend both.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Can I use a mask to change exposure values?

Post by anthony »

It is actually very hard to say what can be done. Their are techniques to darken or brighten various areas of the image, but making the change work in a large number of cases for multiple colors, brightness, and of course the area mask, is not such an easy task.

You first step may be to direct your query to a photography forum of some type, and see what they have to say first. when you have a possible technique then we may be able to help you implement it.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Can I use a mask to change exposure values?

Post by fmw42 »

If the areas are not the same in each image, then a separate mask is needed for each. Probably a better solution is to use the dodge and/or burn tools with a paint brush in Photoshop or GIMP.
Post Reply