spurious parse error in opencv_createsamples (Bug #3892)
Description
It seems like opencv_createsamples spits out a parse error every time it hits an end of file,
even if everything is ok and the sample file has been created correctly.
Its not really a bug i guess but its confusing esp. for those just starting to use the opencv_traincascade functions - when debugging you think the parse error is screwing things up when in fact that's ok and the problem is elsewhere.
jeremy@jrr:~/Dropbox/projects/clothing_recognition/code/haar$ ./generateTrainingFiles.sh
Info file name: dressPantsPositives.txt
Img file name: (NULL)
Vec file name: 002/dressPantsvecfile.vec
BG file name: (NULL)
Num: 1000
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 1.1
Max y angle: 1.1
Max z angle: 0.5
Show samples: FALSE
Width: 24
Height: 24
Create training samples from images collection...
dressPantsPositives.txt(421) : parse errorDone. Created 583 samples
that last line has the annoying parse error .
Associated revisions
Merge pull request #3892 from MSOpenTech:imgcodecs-contrib
History
Updated by Andrey Pavlenko over 10 years ago
- Assignee deleted (
Vadim Pisarevsky)
Updated by Andrey Pavlenko over 10 years ago
- Category changed from core to samples
Updated by Steven Puttemans over 10 years ago
I can tell you exactly why this is happening. Your data set only contains 583 samples. However since you use the standard parameters, the number of samples is said to 1000.
You somehow edited the outputting interface because if you run the program without parameters you would see:
[-num <number_of_samples = 1000>]
So basically you create a loop of 1000 steps but you only have 583 files to read from the file. This generates the error, to make sure you know you did something wrong. However the loop is just ended then so that you don't loose the created result.
This can be cancelled.
- Status changed from New to Cancelled