SwiftOCR
SwiftOCR copied to clipboard
After training, can only recognise number '1'
I am trying to recognise numbers in a Sudoku board. I'm using a sample printed in Times new Roman, and I have trained the system using that font, and limited the characters to numbers by setting recognizableCharacters = "0123456789
testImages.zip
For the attached set of test images, which are all about 177 x 184 pixels, the only number that is ever recognised is '1'. Everything else is unrecognised.
I have converted all of the images to black & white only to increase contrast, but I was getting the same result with natural colours.
There must be something simple that I'm missing...
I think that the problem is, that all the other numbers are to wide. On Line 361 all blobs wider than 25% of the total image width get ignored. I would try changing this line from let notToWide = Double(maxX - minX) < Double(imageWidth ) * 0.25
to let notToWide = true
to make sure, that none of the blobs get removed.
Please let me know step by step training process and after training what i have to do(How to implement)