- .vscode/launch.json +12 -12
- main.py +1 -1
.vscode/launch.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "0.2.0",
|
| 3 |
+
"configurations": [
|
| 4 |
+
{
|
| 5 |
+
"name": "Python Debugger: Current File",
|
| 6 |
+
"type": "debugpy",
|
| 7 |
+
"request": "launch",
|
| 8 |
+
"program": "${file}",
|
| 9 |
+
"console": "integratedTerminal"
|
| 10 |
+
}
|
| 11 |
+
]
|
| 12 |
+
}
|
main.py
CHANGED
|
@@ -166,7 +166,7 @@ def ocr(img):
|
|
| 166 |
lines = blk.lines
|
| 167 |
results.append( { "text": text, "lines":lines } )
|
| 168 |
for line in blk.lines:
|
| 169 |
-
img_draw = cv2.rectangle(img_draw, line[0], line[
|
| 170 |
|
| 171 |
|
| 172 |
return results, img_draw
|
|
|
|
| 166 |
lines = blk.lines
|
| 167 |
results.append( { "text": text, "lines":lines } )
|
| 168 |
for line in blk.lines:
|
| 169 |
+
img_draw = cv2.rectangle(img_draw, line[0], line[2], (0, 0, 255), 2) # 在一行坚排文字的左边画一条红线
|
| 170 |
|
| 171 |
|
| 172 |
return results, img_draw
|