Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Digit recognition with OpenCV 2.4.6 in Java

Im trying to implement a basic Digit recognition using java, the main issue is that i'm really new with the framework and i dont know how to implement this.

i've read several c++ tutorials like this one: http://blog.damiles.com/2008/11/basic-ocr-in-opencv/ or this one: http://www.aishack.in/2010/08/sudoku-grabber-with-opencv/5/

and i know that i need a class with a train function that read a train file (which dictates what can be and what can not be recognized) , and a classify function using the k-nearest algorithm provided by opencv, im not so sure how to implement this, given that c++ tutorials use bitwise operations and operations that i can't replicate in java. the pre-procesing part is all done, i have a class that gives me a Mat object that contains the image of the digit, centered and without noise. i have to implement the part that actually takes that Mat object and turns it into an integer.

Thanks a lot for all your help!

click to hide/show revision 2
retagged

updated 2013-10-29 11:44:12 -0600

berak gravatar image

Digit recognition with OpenCV 2.4.6 in Java

Im trying to implement a basic Digit recognition using java, the main issue is that i'm really new with the framework and i dont know how to implement this.

i've read several c++ tutorials like this one: http://blog.damiles.com/2008/11/basic-ocr-in-opencv/ or this one: http://www.aishack.in/2010/08/sudoku-grabber-with-opencv/5/

and i know that i need a class with a train function that read a train file (which dictates what can be and what can not be recognized) , and a classify function using the k-nearest algorithm provided by opencv, im not so sure how to implement this, given that c++ tutorials use bitwise operations and operations that i can't replicate in java. the pre-procesing part is all done, i have a class that gives me a Mat object that contains the image of the digit, centered and without noise. i have to implement the part that actually takes that Mat object and turns it into an integer.

Thanks a lot for all your help!