summaryrefslogtreecommitdiff
path: root/ocr/image_demo.py
diff options
context:
space:
mode:
Diffstat (limited to 'ocr/image_demo.py')
-rw-r--r--ocr/image_demo.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ocr/image_demo.py b/ocr/image_demo.py
new file mode 100644
index 0000000..a9d9a6a
--- /dev/null
+++ b/ocr/image_demo.py
@@ -0,0 +1,12 @@
+import pytesseract
+from PIL import Image
+
+img = Image.open('./data/2.jpg')
+
+
+# text = pytesseract.image_to_string(img, lang='eng')
+text = pytesseract.image_to_string(img, lang='chi_sim')
+
+
+print(text)
+