回答編集履歴
2
d
answer
CHANGED
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
binary, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE
|
|
32
32
|
)
|
|
33
33
|
|
|
34
|
-
# 小さい輪郭を削除
|
|
35
34
|
rects = []
|
|
36
35
|
for cnt in contours:
|
|
37
36
|
if cv2.contourArea(cnt) < 100:
|
1
d
answer
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
```python
|
|
12
12
|
from pathlib import Path
|
|
13
13
|
|
|
14
|
-
import matplotlib.pyplot as plt
|
|
15
|
-
import
|
|
14
|
+
import cv2
|
|
16
15
|
|
|
17
16
|
# 画像を読み込む。
|
|
18
17
|
img = cv2.imread("sample.jpg")
|