# coyote: HISTOMATCH

- coyote/Image Processing
- [Source code]

NAME

      HistoMatch

PURPOSE

      This is a function for Histogram Matching, in which an image
      is manipulated in such a way that it's final histogram approximates
      the histogram of an input image or histogram. Histogram matching
      allows the user to specify the shape of the histogram of the final
      product.

AUTHOR

      FANNING SOFTWARE CONSULTING
      David Fanning, Ph.D.
      1645 Sheely Drive
      Fort Collins, CO 80526 USA
      Phone: 970-221-0438
      E-mail: david@idlcoyote.com
      Coyote's Guide to IDL Programming: http://www.idlcoyote.com

CATEGORY

      Image Processing

CALLING SEQUENCE

      output_image = HistoMatch(image, histogram_to_match)

INPUTS

      image - The input image to be manipulated. Assumed to be a 2D byte array.
      histogram_to_match - Can be either a 1D long vector of 256 elements specifying
          the histogram to match, or a 2D byte array from which the histogram to
          match is calculated.

OUTPUTS

      output_image - The manipulated image adjusted to the histogram specifications.

INPUT KEYWORDS

      None.

OUTPUT KEYWORDS

      None.

DEPENDENCIES

      None.

METHOD

      Based on the Histogram Matching method on pages 94-102 of Digital
      Image Processing, 2nd Edition, Rafael C. Gonzalez and Richard E. Woods,
      ISBN 0-20-118075-8.

EXAMPLE

      There is an example program at the end of this file. It will require cgImage
      from the Coyote Library to run. You can also find an explanation of this program
      at http://www.idlcoyote.com/ip_tips/histomatch.html.

MODIFICATION HISTORY

      Written by David W. Fanning, January 2003.