diff options
| author | chzhang <zch921005@126.com> | 2022-11-05 19:36:49 +0800 |
|---|---|---|
| committer | chzhang <zch921005@126.com> | 2022-11-05 19:36:49 +0800 |
| commit | 24da1a1db479f26d2b854102d817baf4fa412b6e (patch) | |
| tree | 9980388a299290c5b976599515ab27320051da55 /ocr/image_demo.py | |
| parent | 1b105470efecf90fe1a7e153191835cf0c4dfb19 (diff) | |
stable diffusion 01
Diffstat (limited to 'ocr/image_demo.py')
| -rw-r--r-- | ocr/image_demo.py | 12 |
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) + |
