I am performing feature detection in a video/live stream/image using OpenCV C++. The lighting condition varies in different parts of the video, leading to some parts getting ignored while transforming the RGB images to binary images. The lighting condition in a particular portion of the video also changes over the course of the video. I tried the 'Histogram equalization' function, But it didn't help. I got a working solution in MATLAB in the following link
http://in.mathworks.com/help/images/examples/correcting-nonuniform-illumination.html
But I'm not aware of MATLAB functions so I can't use this function in OpenCV.
Can you suggest the alternative of this MATLAB code in OpenCV C++ ?
Thanks in Advance...