Home

User Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Contributor Documentation

Getting Started
Learn More
Explore in Detail
Get Inspired

Quick Links

Software Manual
AstroDiscuss
GitHub
API Reference

Documentation Versions

Public Release
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0

ISIS 2

Documentation
Tutorials
Technical Documents
USGS

ISIS Application Documentation


histmatch

Printer Friendly View | TOC | Home

Match histograms of 2 cubes

Overview Parameters Example 1 Example 2

Description

This program takes in two input images, FROM and MATCH, and uses their histograms to compute stretch pairs. The data in the stretch depends on which matching algorithm is chosen. If Culmulative Distribution Function (CDF) is chosen, the histogram data will be stored into stretch pairs at regular intervals, the default being every one percent between 0.5 and 99.5 percent. If MODE is chosen, only the histogram data at the endpoints and mode are stored. The pixels from the input image are remapped based on the data in the stretch pairs and the results are written to a new cube file. This is useful for tone matching two images. The following figures illustrate what is happening. Band 1 is FROM, Band 6 is MATCH, and CDF and Mode are two different output cubes. The blue line is the histogram and the red line is the cumulative distribution.
Band 1 image Output of CDF algorithm
Band 6 image Output of Mode algorithm
Notice how the endpoints, mode, and overall shape of Band 1's histogram is now roughly equivalent to Band 6.

Categories


Related Objects and Documents

Applications


History

Sean Crosby2006-12-04 Original version
Sean Crosby2007-03-12 Included ability to histmatch input cubes of different sizes
Steven Lambright2008-05-12 Removed references to CubeInfo

Parameter Groups

Files

Name Description
FROM Input file to be altered
MATCH Input file to be matched
TO Output cube

Algorithm

Name Description
STRETCHStretch mode

Histogram Options

Name Description
MINPERMinimum percentage
MAXPERMaximum percentage
INCREMENTPercentage increment
X

Files: FROM


Description

This file will have its histogram reshaped to resemble MATCH's histogram

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: MATCH


Description

This file's histogram will be matched by FROM

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: TO


Description

The resultant cube containing the altered input file

Type cube
File Mode output
Filter *.cub
Close Window
X

Algorithm: STRETCH


Description

This parameter specifies how the histogram will be stretched. The options are to stretch by by percentage (CDF), or by mode (Mode).

Type string
Default CDF
Option List:
Option Brief Description
CDFMatch Cumulative Distribution Function Remap image using stretch pairs taken at regular percentage intervals
MODEMatch modes Remap image using stretch pairs based on endpoints and mode

Exclusions

  • INCREMENT
Close Window
X

Histogram Options: MINPER


Description

Minimum cut-off value for the histogram

Type double
Default 0.5
Minimum 0.0 (inclusive)
Less Than MAXPER
Close Window
X

Histogram Options: MAXPER


Description

Maximum cut-off value for the histogram

Type double
Default 99.5
Maximum 100.0 (inclusive)
Close Window
X

Histogram Options: INCREMENT


Description

Percentage increment for the histogram

Type integer
Default 1
Minimum 1 (inclusive)
Less Than MAXPER
Close Window

Example 1

Peaks histogram matching with CDF

Description

This example shows the results of histogram matching using the cumulative distribution function.

Command Line

histmatch from=../peaks.cub+1 match=../peaks.cub+6 stretch=cdf to=../result.cub
Use CDF matching to adjust Band 1's histogram to resemble Band 6's histogram

GUI Screenshot

Histmatch Gui

Example Gui

Screenshot of GUI with parameters filled in to perform a histogram matching operation with the input images.

Input Images

Input Peaks (Band 1) image

Input image for histmatch

Parameter Name: FROM

This is the input image for the histmatch example.

Input Peaks (Band 1) image

Band 1 histogram

This is the input image's histogram.

Input Peaks (Band 6) image

Match image for histmatch

Parameter Name: MATCH

This is the match image for the histmatch example (i.e. the other input's histogram will be matched to this image's histogram).

Input Peaks (Band 6) image

Band 6 histogram

This is the input image's histogram.

Output Images

Output image showing results of the CDF histogram matching.

Output image for CDF matching

Parameter Name: TO

This is the output image that results.

Output image

CDF histogram

This is the output image's histogram.


Example 2

Peaks histogram matching with mode

Description

This example shows the results of histogram matching using the match mode function.

Command Line

histmatch from=../peaks.cub+1 match=../peaks.cub+6 stretch=mode to=../result.cub
Use mode matching to adjust Band 1's histogram to resemble Band 6's histogram

Input Images

Input Peaks (Band 1) image

Input image for histmatch

Parameter Name: FROM

This is the input image for the histmatch example.

Input Peaks (Band 1) image

Band 1 histogram

This is the input image's histogram.

Input Peaks (Band 6) image

Match image for histmatch

Parameter Name: MATCH

This is the match image for the histmatch example (i.e. the other input's histogram will be matched to this image's histogram).

Input Peaks (Band 6) image

Band 6 histogram

This is the input image's histogram.

Output Images

Output image showing results of the modal histogram matching.

Output image for mode matching

Parameter Name: TO

This is the output image that results.

Output image

Mode histogram

This is the output image's histogram.