By changing the threshold, you can somehow control the number of key points. In any case, this does not directly control the maximum number of key points.
If you want it to stop maximum, you will have to go to the algorithm in .cpp (which is not debugging) and set the condition in a loop. I did this with some algortihms in OpenCV to get computational efficiency. The problem is that you will need to copy the code and paste it into your own class in order to be able to change, and this gives some binding problems until you get everything right. D
source share