diff --git a/utils/ocr.py b/utils/ocr.py index 1742bca..91649a9 100644 --- a/utils/ocr.py +++ b/utils/ocr.py @@ -6,7 +6,6 @@ from pytesseract import Output # img_source = cv2.VideoCapture(0) - def get_grayscale(image): return cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) @@ -63,7 +62,7 @@ def identy_char(img_path=None, img_source=None): ''' ident_char = None - if img_path != None and img_source.any() == None: + if img_path != None and img_source == None: source_img = cv2.imread(img_path) elif img_path == None and img_source.any() != None: @@ -86,6 +85,6 @@ def identy_char(img_path=None, img_source=None): if __name__ == "__main__": # identy_char('./img.png') - source_img = cv2.imread('./img.png') - print(identy_char(img_source=source_img)) - # print(identy_char('./coffee-ocr.jpg')) \ No newline at end of file + # source_img = cv2.imread('./img.png') + # print(identy_char(img_source=source_img)) + print(identy_char('./coffee-ocr.jpg')) \ No newline at end of file