Hello there,
I'm working a university project which makes use of haarclassifiers. I had been able to call the opencv_createsamples application to generate [num] vector files from a single image in the past. I understand that this method is less accurate for objects that are not rigid but it definitely helps boost the training data have.
My problem is that all of a sudden, whenever I call the opencv_createsamples application and I specify vector name, image name and background collection file, I get an error message from the computer that opencv stating the program has stopped working. When I try to use the debug function, it opens up visual studio and gives the following error:
Unhandled exception at 0x00007FF8D0DC775F (ntdll.dll) in opencv_createsamples.exe: 0xC0000374: A heap has been corrupted (parameters: 0x00007FF8D0E286B0).
I don't understand what I could be doing wrong and would very much appreciate any insight.
Information possibly related
- I am running opencv version 3.3
- I use a windows 64 bit computer
- I call the command on the windows command line interface
- I already setup my environment variables and just calling "opencv_createsamples" shows the usage
- I have previously generated vector files from on single image using this program
- My -w -h is proportional to my cropped images
- I have rebooted a bunch of times
Below is the command I run:
opencv_createsamples.exe -img cropped01.png -num 10 -bg negatives2.txt -vec vector/sampledat.vec -maxxangle 0.6 -maxyangle 0 -maxzangle 0.3 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 30 -h 24
Also, here is the first few lines of negatives2.txt file, this is about a 1000 lines long:
C:\Users\afoge\Documents\Opencv_projects\HaarTrain\neg_images2\IMG_0015.jpg
C:\Users\afoge\Documents\Opencv_projects\HaarTrain\neg_images2\IMG_0016.JPG
C:\Users\afoge\Documents\Opencv_projects\HaarTrain\neg_images2\IMG_0017.JPG
C:\Users\afoge\Documents\Opencv_projects\HaarTrain\neg_images2\IMG_0020.JPG
C:\Users\afoge\Documents\Opencv_projects\HaarTrain\neg_images2\IMG_0037.JPG
C:\Users\afoge\Documents\Opencv_projects\HaarTrain\neg_images2\IMG_0038.JPG
C:\Users\afoge\Documents\Opencv_projects\HaarTrain\neg_images2\IMG_0039.JPG