Ask Your Question
1

How to get the descriptor value from "SiftDescriptorExtractor"?

asked 2012-09-03 02:23:07 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

I use SiftDescriptorExtractor to compute the descriptors of keypoints. I'm trying to get the descriptor value. Does someone know how to do it?

(PS:My opencv version is 2.4.2)

This is the part of the code

//-- Step 2: Calculate descriptors (feature vectors)
SiftDescriptorExtractor extractor;
Mat descriptors_object, descriptors_scene;
extractor.compute( img_object, keypoints_object, descriptors_object );
extractor.compute( img_scene, keypoints_scene, descriptors_scene );
edit retag flag offensive close merge delete

Comments

I don't understand the question. What's the descriptor value? A descriptor is a fixed-size vector and every row in your descriptors matrix corresponds to such a vector.

Ben gravatar imageBen ( 2012-09-03 11:45:11 -0600 )edit

3 answers

Sort by ยป oldest newest most voted
1

answered 2012-09-05 03:39:20 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

You can get pointer to descriptor vector via ptr method:

Mat descriptors;
float* descVector = descriptors.ptr<float>(i); // i - feature index
// it will have descriptors.cols size
edit flag offensive delete link more
-1

answered 2012-09-05 01:48:42 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

oh! What I'm talking about is how to get every vector because I want to use that to do image matching by myself.

edit flag offensive delete link more
-1

answered 2012-09-08 12:26:55 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

thanks for your help!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-09-03 02:23:07 -0600

Seen: 1,547 times

Last updated: Sep 08 '12