Histogram Display
The intensity histogram for an image provides valuable
information about how grey levels are being utilized.
The histogram is calculated by simply counting the number
of pixels at each intensity level in the image. The
cumulative histogram is the integral of the histogram
and gives an indication of the number of pixels less than
or equal to each intensity level in the image. The
histo program calculates the histogram and cumulative
histogram for an image and displays this information in a
table. By using the -a switch the output of histo can
be directed to xgraph for graphic display.
(see code)
Command Usage
histo [options] infile [outfile]
[-d] Print debugging information
[-a] Output ascii for xgraph
Example
histo -a input.im | xgraph -bar -brw 3
histo input.im
HISTO Program - KUIM Version 3.0
Intensity Range Histogram Cumulative
[ 74.00 .. 78.64) 4134 6.31 4134 6.31
[ 78.64 .. 83.28) 437 0.67 4571 6.97
[ 83.28 .. 87.92) 1048 1.60 5619 8.57
[ 87.92 .. 92.56) 2575 3.93 8194 12.50
[ 92.56 .. 97.21) 2705 4.13 10899 16.63
[ 97.21 .. 101.85) 1565 2.39 12464 19.02
[101.85 .. 106.49) 1514 2.31 13978 21.33
[106.49 .. 111.13) 1283 1.96 15261 23.29
[111.13 .. 115.77) 1034 1.58 16295 24.86
[115.77 .. 120.41) 1228 1.87 17523 26.74
[120.41 .. 125.05) 1217 1.86 18740 28.59
[125.05 .. 129.69) 938 1.43 19678 30.03
[129.69 .. 134.33) 1985 3.03 21663 33.06
[134.33 .. 138.97) 1841 2.81 23504 35.86
[138.97 .. 143.62) 1834 2.80 25338 38.66
[143.62 .. 148.26) 1585 2.42 26923 41.08
[148.26 .. 152.90) 1498 2.29 28421 43.37
[152.90 .. 157.54) 2110 3.22 30531 46.59
[157.54 .. 162.18) 2856 4.36 33387 50.94
[162.18 .. 166.82) 2108 3.22 35495 54.16
[166.82 .. 171.46) 1934 2.95 37429 57.11
[171.46 .. 176.10) 2174 3.32 39603 60.43
[176.10 .. 180.74) 1672 2.55 41275 62.98
[180.74 .. 185.38) 2185 3.33 43460 66.31
[185.38 .. 190.03) 1928 2.94 45388 69.26
[190.03 .. 194.67) 1563 2.38 46951 71.64
[194.67 .. 199.31) 2084 3.18 49035 74.82
[199.31 .. 203.95) 1547 2.36 50582 77.18
[203.95 .. 208.59) 1743 2.66 52325 79.84
[208.59 .. 213.23) 1347 2.06 53672 81.90
[213.23 .. 217.87) 914 1.39 54586 83.29
[217.87 .. 222.51) 1176 1.79 55762 85.09
[222.51 .. 227.15) 1183 1.81 56945 86.89
[227.15 .. 231.79) 957 1.46 57902 88.35
[231.79 .. 236.44) 798 1.22 58700 89.57
[236.44 .. 241.08) 705 1.08 59405 90.64
[241.08 .. 245.72) 688 1.05 60093 91.69
[245.72 .. 250.36) 917 1.40 61010 93.09
[250.36 .. 255.00) 1133 1.73 62143 94.82
[255.00 .. 259.64) 3393 5.18 65536 100.00