質問編集履歴
1
コードの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -40,9 +40,7 @@
|
|
40
40
|
|
41
41
|
for i, f in enumerate(files):
|
42
42
|
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
#1枚目の画像読み込み
|
46
44
|
|
47
45
|
img_0 = cv2.imread(f, cv2.IMREAD_GRAYSCALE)
|
48
46
|
|
@@ -72,6 +70,8 @@
|
|
72
70
|
|
73
71
|
cv2.imwrite(save_path, img_sad)
|
74
72
|
|
73
|
+
|
74
|
+
|
75
75
|
コード
|
76
76
|
|
77
77
|
```
|
@@ -80,13 +80,23 @@
|
|
80
80
|
|
81
81
|
エラー
|
82
82
|
|
83
|
-
|
83
|
+
TypeError Traceback (most recent call last)
|
84
84
|
|
85
|
-
|
85
|
+
<ipython-input-22-a23488329142> in <module>
|
86
86
|
|
87
|
-
|
87
|
+
16 img_0 = img_0.astype(int)
|
88
88
|
|
89
|
+
17 #2枚目の画像読み込み
|
90
|
+
|
91
|
+
---> 18 F=f+1
|
92
|
+
|
93
|
+
19 img_1 = cv2.imread(F, cv2.IMREAD_GRAYSCALE)
|
94
|
+
|
95
|
+
20 img_1 = img_0.astype(int)
|
96
|
+
|
97
|
+
|
98
|
+
|
89
|
-
|
99
|
+
TypeError: must be str, not int
|
90
100
|
|
91
101
|
|
92
102
|
|
@@ -100,7 +110,7 @@
|
|
100
110
|
|
101
111
|
出力結果
|
102
112
|
|
103
|
-
./in\
|
113
|
+
./in\1.JPG
|
104
114
|
|
105
115
|
コード
|
106
116
|
|