Welcome to the Harris Geospatial product documentation center. Here you will find reference guides, help documents, and product libraries.


Harris Geospatial / Docs Center / Libraries / JBIU / HISTEQ

HISTEQ

HISTEQ

Name


    HISTEQ

Purpose


    Performs histogram equalization scaling of a 2D image.

Category


    Plot

Calling Sequence


    Result = HISTEQ(Image)

Inputs


    Image: Input image (for example, as generated with HIST_2D) containing
                integer or byte values.

Keyword Parameters


    ZEROEQ: Set this keyword to perform equalization using all pixels,
                even those with a value of zero. Default is to ignore pixels
                with a zero value.
    MAPPING: Optional output keyword containing a 256-element array with the
                original values corresponding to each output value.

Outputs


    Result contains a byte-scaled image where the distribution of pixel values
    is roughly uniform.

Example


    xpts = randomn(seed, 100000)
    ypts = randomn(seed, 100000)
    im1 = hist_2d(xpts,ypts,min1=-2,max1=2,bin1=0.05,min2=-2,max2=2,bin2=0.05)
    im2 = histeq(im1)
    im1 = bytscl(im1)
    !p.multi = [0,2,2]
    tvim, im1, xrange=[-2,2], yrange=[-2,2], title='Normal'
    plothist, im1, title='Pixel values', bin=10
    tvim, im2, xrange=[-2,2], yrange=[-2,2], title='Histogram-equalized'
    plothist, im2, title='Pixel values', bin=10
    !p.multi = 0

Modification History


    Writen by: Jeremy Bailin, 9 Dec 2008
    Modified 12 Dec 2008 JB: Do not include zero values when performing
                            eq unless /ZEROEQ is set.
    Modified 26 Sept 2010 Adding MAPPING keyword.
    17 June 2011 Efficiency improvement when input values
                        are much greater than 1.



© 2017 Exelis Visual Information Solutions, Inc. |  Legal
My Account    |    Buy    |    Contact Us