Ask Your Question
0

hi i have question regarding KNN opencv for character recognition

asked 2017-07-20 02:14:51 -0600

i have been using using knn for my project to detect characters in an image,so is there anyway to get confidence score for KNN?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2017-07-20 02:24:33 -0600

berak gravatar image

sure there is, look at the docs:

Mat result; // k result ids 
Mat responses; // raw responses
Mat distances; // 1/distance ~ confidence

knn->findNearest(sample, k, result, responses, distances);
edit flag offensive delete link more

Comments

btw, ANN or SVM are usually more accurate here, and a cnn will send them all to the ditch.

berak gravatar imageberak ( 2017-07-20 02:46:32 -0600 )edit

hi berak am very very thankful for your answer.......k let me tell you the full problem and the procedure which am following currently in my project.......so am currently working on ocr part in which i have to process some claim forms,so in order to extract the data from fields in the form i used this KNN with opencv(character recognition) which i got it from github repository......so if i test it with some cropped images i got some output in character wise showing like it creating some bounding boxes for each character in my input image and it displays the character output .......so what i wanted is,i need the confidence score for each individual character/overall word score......how can i do that?

sujithkumar gravatar imagesujithkumar ( 2017-07-20 04:19:52 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-07-20 02:14:51 -0600

Seen: 346 times

Last updated: Jul 20 '17