Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Color band on SURF descriptors

I'm reading this paper for obtaining better VLAD descriptors. The main difference is the use of the so called CSURF which is (quoting the paper):

In order to extract CSURF, the image is first transformed to grayscale and interest points are computed using the standard SURF algorithm. Then, instead of computing the SURF descriptor of each interest point on the intensity channel, CSURF computes three SURF descriptors, one on each color band.

How could I implement this in OpenCV? All the descriptors that I've seen so far (SIFT, SURF, ETC) are computed on the gray scale, how could I use SURF to describe keypoints based on one color band (Red, Green or Blue)?

Color band on SURF descriptors

I'm reading this paper for obtaining better VLAD descriptors. The main difference is the use of the so called CSURF which is (quoting the paper):

In order to extract CSURF, the image is first transformed to grayscale and interest points are computed using the standard SURF algorithm. Then, instead of computing the SURF descriptor of each interest point on the intensity channel, CSURF computes three SURF descriptors, one on each color band.

How could I implement this in OpenCV? All the descriptors that I've seen so far (SIFT, SURF, ETC) are computed on the gray scale, how could I use SURF to describe keypoints based on one color band (Red, Green or Blue)?

UPDATE: IS THIS SOLUTION CORRECT?

Mat img_1 = imread( argv[1], IMREAD_GRAYSCALE );

int minHessian = 400;
Ptr<SURF> detector = SURF::create( minHessian );
std::vector<KeyPoint> keypoints;

detector->detect( img, keypoints );

vector<Mat> spl;
Mat blueDesc, greenDesc, redDesc;
split(src,spl);
detector->detectAndCompute( spl[0], Mat(), keypoints, blueDesc, true);
detector->detectAndCompute( spl[1], Mat(), keypoints, greenDesc, true);
detector->detectAndCompute( spl[2], Mat(), keypoints, redDesc, true);