copencvimage-processingluminance

Increasing luminosity does not produce desired effect


    cvCvtColor(img,dst,CV_RGB2YCrCb);
    for  (int col=0;col<dst->width;col++) 
    { 
        for (int row=0;row<dst->height;row++) 
        { 
            int idxF = row*dst->widthStep + dst->nChannels*col; // Read the image data 
            CvPoint pt = {row,col};
            temp_ptr2[0] += temp_ptr1[0]* 0.0722 + temp_ptr1[1] * 0.7152 +temp_ptr1[2] *0.2126  ;   // channel Y 
        }
    }

But the result is this:

enter image description here

Please assist where am i going wrong?


Solution

  • There is a lot to say about this code sample: