I’ve got coordinates of one pixel of my image (for example int i,j;), how can I write them into a vector like the following one?
std::vector<KeyPoint> keypoint_object;
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.
From the documentation, I see there is a constructor for KeyPoint that allows insertion of your indices. However it requires an additional parameter size, and I don’t know what you need that to be.
However, the general idea would be this:
Here,
iandjare implicitly cast tofloat(I assume that is what you require) and the third argument is0(as it’s mandatory) — you probably want a more sensible argument here.