Документация Engee

Histogram equalisation

Страница в процессе перевода.

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")
swmourw

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)
hpnzjgt

This page was generated using DemoCards.jl and Literate.jl.