Ask Your Question
1

Get the SIFT descriptor for specified point using OpenCV

asked 2014-12-03 21:19:02 -0600

tidy gravatar image

I want get the SIFT feature for specified points. These points is gotten by hand not by KeyPoint Detector. My question is: I only know the position of the points but have no idea about the size and angle value. How should I set this value?

Here is my code:

int main()
{
    SiftDescriptorExtractor extractor;
    Mat descriptors;
    std::vector<KeyPoint> keypoints;

    // set keypoint position and size: should I set size parameter to 32 for 32x32 patch?
    KeyPoint kp(50, 60, 32);
    keypoints.push_back(kp);

    extractor.compute( img_object, keypoints, descriptors );

    return 0;
}

Should I set the size param of KeyPoint to 32 for 32x32 patch. Is this implementation reasonable?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-12-05 06:27:06 -0600

JohannesZ gravatar image

You should read the original SIFT paper first. The size specifies the layer in the gaussian pyramid (octave & sub-layers) in which the corner-like feature recieves the highest value in the response-function. Also, the extracted gradients in the neighborhood of the feature lead to the direction of the detected keypoint.

As you can see, it is very hard to guess some "handwritten values". Maybe you try to use DSIFT or some kind of other feature detector for your project?

edit flag offensive delete link more

Comments

Thanks for your advice! I will try DSIFT.

tidy gravatar imagetidy ( 2014-12-08 00:27:40 -0600 )edit

Question Tools

Stats

Asked: 2014-12-03 21:19:02 -0600

Seen: 660 times

Last updated: Dec 05 '14