Hi all,
I need to run commands like contrast-stretch, normalize, auto-level and linear-stretch on an image histogram.
Problem is that the lower third of the image is totally black.
And the boarder to the top is not a line.
So I wonder if i can make a mask from the black part to have all the commands above to deal with the top rest of the image only?
What would the command line look line like?
Thanks,
Jan
mask for histogram?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: mask for histogram?
I have never tried any of that before. But you could try using -region (see http://www.imagemagick.org/script/comma ... php#region) and see if those commands will work only within that region.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: mask for histogram?
It should work. -region works for any sequence of image processing operations that work with individulual images and not multiple images.fmw42 wrote:I have never tried any of that before. But you could try using -region (see http://www.imagemagick.org/script/comma ... php#region) and see if those commands will work only within that region.
Essentually what it does is crop the region given from each image in the current image sequence, runs that though all the single image processing operators (mogrify type operators), then overlays that back onto the original image.
That would include -normalize, -auto-level, -contrast, etc etc etc.
It also includes image: drawing, warps, distorts, and resizes (weird but true you can resize the region! but results are not nice)
It does NOT include -clone, -swap, parenthesis, composition, -flatten, -clut
See the minimal summery of region in IM examples, Simple Image Warping
http://www.imagemagick.org/Usage/warping/#region
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/