In previous versions of opencv , there was an option to extract specific number of keypoints according to desire like  

kp, desc = cv2.sift(150).detectAndCompute(gray_img, None)

But as in opencv 3.1 SIFT and other "non free" algorithms are moved to xfeatures2d ,so the function is giving error . Kindly tell me how can i set limit on the number of keypoints to be extracted using opencv 3.1. Thanks !

Similar questions and discussions