# Revision history [back]

### Problem using CLAHE opencv c++

Hi there!

I am using Opencv for C++ to translate some algorithms from Matlab. I am trying to use gpu::CLAHE::apply because it seems to be so similar to "adapthisteq" in Matlab. The point is that I am not able to use it since the compilator does not recognize anything about CLAHE.

I am sure I am doing something wrong, but I have tried a thousand different ways and it does not work. My last attempt is this:

# include "cxcore.h"

using namespace cv; using namespace std; using cv::CLAHE;

int main( int argc, char** argv ) { Mat 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(); }

Thank you very much in advance!!

 2 No.2 Revision berak 27979 ●4 ●74 ●283

### Problem using CLAHE opencv c++

Hi there!

I am using Opencv for C++ to translate some algorithms from Matlab. I am trying to use gpu::CLAHE::apply because it seems to be so similar to "adapthisteq" in Matlab. The point is that I am not able to use it since the compilator does not recognize anything about CLAHE.

I am sure I am doing something wrong, but I have tried a thousand different ways and it does not work. My last attempt is this:

# include <opencv2 opencv.hpp="">

#include <opencv2/opencv.hpp>
#include "opencv2/imgproc/imgproc.hpp"
#include <string>
#include <iostream>
#include <cstdlib>
#include "cxcore.h"
include "opencv2/imgproc/imgproc.hpp" include <string> include <iostream> include <cstdlib> include "cxcore.h" using namespace cv;
using namespace std;
using cv::CLAHE;cv::CLAHE;
int main( int argc, char** argv )
{