Create test_image.py
This commit is contained in:
1 parent
d40de8063a
commit
3ef4065b7b
1 file changed
+7
@@ -0,0 +1,7 @@
|
|||||||
|
import cv2
|
||||||
|
import pytesseract
|
||||||
|
|
||||||
|
def extract_image_content(path):
|
||||||
|
pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe'
|
||||||
|
img = cv2.imread(path)
|
||||||
|
return pytesseract.image_to_string(img)
|
||||||
Reference in new issue
Block a user