Theory
The histogram equalization is an approach to enhance a given image. The approach is to design a transformation T such that the gray values in the output is uniformly distributed in [0, 1].
Algorithm
Compute a scaling factor, α= 255 / number of pixels
Calculate histogram of the image
Create a look up table LUT with
LUT[0] = α * histogram[0]
for all remaining grey levels, i, do
LUT[i] = LUT[i-1] + α * histogram[i]
end for
for all pixel coordinates, x and y, do
g(x, y) = LUT[f(x, y)]
end for
Source Code : C++
Read more »
The histogram equalization is an approach to enhance a given image. The approach is to design a transformation T such that the gray values in the output is uniformly distributed in [0, 1].
Algorithm
Compute a scaling factor, α= 255 / number of pixels
Calculate histogram of the image
Create a look up table LUT with
LUT[0] = α * histogram[0]
for all remaining grey levels, i, do
LUT[i] = LUT[i-1] + α * histogram[i]
end for
for all pixel coordinates, x and y, do
g(x, y) = LUT[f(x, y)]
end for
Source Code : C++
تعليقات: 0
إرسال تعليق