I’ve some OpenCV KeyPoints, and they are stored as vector<KeyPoint> or list<KeyPoint>.
How to sort them according to the response of the KeyPoints to obtain the best n keypoints?
Regards.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looking at the documentation, and guessing you are trying to do something like this,
Here is how KeyPoint is implemented in OpenCV.
So from what I understand, what you want to use is the response element:
So this is definitely what I would be going to in your case.
Create a function that sorts your vector by response 🙂
Hope this helps
EDIT:
Trying to take advantage of Adrian’s advice (This is my first cpp code though, so expect to have some corrections to perform)