Histogram equalisation
Страница в процессе перевода. |
This demo illustrates the use of Histogram equalization, gamma correction matching and Contrast Limited Adaptive Histogram Equalization
Histogram equalisation is used to improve the contrast in an single-channel grayscale image. It distributes the intensity of the image in an uniform manner. The natural justification for uniformity is that the image has better contrast if the intensity levels of an image span a wide range on the intensity scale. The transformation is based on mapping of cumulative histogram
using ImageContrastAdjustment, TestImages, ImageCore
img = testimage("moonsurface")
Now we will apply Histogram equalisation, gamma correction and Adaptive histogram equalisation method to enhance contrast of the image
hist_equal = adjust_histogram(img, Equalization(nbins = 256))
gamma_correction = adjust_histogram(img, GammaCorrection(gamma = 2))
hist_adapt = adjust_histogram(img, AdaptiveEqualization(nbins = 256, rblocks = 4, cblocks = 4, clip = 0.2))
mosaicview(img, hist_equal, gamma_correction, hist_adapt; nrow = 1)
This page was generated using DemoCards.jl and Literate.jl.