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;
VectorVKP;
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