What are the values of the SURF descriptor?

asked Oct 26 '13

updated Oct 26 '13

Hi,

I'm extracting SURF descriptors from an image using the following simple lines:

Ptr<DescriptorExtractor> descriptor = DescriptorExtractor::create("SURF");
    descriptor->compute(im1, kp, desc1);

Now, when I "watch" the variable desc1.data, it contains integer values in the range 0 to 255.

However, when I investigate the values using the code:

for (int j=0;j<desc1.cols; j++){
            float a=desc1.at<float>(0,j);

it contains values between -1 and 1. How is that possible? SURF shouldn't return integer values like SIFT?

Thanks in advance!

Preview: (hide)

Comments

hmm, that should be float values indeed.

what do you mean by 'watch' ? can it be, it's looking at the data pointer ? (which is uchar*)

if it's vs there, try : (float*)(desc1.data),128

berak gravatar imageberak (Oct 26 '13)edit

yes, I'm looking at the data pointer and it contains integer values between 0 and 255, but when I execute float a=desc1.at<float>(0,j); I get that a is between -1 and 1.

GilLevi gravatar imageGilLevi (Oct 26 '13)edit