Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Converting a rgb image to hsv and to grayscale

I am working with a face recognition task. I am reading an rgb image and trying to convert it to hsv as I am trying to see if hsv is better for illumination issues.

       image = imread( path, 1 );
       cropped_rgb = image(faceRect).clone();
       cvtColor(cropped_rgb, cropped_hsv, CV_BGR2HSV);
       cvtColor(cropped_hsv, cropped_hsv, CV_BGR2GRAY);

I am trying to understand if there is a really difference between converting an rgb image to bgr_gray and rgb to bgr_gray. In fact when I plot cropped_hsv I ve got a weird result is not the same with rgb_gray image. Is this the final hsv_gray I want??