I am trying to perform a histogram equalization using OpenCV using the following function
Mat Histogram::Equalization(const Mat& inputImage)
{
    if(inputImage.channels() >= 3)
    {
        vector<Mat> channels;
        split(inputImage,channels);
        Mat B,G,R;
        equalizeHist( channels[0], B );
        equalizeHist( channels[1], G );
        equalizeHist( channels[2], R );
        vector<Mat> combined;
        combined.push_back(B);
        combined.push_back(G);
        combined.push_back(R);
        Mat result;
        merge(combined,result);
        return result;
    }
    return Mat();
}
But when I get the result, there seems to be no difference in input and output image, what am I doing wrong?
Sorry for the bad image quality, "Preprocessed" (left) is histogram equalized, you can see its same as the input (right).

What did miss?



