I create positive samples to get classificator through opencv_traincascade. I wrote a Python script that iterates through all the positive images and does "opencv_createsamples" command on them. Everything works fine, there's no error, it looks as the samples are really creating (in terminal, after each command, all parameters are written and 'Done' after them). I run my script with absolute path to project directory as parameter. The "opencv_createsamples" command for one of positive images looks like:
opencv_createsamples -bg /home/path_to_project/project_dir/negatives.txt -num 2 -maxxangle 0.0 -maxyangle 0.0 -maxzangle 0.3 -bgcolor 0 -bgthresh 8 -w 40 -h 40 -img /home/path_to_project/project_dir/positives/18.JPG -info /home/path_to_project/project_dir/samples/info21.txt
That command should create two .jpg files and info21.txt file in 'samples' directory, but it doesn't. If I run exactly that command above separately in terminal (in any directory), it would create files in 'samples' folder. I have no idea why it works alone and doesn't work when it is run from python script.