-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
53 lines (47 loc) · 1018 Bytes
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# import build.libexample
import build.sealnet_align
import cv2
import numpy as np
import json
ss = {
"la":False,
"mu":True,
"x": 83.8255813953487,
"y": 728.8168604651161,
"rect": [
154.0,
-119.0,
325.6133720930233,
10.0
],
"rotation": 0,
"text": "测试专用章",
"type": 2,
"sequence": "从左到右",
"l": 325.6133720930233,
"h": 97
}
# ss2 = {
# "la":True,
# "mu":False,
# "x": 11.64244186046517,
# "y": 328.3168604651162,
# "rect": [
# 95.0,
# -219.0,
# 584.0755813953488,
# 584.0755813953488
# ],
# "rotation": 0,
# "text": "郑州大学档案项目组测试专用章",
# "sequence": "从左到右",
# "type": 5,
# "startAngle": 5152,
# "spanAngle": 4112,
# "a": 292.0377906976744,
# "b": 292.0377906976744,
# "h": 154
# }
image = cv2.imread("image.png")
result = build.sealnet_align.align(image,ss)
cv2.imwrite("result.png",result)