Reputation: 51
I'm doing a project to recognize the value of currency note and i should return the value.I used SURF algorithm to detect the value.There are several templates of currency values and i match those templates with currency images which captured from mobile camera..
by using SURF i could matching the value and if value matched its draw a rectangle around the vale.if the value is not matching not draw the rectangle....
*Problem is how i return the matching value..It's enough to show the value on command prompt.*Please help me. thank you very much..
Upvotes: 4
Views: 299
Reputation: 22245
After you call matchTemplate you will get a matrix result
void matchTemplate(InputArray image, InputArray temp, OutputArray result, int method)
Result is a matrix which maps the comparison results. Method could be CV_TM_CCORR_NORMED.
You can find the bets matches by using the function minMaxLoc().
You can consider the matching value as a probability that you find a particular "currency value". You can also set a threshold for the matching value, that way if you are not deteccting any of the patterns you know, you should get matching outputs below that threshold.
Upvotes: 4