質問編集履歴
2
リンク内容を追加しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -81,3 +81,7 @@
|
|
81
81
|
繰り返ししたいのが、計算手法などでなく、画像だからエラーが出るのでしょうか
|
82
82
|
|
83
83
|
エラーの解決方法をどなたか教えてください。
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
[リンク内容](https://code-graffiti.com/opencv-template-matching-in-python/)
|
1
エラーコードを修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
def draw_window(x, y, dy):
|
30
30
|
|
31
|
-
templates_roi = template[
|
31
|
+
templates_roi = [template[y:y+50, x:x+50],template[y+dy:y+dy+50,x:x+50]]
|
32
32
|
|
33
33
|
for r in templates_roi:
|
34
34
|
|
@@ -70,14 +70,14 @@
|
|
70
70
|
|
71
71
|
File "<stdin>", line 1, in <module>
|
72
72
|
|
73
|
-
|
73
|
+
template_roi = eval(r)
|
74
74
|
|
75
|
-
templates_roi = template['[y:y+50, x:x+50]','[y+dy:y+dy+50,x:x+50]']
|
76
|
-
|
77
|
-
|
75
|
+
TypeError: eval() arg 1 must be a string, bytes or code object
|
78
76
|
|
79
77
|
```
|
80
78
|
|
81
79
|
|
82
80
|
|
83
|
-
|
81
|
+
繰り返ししたいのが、計算手法などでなく、画像だからエラーが出るのでしょうか
|
82
|
+
|
83
|
+
エラーの解決方法をどなたか教えてください。
|