fix: bug
This commit is contained in:
parent
024e3ba029
commit
2bd4f1ec89
|
@ -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'))
|
||||
# source_img = cv2.imread('./img.png')
|
||||
# print(identy_char(img_source=source_img))
|
||||
print(identy_char('./coffee-ocr.jpg'))
|
Loading…
Reference in New Issue