Standard Library function that returns ahistogram-equalized image or vector.
Maxv
Minv
Top
To equalize the histogram of display values, the count-intensity histogram of the image is required. This is a vector in which the ith element contains the number of pixels with an intensity equal to the minimum pixel value of the image plus i. The vector is of long integer type and has one more element than the difference between the maximum and minimum values in the image. (This assumes a Binsize of 1 and an image that is not of byte type.) The sum of all the elements in the vector is equal to the number of pixels in the image.
HIST_EQUAL uses the HISTOGRAM function to obtain the density distribution of the image. This distribution is integrated to obtain the cumulative density probability function. Finally, the distribution is normalized so that its maximum element has a value of 255.
If image is of floating-point data type, its range of values should be at least 255, unless the Binsize keyword is used. If image is of byte data type, any Binsize keyword is ignored.
Unfortunately, it is this very effect that can sometimes cause unsatisfactory results
wavedir
/data
wavedir
:[DATA]
wavedir
\data
wavedir
is the main PV-WAVE directory.The commands shown in this example produce the image on the right in Figure 2-41:
Figure 2-41 The HIST_EQUAL function has been used to make the visual elements of this 512-by-512 galaxy image more pronounced.
Figure 2-42 The HIST_EQUAL function has been used to make the visual elements of this 512-by-512 galaxy image more pronounced.
whirlpool = BYTARR(512,512) GET_LUN, unit filename = 'whirlpool.img' OPENR, unit, filename READU, unit, whirlpool CLOSE, unit FREE_LUN, unit
!Order = 1
WINDOW, 2, XSize=500, YSize=500 TVSCL, whirlpool
WINDOW, 0, XSize=500, YSize=500 image = HIST_EQUAL(whirlpool) TVSCL, HIST_EQUAL(image)
For more information, see Histogram Equalization in Chapter 6 of the PV-WAVE User's Guide.