Histogram matching

From Infogalactic: the planetary knowledge core
Jump to: navigation, search
File:Histogram matching.PNG
An example of histogram matching

In image processing, histogram matching or histogram specification is the transformation of an image so that its histogram matches a specified histogram.[1] The well-known histogram equalization method is a special case in which the specified histogram is uniformly distributed.[2]

It is possible to use histogram matching to balance detector responses as a relative detector calibration technique. It can be used to normalize two images, when the images were acquired at the same local illumination (such as shadows) over the same location, but by different sensors, atmospheric conditions or global illumination.

Algorithm

Given two images, the reference and the adjusted images, we compute their histograms. Following, we calculate the cumulative distribution functions of the two images' histograms – F_1()\, for the reference image and F_2()\, for the target image. Then for each gray level G_1\in[0,255], we find the gray level G_2\, for which F_1(G_1)=F_2(G_2)\,, and this is the result of histogram matching function: M(G_1)=G_2\,. Finally, we apply the function M() on each pixel of the reference image.

Exact histogram matching

In typical real-world applications, with 8-bit pixel values (discrete values in range [0, 255]), histogram matching can only approximate the specified histogram. All pixels of a particular value in the original image must be transformed to just one value in the output image.

Exact histogram matching is the problem of finding a transformation for a discrete image so that its histogram exactly matches the specified histogram.[3] Several techniques have been proposed for this. One simplistic approach converts the discrete-valued image into a continuous-valued image and adds small random values to each pixel so their values can be ranked without ties. However, this introduces noise to the output image.

Multiple histogram matching

The histogram matching algorithm can be extended to find a monotonic mapping between two sets of histograms. Given two sets of histograms  P=\{p_i\}_{i=1}^k and  Q = \{q_i \}_{i=1}^k , the optimal monotonic color mapping  M is calculated to minimize the distance between the two sets simultaneously, namely  \operatorname{arg} \min_M \ \sum_k d(M(p_k),q_k) where  d(\cdot,\cdot) is a distance metric between two histograms. The optimal solution is calculated using dynamic programming.[4]

See also

References

  1. Lua error in package.lua at line 80: module 'strict' not found.
  2. Lua error in package.lua at line 80: module 'strict' not found.
  3. Lua error in package.lua at line 80: module 'strict' not found.
  4. Lua error in package.lua at line 80: module 'strict' not found.


<templatestyles src="Asbox/styles.css"></templatestyles>