Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增截屏识别功能 #1

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)