-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from shaoshenchen/dev
新增截屏识别功能
- Loading branch information
Showing
13 changed files
with
254 additions
and
171 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
PySide2 | ||
paddlepaddle-gpu | ||
pycorrector | ||
tqdm | ||
paddleocr | ||
pyperclip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |