I’m attempting to do digit recognition with OpenCV based on the grabber in:




I’m a complete novice at OpenCV but my understanding is that, in short, it uses K-Nearest-Neighbours to compare my image against a bunch of handwritten characters in digits.png (which is ‘included’ with openCV I think).


My image is a screengrab (only 120dpi I think) with all digits in Arial font.  The digit recognition does a pretty good job except it tends to fail miserably on 6 and 9, more often than not returning 5 and 8 respectively.


Any suggestions please on how I can (reasonably simply) improve the accuracy?  My initial thoughts (and some experimentation) have been around editing digits.png to replace some of the scrawls with arial font characters but this doesn’t appear to make any difference.