OpenCV 3.1 cratesamples
I'm trying to create a .vec file with 1200 samples as the following:
C:\opencv3\build\install\x64\vc12\bin>opencv_createsamplesd -vec vec.vec -bg tl_neg_2.txt -info tl_pos_vec_2\filenames.txt -num 1200 -maxxangle 0.1 -maxyangle 0.1 -maxzangle 0 -w 24 -h 24
EDIT: The tl_neg_2.txt (1200 objects):
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-0.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-1.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-2.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-3.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-4.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-5.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-6.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-7.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-8.jpg
C:\opencv3\build\install\x64\vc12\bin\tl_neg\neg-9.jpg
...
The tl_pos_vec_2\filenames.txt (27 objects):
0.jpg 1 0 0 40 40
1.jpg 1 0 0 40 40
10.jpg 1 0 0 40 40
11.jpg 1 0 0 40 40
12.jpg 1 0 0 40 40
13.jpg 1 0 0 40 40
14.jpg 1 0 0 40 40
15.jpg 1 0 0 40 40
16.jpg 1 0 0 40 40
17.jpg 1 0 0 40 40
18.jpg 1 0 0 40 40
19.jpg 1 0 0 40 40
2.jpg 1 0 0 40 40
20.jpg 1 0 0 40 40
21.jpg 1 0 0 40 40
22.jpg 1 0 0 40 40
23.jpg 1 0 0 40 40
24.jpg 1 0 0 40 40
25.jpg 1 0 0 40 40
26.jpg 1 0 0 40 40
3.jpg 1 0 0 40 40
4.jpg 1 0 0 40 40
5.jpg 1 0 0 40 40
6.jpg 1 0 0 40 40
7.jpg 1 0 0 40 40
8.jpg 1 0 0 40 40
9.jpg 1 0 0 40 40
I get:
Info file name: tl_pos_vec_2\filenames.txt
Img file name: (NULL)
Vec file name: vec.vec
BG file name: tl_neg_2.txt
Num: 1200
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 0.1
Max y angle: 0.1
Max z angle: 0
Show samples: FALSE
Width: 24
Height: 24
Max Scale: -1
Create training samples from images collection...
tl_pos_vec_2\filenames.txt(28) : parse errorDone. Created 27 samples
So instead of 1200 samples I get a .vec file containing only 27, what should I do to fix this problem?
Thank you, Dan.
so, it did not find your negatives. try an absolute path for the images in the text file.
Ok, I did that, But I still get the same result
"tl_pos_vec_2\filenames.txt(28) : parse errorDone. Created 27 samples"
well, .... there is something weird on line 28.
also, please use single forward, not backward slashes.
I posted the whole filenames text file, there is no 28th line.
it might be something, you don't see (in your editor)
I viewed the file with Visual Studio and there is no line but the 27th. BTW, I use opencv_createsamplesd which seems a bit weird not like in the previous 2.3.14 version where it was opencv_createsamples
the d at the end means, you're using the debug version
Could it help if I build OpenCV in the release version?
unlikely. the debug version is the same code. your problems are unrelated.