Development of the ocr part of AOI
Samo Penic
2018-11-16 0436f6a7caac71fc119c6e70a8b0cd1a8fe1f9d7
commit | author | age
e555c0 1 from Ocr import Paper
02e0f7 2 from sklearn.externals import joblib
e555c0 3
762a5e 4
0436f6 5 settings = {"sid_mask": "11xx0xxx", "answer_treshold": 0.25}
SP 6 classifier = joblib.load("filename.joblib")
e555c0 7
0436f6 8 #p = Paper(filename="testpage300dpi_scan1.png")
762a5e 9 p=Paper(filename='sizif111.tif', sid_classifier=classifier, settings=settings)
0436f6 10 # p=Paper(filename='processed_scans/20141016095134535_0028.tif')
02e0f7 11
0436f6 12 # print(p.QRData)
SP 13 # print(p.errors)
e555c0 14
0436f6 15 # print(p.getSkewAngle())
SP 16 # print(p.locateUpMarkers())
17 # print(p.locateRightMarkers())
18 # print(p.answerMatrix)
19 # p.get_enhanced_sid()
20
21
22 print(p.get_paper_ocr_data())