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. |
Creates the combined grayscale cumulative histogram of one or more images. |
last modified: December 15, 2018
USAGE: cumhist [-f format ] [-L] [-C] [-g graph] [-m mode] [-P] [-i imgdir ] [infile1 infile2 ...]
-f ... format .... grayscale format to use for processing; normal (n), PURPOSE: To create the combined grayscale cumulative histogram of one or more images. DESCRIPTION: CUMHIST creates the combined 256 bin grayscale cumulative histogram of one or more images. The results are listed to the terminal and optionally may be graphed. Images may be provided as a list in the command line or by providing a path to the image directory containing the images to be processed. ARGUMENTS: -f format ... FORMAT is the grayscale image format to use for processing. Choices are: normal (n), ave (a) or global (g). The default=gray. For format=normal, the R,B,B channnels will be converted to -colorspace gray. For format=ave, the R,G,B channels will be average. For format=global, the R,G,B channels will be appended. -L ... use LINEAR channels. The default is non-linear channels. -C ... COMPLEMENT the cumulative histogram percent counts above 50%. That for those percent counts above 50% convert them to (100-50)%. The default is a normal (non-complemented) cumulative histogram. -g graph ... GRAPH is the type of graph to create. Choices are: simple (s) or gnuplot (g). The default is no graph. -m mode ... MODE for the graph. Choices are: view (v) or save (s). The default=view, if a graph is requested. If mode=save, then an output image named cumhist_graph.png will be created. -P ... PROGRESS report showing the list of images as they are processed. The default is no progress report. -i imgdir ... IMGDIR is the (full) path to directory of images to be processed. If images are provided in the command line, this option will be ignored. REQUIREMENTS: GNUPLOT must be installed when graph=gnuplot 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. |
Example 1 - Normal Cumulative Histogram |
||
Input Images |
||
Textual Data |
Arguments: |
Arguments: |
Bin Count% Gray%
|
Example 2 - Complemented Cumulative Histogram |
||
Input Images |
||
Textual Data |
Arguments: |
Arguments: |
Bin Count% Gray%
|
What the script does is as follows:
See the script for actual code details. |