1 | initial version |
You cannot set number of key points but you can try as suggested in doc :
2 | No.2 Revision |
You cannot set number of key points but you can try as suggested in doc :to reduce keypoint number:
3 | No.3 Revision |
You cannot set number of key points pointsUse first parameter nfeature of create method
Mat img=imread("f:/lib/opencv/samples/data/lena.jpg",IMREAD_COLOR);
for (int i=0;i<5;i++)
{
Mat desc;
vector<KeyPoint> p;
Ptr<xfeatures2d::SIFT> b= xfeatures2d::SIFT::create(i*100);
b->detectAndCompute(img,Mat(),p,desc);
cout<< p.size()<<"\t"<<desc.rows<<"\n";
}
}
Results :
1111 1111
100 100
200 200
300 300
400 400
but you can try too as suggested in doc to reduce keypoint number: