C# uses OpenCv (OpenCVSharp) image histogram equalization processing example

This article demonstrates how to use OpenCv (OpenCVSharp) to perform histogram equalization on images in the C# language.

Histogram equalization principle

Histogram Equalization is a commonly used image enhancement technique used to improve the contrast and brightness distribution of images. It redistributes the pixel values ​​of the gray level of the image so that the histogram of the image is more uniform within the gray scale range, thereby enhancing the details and visual effects of the image.

Histogram equalization can improve the overall contrast and brightness distribution of an image. In the equalized image, the originally more concentrated gray levels will be stretched or compressed, making the distribution of pixels in the entire gray range more even. This process of reassigning pixel values ​​enhances image detail and improves visual effects

function prototype

The definition is as follows:

EqualizeHist(InputArray src, OutputArray dst);

return value:

dst: output

Guess you like

Origin blog.csdn.net/qq_30725967/article/details/133016766