Search code examples
opencvimage-processingsurf

SURF and OpenSURF to color image


I am using SURF features in OpenCV where the input images are converted to GRAY image.

 cvtColor(object, object, CV_RGB2GRAY);

When I went through the documentation of OpenSURF I realised that its not in grayscale.

My confusion is that can we apply SURF to any image formats (YUV, HSV, RGB) or we have to change and modify the program to achieve that?


Solution

  • Most feature detectors work on greyscale because they analyse the patterns of edges in the image patch. You can run SURF on any single colour channel from the colour formats you mention i.e. You can run it on Y, U or V from YUV images, or on H, S or V from HSV images. Not sure how OpenSURF treats this, but they must be using the greyscale image internally.