-
Notifications
You must be signed in to change notification settings - Fork 0
/
exp.py
33 lines (29 loc) · 804 Bytes
/
exp.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# import package
from core.Ocr import Ocr
import sys
import cv2
# create OCR instance
x = Ocr()
# x.get_gst_inv_date('images/invoices/batch3/')
products = x.get_data('products','products')
spells = x.get_data('all','all')
x.load_spellings(spells)
# x.lol('images/invoices/batch3')
# x.set_image('images/invoices/more/IMG_20180105_181004896.jpg')
# x.document_detection()
# x.format_doctext()
# x.get_props()
# x.get_products('images/invoices/more', products)
x.get_products_image(sys.argv[1], products)
x.get_gst_inv_date(sys.argv[1])
# cropped = x.get_roi(data1)
# cv2.imwrite("{}.png".format('temp'), cropped)
# x.set_image('temp.png')
# x.text_detection()
# x.get_props()
# x.get_rows()
# x.get_columns()
# x.map_contents()
# cv2.imshow('marked',image)
# cv2.waitKey(0)
# cv2.destroyAllWindows()