Home > Software engineering >  Opencv SIFT feature extraction using useProvidedKeypoints=true, have any requirements on feature poi
Opencv SIFT feature extraction using useProvidedKeypoints=true, have any requirements on feature poi

Time:10-29

I use opencv is version 2.4.11 version, there is the sift feature extraction function, I am by overloading () operator to extract the feature, feature point vector vector Use the face of facial feature points, a total of 68 points, I set the keypoints for the coordinates of facial feature points, but all extracted sift feature descriptor is 0,
Here is the code that I use:
 
Mat image=imread (" 123 JPG ", 0);//a pair of face image
Fstream fin;
Fin. Open (" 123 PTS ");//store 68 feature points file
KeyPoint KP;
Vector VKP;
for (int i=0; i <68; I++)//face 68 of feature point coordinate values
{
Fin & gt;> KP. Pt. X;
Fin & gt;> KP. Pt. Y;
KP. Octave=3;
KP. Angle=0;
KP. Size=0;
KP. Class_id=1;
KP. The response=0;
VKP. Push_back (KP);
}
Mat desc;
SIFT SIFT;
Sift (image, Mat (), VKP, desc,);

In the KP. Angle, the size, the response set to certain values, is can get nonzero feature descriptor, but I don't know how to set these values should be,
Excuse me, if the need to set these values, so how to set up, or an automatic method?
PS: can I use the same method is to extract the characteristics of the ORB

CodePudding user response:

Can you parameter Settings, the orb operator because the orb is fast feature extracting and brief description, has nothing to do with sift, in addition, it is recommended that you use opencv3.0, detect and compute directly, than the overloaded function for the more convenient, not manually so many parameters
  • Related