# Revision history [back]

### Difference of CLAHE between opencv and matlab

I am trying to translate our Matlab code into C++ with OpenCV. Among others, finding counter part of adapthist of Matlab in OpenCV is critical. The function does so-called Contrast-limited adaptive histogram equalization (CLAHE) Luckily, OpenCV 2.45 came with CLAHE and I can neatly run following code for it.

Ptr<CLAHE> clahe = createCLAHE();
clahe->setClipLimit(3); //****
clahe->setTilesGridSize(Size(8,8));
clahe->apply(input,output);


One problem for matching Matlab result, however, is that ClipLimit in Matlab has ranges of (0,1) while I don't have any idea about ClipLimit in OpenCV although I think it's usually more than 1.

So could anyone tell me what's the range of ClipLimit in OpenCV and how can it match with the one in Matlab?

### Difference of CLAHE between opencv and matlab

I am trying to translate our Matlab code into C++ with OpenCV. Among others, finding counter part of adapthist of Matlab in OpenCV is critical. The function does so-called Contrast-limited adaptive histogram equalization (CLAHE) Luckily, OpenCV 2.45 came with CLAHE and I can neatly run following code for it.

Ptr<CLAHE> clahe = createCLAHE();
clahe->setClipLimit(3); //****
clahe->setTilesGridSize(Size(8,8));
clahe->apply(input,output);


One problem for matching Matlab result, however, is that ClipLimit in Matlab has ranges range of (0,1) while I don't have any idea about ClipLimit in OpenCV although I think it's usually more than 1.

So could anyone tell me what's the range of ClipLimit in OpenCV and how can it match with the one in Matlab?