- transform mark six ticket
- OCR
- extract important information
- stores on server
- notify after draw result is released
- iOS - Swift
- Cocoapods
- OpenCV
- Tesseract
Test Code
var image = originalImage!.image
var greyScaleImage = MarkSixOpenCV.filterBlackColor(image);
convertedImage!.image = greyScaleImage as UIImage;
let tesseract = Tesseract(language: "eng");
tesseract.delegate = self;
tesseract.setVariableValue("0123456789+$ABCDEFGHIJKLMNOPQRSTUVXYZ.", forKey: "tessedit_char_whitelist") //limit search
tesseract.image = image; //image to check
tesseract.recognize();
NSLog("Before grey %@", tesseract.recognizedText!);
tesseract.image = greyScaleImage; //image to check
tesseract.recognize();
NSLog("After grey %@", tesseract.recognizedText!);
Before Greyscale
2014-10-11 11:09:38.765 MarkSixOCR[10272:160716] Before grey 0. 0E.R1QF03$$1 ISLVA 01
000.0E
Z1E3E$E E$Z$3 MM 30 901010 P1CK
3L1$35MDI0VV N00 095
7+8+13+14+15+46
I 1+ 19+24+42+43+45
R $$ 3 E UNI 300 $10.00
75 TOI3I $20.00
L1 14513851613 16AUG14
77.7. 00000
0711009 136F
02090 324EE Z2DA9 S4F3
DYLDEUUL1L9AU6C8I.E57I.I.D2 0
IHIIIIIIIHIIIINNNIIIINIHIMM0
0 6
After Greyscale
2014-10-11 11:09:37.122 MarkSixOCR[10272:160716] After grey E$H$ R 1 $ V3E3 M IVNVA 14.1
X J11E141 1155 LHNE1
11LQ $55 $EEE MMK $1 MK PM
E.JI 3$ 1 DUIVV $ 12 U95
7 +3+13 F14+15+46
I.L+19+24+42+43+45
13$ UM F331 $10.CQ
5753 E HM E20.00
14 E35165 ..6AUG14
V J 07 M19 13F 7
53 1 0120.3 324EE ADA9 54F3
UTLUEUT I19AU65E .E571.1.D2
NIN II1II1HI1$1 EINNMM
KIIIMEE1IBIIII.1.1 JHH IIIIIIM1
M .M E I