Hist1 - Histogram MLx Home | MLx menu | MLx buttons | Widgets | Index | What's New

This histogram utility makes a histogram of the scaled version of the top gray scale image - the pixels are bytes (0 - 255), and this histogram always has 256 bins. For a more flexible but slower histogram that works on the actual real image data, see Hist2. Hist1 is faster, works on the scaled data, and reflects the threshold slider bar, whereas Hist2 does not.

Note that the image being histogrammed is the front gray scale image - if there are other images in front that are RGB images, for example, they will be ignored.

Example2 - comparison with Hist2. Explains key clicks.


The histogram plots the number of pixels in the image with a given intensity vs. the intensity, 0 - 255. The scaled copy of the image is used, therefore scaling the image will change the histogram accordingly. To see the histogram as it would look on the original data, scale using fixed limits, (0 - image maximum).

If the image window is being thresholded, the thresholds will be shown in the histogram window - the red pixels will correspond to the pink area in the histogram.

Clicking on the window will print the count and intensity in the Listener or Monitor window.

Dragging vertically in the window will change the scale of the plot. Note that the plot 'wraps around' for values that are too high to be on scale.

This histogram is a one dimensional plot. The scatter diagram images can be used to do the two and three dimensional equivalent (Multivariate buttons, in 'More Buttons')


Here is an example of a histogram showing why the number of blobs can increase drastically as the threshold is lowered one or two intensity levels. The area in red in the image (corresponding to the pink shading on the histogram) also increases correspondingly for the lower threshold going from 191 to 190, and then there is no change for about 10 intensity levels. The reason is the spiked or comb nature of the histogram, which is a result of scaling the image. There were only 29 gray levels in the unscaled image. The histogram should have only 29 bins. In macLispix, and many other image processing programs, the histogram has 256 bins, and is shown for the scaled image. The intensity values are stretched out (like beads on an elastic string) to lie evenly in the range 0 - 255.