Copyright © Fred Weinhaus My scripts are available free of charge for non-commercial (non-profit) use, ONLY. For use of my scripts in commercial (for-profit) environments or non-free applications, please contact me (Fred Weinhaus) for licensing arrangements. My email address is fmw at alink dot net. If you: 1) redistribute, 2) incorporate any of these scripts into other free applications or 3) reprogram them in another scripting language, then you must contact me for permission, especially if the result might be used in a commercial or for-profit environment. Usage, whether stated or not in the script, is restricted to the above licensing arrangements. It is also subject, in a subordinate manner, to the ImageMagick license, which can be found at: http://www.imagemagick.org/script/license.php Please read the Pointers For Use on my home page to properly install and customize my scripts. |
Generates an output image which is composed of the histograms from each channel of the input image |
last modified: December 15, 2018
USAGE: histog [-l labels] [-c number] [-rgb] infile [outfile]
-l ...... labels .. quoted comma and/or space delimited list of labels for histogram: PURPOSE: To generate an output image which is composed of the histograms from each channel of the input image. DESCRIPTION: HISTOG generates an output image which is composed of the separate histograms from each channel of the input image. Label names may be supplied for each channel, if desired. However, each channel histogram will display its corresponding min, max, mean, and standard deviation values. There is also an option for four different colorschemes for the histogram to optimize it presentation. Furthermore, the infile may be automatically converted from whatever colorspace it is in to RGB before generating the histogram. ARGUMENTS: -l labels indicates to put label names on the histogram for each channel, where labels is a quoted comma and/or space delimited list of labels for the histogram with 1, 3 or 4 values such as: "Grayscale" or "Red Green Blue" or "Hue Saturation Lightness" or "Cyan Magenta Yellow Black" or just "4" to distinguish CMYK from all the 3-channel formats, but leave the label off. Note that if the number of labels provided is 4 or the option is specified as -l "4", then a non-4-channel image will be converted to CMYK before generating the histogram.
-c number indicates the color scheme to use. The choices are: -rgb indicates to convert the image from whatever colorspace it has to RGB before generating the histogram If no outfile is specified, then outfile will be named as infilename_hist.gif, where the suffix has been removed from infile to generate infilename. CAVEAT: No guarantee that this script will work on all platforms, nor that trapping of inconsistent parameters is complete and foolproof. Use At Your Own Risk. |
RGB Histograms |
||||
zelda2_redist.jpg |
arguments: |
arguments: |
arguments: |
arguments: |
HSL Histograms |
||||
zelda2_redist_hsl.jpg |
arguments: |
arguments: |
arguments: |
arguments: |
CMYK Histograms |
||||
mandril_eq_cmyk.jpg |
arguments: |
arguments: |
arguments: |
arguments: |
What the script does is as follows:
This is equivalent to the following IM commands for the case of
|