Ask Your Question

Revision history [back]

Example of use:

Mat image = imread("lena.png",CV_LOAD_IMAGE_GRAYSCALE); //input image
imshow("lena_GRAYSCALE",m);

Ptr<CLAHE> clahe = createCLAHE();
clahe->setClipLimit(4);

Mat dst;
clahe->apply(m,dst);
imshow("lena_CLAHE",dst);

waitKey();

clipLimit = 2

image description

clipLimit = 4

image description

Example of use:

Mat image = m= imread("lena.png",CV_LOAD_IMAGE_GRAYSCALE); //input image
imshow("lena_GRAYSCALE",m);

Ptr<CLAHE> clahe = createCLAHE();
clahe->setClipLimit(4);

Mat dst;
clahe->apply(m,dst);
imshow("lena_CLAHE",dst);

waitKey();

clipLimit = 2

image description

clipLimit = 4

image description

Example of use:

Mat m= imread("lena.png",CV_LOAD_IMAGE_GRAYSCALE); imread("lena.png",IMREAD_GRAYSCALE); //input image
imshow("lena_GRAYSCALE",m);

Ptr<CLAHE> clahe = createCLAHE();
clahe->setClipLimit(4);

Mat dst;
clahe->apply(m,dst);
imshow("lena_CLAHE",dst);

waitKey();

clipLimit = 2

image description

clipLimit = 4

image description

More information about CLAHE:

Zuiderveld, K. (1994, August). Contrast limited adaptive histogram equalization. In Graphics gems IV (pp. 474-485). Academic Press Professional, Inc..