1 | initial version |
The descriptor takes a vector of Keypoints and creates a Mat with the descriptors. So what you have to do is parse your string via regular expressions or whatnot and create the vector. It would be best if you make a loop that goes over each keypoint that you have and you manually create a keypoint from the pasted data from the string. So you have
KeyPoint [pt={123.0, 164.0}, size=7.0, angle=-1.0, response=214.0, octave=0, class_id=-1]
as the first keypoint in your string and then extract the information (position, size etc.) again using regular expressions or other ways and then set the values of your keypoint object. You do this for every keypoint in the string and in the end, you got your Keypoint vector with the data that you previously had in your string.