質問編集履歴
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -80,7 +80,9 @@
|
|
80
80
|
|
81
81
|
std::vector<string> img_filenames;
|
82
82
|
|
83
|
-
|
83
|
+
std::string output_name2;
|
84
|
+
|
85
|
+
std::string output_filenames;
|
84
86
|
|
85
87
|
|
86
88
|
|
@@ -154,12 +156,6 @@
|
|
154
156
|
|
155
157
|
|
156
158
|
|
157
|
-
|
158
|
-
|
159
|
-
std::string output_filenames;
|
160
|
-
|
161
|
-
|
162
|
-
|
163
159
|
string path_thread2(const char *path){
|
164
160
|
|
165
161
|
cout << "name2: " << path << endl;
|
@@ -184,8 +180,6 @@
|
|
184
180
|
|
185
181
|
void path_thread1(void){
|
186
182
|
|
187
|
-
|
188
|
-
|
189
183
|
cv::Mat input_image[IMG_NUM];
|
190
184
|
|
191
185
|
img_filenames = ListImages(IMG_DIR);
|
@@ -198,9 +192,9 @@
|
|
198
192
|
|
199
193
|
output_filenames = img_filenames[i];
|
200
194
|
|
201
|
-
output_name2 = path_thread2(output_filenames);
|
195
|
+
output_name2 = path_thread2(output_filenames.c_str());
|
202
|
-
|
196
|
+
|
203
|
-
path_thread3(output_name2);
|
197
|
+
path_thread3(output_name2.c_str());
|
204
198
|
|
205
199
|
//input_image[i] = cv::imread(IMG_DIR+img_filenames[i], IMREAD_UNCHANGED);
|
206
200
|
|
@@ -226,22 +220,94 @@
|
|
226
220
|
|
227
221
|
|
228
222
|
|
229
|
-
**
|
223
|
+
**出力**
|
230
224
|
|
231
225
|
```sh
|
232
226
|
|
233
|
-
file.cpp: In function 'void path_thread1()':
|
234
|
-
|
235
|
-
file.cpp:88:9: error: 'output_name2' was not declared in this scope
|
236
|
-
|
237
|
-
|
227
|
+
name2: test_000 2.png
|
238
|
-
|
239
|
-
|
228
|
+
|
240
|
-
|
241
|
-
|
229
|
+
name3: test_000 2.png
|
230
|
+
|
242
|
-
|
231
|
+
name2: test_000.png
|
232
|
+
|
233
|
+
name3: test_000.png
|
234
|
+
|
243
|
-
|
235
|
+
name2: test_001 2.png
|
236
|
+
|
244
|
-
|
237
|
+
name3: test_001 2.png
|
238
|
+
|
245
|
-
|
239
|
+
name2: test_001.png
|
240
|
+
|
241
|
+
name3: test_001.png
|
242
|
+
|
243
|
+
name2: test_002 2.png
|
244
|
+
|
245
|
+
name3: test_002 2.png
|
246
|
+
|
247
|
+
name2: test_002.png
|
248
|
+
|
249
|
+
name3: test_002.png
|
250
|
+
|
251
|
+
name2: test_003 2.png
|
252
|
+
|
253
|
+
name3: test_003 2.png
|
254
|
+
|
255
|
+
name2: test_003.png
|
256
|
+
|
257
|
+
name3: test_003.png
|
258
|
+
|
259
|
+
name2: test_004 2.png
|
260
|
+
|
261
|
+
name3: test_004 2.png
|
262
|
+
|
263
|
+
name2: test_004.png
|
264
|
+
|
265
|
+
name3: test_004.png
|
266
|
+
|
267
|
+
name2: test_005 2.png
|
268
|
+
|
269
|
+
name3: test_005 2.png
|
270
|
+
|
271
|
+
name2: test_005.png
|
272
|
+
|
273
|
+
name3: test_005.png
|
274
|
+
|
275
|
+
name2: test_006 2.png
|
276
|
+
|
277
|
+
name3: test_006 2.png
|
278
|
+
|
279
|
+
name2: test_006.png
|
280
|
+
|
281
|
+
name3: test_006.png
|
282
|
+
|
283
|
+
name2: test_007 2.png
|
284
|
+
|
285
|
+
name3: test_007 2.png
|
286
|
+
|
287
|
+
name2: test_007.png
|
288
|
+
|
289
|
+
name3: test_007.png
|
290
|
+
|
291
|
+
name2: test_008 2.png
|
292
|
+
|
293
|
+
name3: test_008 2.png
|
294
|
+
|
295
|
+
name2: test_008.png
|
296
|
+
|
297
|
+
name3: test_008.png
|
298
|
+
|
299
|
+
name2: test_009 2.png
|
300
|
+
|
301
|
+
name3: test_009 2.png
|
302
|
+
|
303
|
+
name2: test_009.png
|
304
|
+
|
305
|
+
name3: test_009.png
|
246
306
|
|
247
307
|
```
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
#追記
|
312
|
+
|
313
|
+
なぜ出力結果が2個になるのでしょうか?
|