SwiftOCR icon indicating copy to clipboard operation
SwiftOCR copied to clipboard

After training, can only recognise number '1'

Open CarterMiller opened this issue 7 years ago • 2 comments

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...

CarterMiller avatar May 18 '17 11:05 CarterMiller

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.

NMAC427 avatar May 29 '17 16:05 NMAC427

Please let me know step by step training process and after training what i have to do(How to implement)

karthikloganathan avatar Jun 15 '17 05:06 karthikloganathan