0

I have a String saved that is full with Keypoints, but I need to use this string in the descriptor, which only takes Mat. How can I change my String to a Mat?

 String log = "[KeyPoint [pt={123.0, 164.0}, size=7.0, angle=-1.0, response=214.0, octave=0, class_id=-1], KeyPoint [pt={212.0, 170.0}, size=7.0, angle=-1.0, response=201.0, octave=0, class_id=-1], KeyPoint [pt={59.0, 116.0}, size=7.0, angle=-1.0, response=200.0, octave=0, class_id=-1], KeyPoint [pt={296.0, 133.0}, size=7.0, angle=-1.0, response=199.0, octave=0, class_id=-1]"; 

So if I could just change it from the String to the Mat, that would be perfect

user1393500
  • 199
  • 1
  • 3
  • 16
  • can you post an example of the String ? – Blackbelt May 16 '13 at 12:02
  • [KeyPoint [pt={123.0, 164.0}, size=7.0, angle=-1.0, response=214.0, octave=0, class_id=-1], KeyPoint [pt={212.0, 170.0}, size=7.0, angle=-1.0, response=201.0, octave=0, class_id=-1], KeyPoint [pt={59.0, 116.0}, size=7.0, angle=-1.0, response=200.0, octave=0, class_id=-1], KeyPoint [pt={296.0, 133.0}, size=7.0, angle=-1.0, response=199.0, octave=0, class_id=-1] This is what is inside the string (it are keypoints) – user1393500 May 16 '13 at 15:05

0 Answers0