Skip to content

Commit

Permalink
Merge pull request #1 from shaoshenchen/dev
Browse files Browse the repository at this point in the history
新增截屏识别功能
  • Loading branch information
fiyen authored Dec 3, 2021
2 parents eaf281f + 89b260e commit 35a3997
Show file tree
Hide file tree
Showing 13 changed files with 254 additions and 171 deletions.
Binary file modified doc/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file modified doc/__pycache__/block.cpython-37.pyc
Binary file not shown.
Binary file modified doc/__pycache__/box_widget.cpython-37.pyc
Binary file not shown.
Binary file modified doc/__pycache__/doc.cpython-37.pyc
Binary file not shown.
Binary file modified doc/__pycache__/document.cpython-37.pyc
Binary file not shown.
Binary file modified doc/__pycache__/globalvars.cpython-37.pyc
Binary file not shown.
Binary file modified doc/__pycache__/page.cpython-37.pyc
Binary file not shown.
Binary file modified doc/__pycache__/test.cpython-37.pyc
Binary file not shown.
Binary file modified doc/__pycache__/textblock.cpython-37.pyc
Binary file not shown.
409 changes: 238 additions & 171 deletions doc/doc.py

Large diffs are not rendered by default.

Binary file added images/capture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions requirements
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
PySide2
paddlepaddle-gpu
pycorrector
tqdm
paddleocr
pyperclip
13 changes: 13 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from PIL import ImageGrab
from paddleocr import PaddleOCR
import numpy as np

# RGBA to RGB
img = ImageGrab.grabclipboard().convert('RGB')
img_ndarray = np.array(img)
ocr = PaddleOCR(use_angle_cls=True, lang="ch", use_gpu=False)
result = ocr.ocr(img_ndarray, cls=True)
text = result[0][1][0]
print(text)
# for line in result:
# print(line)

0 comments on commit 35a3997

Please sign in to comment.