質問編集履歴
1
コード中で問題個所を提示
test
CHANGED
File without changes
|
test
CHANGED
@@ -38,9 +38,9 @@
|
|
38
38
|
|
39
39
|
contours, _ = cv2.findContours(img_bw.astype(np.uint8), cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
|
40
40
|
|
41
|
-
img_contour = cv2.drawContours(img, contours, -1, (0,0,255), 5)
|
42
41
|
|
43
42
|
|
43
|
+
'--------問題個所--------'
|
44
44
|
|
45
45
|
##一番大きい面積をとりだす
|
46
46
|
|
@@ -62,8 +62,10 @@
|
|
62
62
|
|
63
63
|
#エッジの書き込み
|
64
64
|
|
65
|
-
img_contour = cv2.drawContours(img
|
65
|
+
img_contour = cv2.drawContours(img, maxcontour, -1, (0,255,0), 5)
|
66
66
|
|
67
67
|
cv2.imwrite('counter.jpg', img_contour)
|
68
68
|
|
69
|
+
'-----------------------'
|
70
|
+
|
69
71
|
```
|