回答編集履歴
3
a
test
CHANGED
@@ -60,11 +60,17 @@
|
|
60
60
|
|
61
61
|
|
62
62
|
|
63
|
+
cv2.circle(img, tuple(approx_contour[1][0]), 3, (255, 0, 0), -1)
|
64
|
+
|
65
|
+
cv2.imwrite("img.png", img)
|
66
|
+
|
67
|
+
|
68
|
+
|
63
|
-
|
69
|
+
w, h = 500, 690 # 長方形の大きさ
|
64
70
|
|
65
71
|
points1 = approx_contour.astype(np.float32)
|
66
72
|
|
67
|
-
points2 = np.float32([[
|
73
|
+
points2 = np.float32([[0, h], [0, 0], [w, 0], [w, h]])
|
68
74
|
|
69
75
|
|
70
76
|
|
@@ -88,4 +94,4 @@
|
|
88
94
|
|
89
95
|
|
90
96
|
|
91
|
-
![イメージ説明](
|
97
|
+
![イメージ説明](fc009978e1603cea0643ef100e75472f.png)
|
2
d
test
CHANGED
File without changes
|
1
d
test
CHANGED
@@ -85,3 +85,7 @@
|
|
85
85
|
cv2.imwrite("result.png", dst)
|
86
86
|
|
87
87
|
```
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
![イメージ説明](d4c1cb94f62f0dcd1b0aa164b93827ad.png)
|