I am trying to run the following command in my VB Code terminal
C:\Ankit\VirEnv\opencv\build\x64\vc14\bin\opencv_createsamples.exe -info C:\Ankit\VirEnv\pos.txt -w 20 -h 20 -num 1000 -vec pos.vec
my pos.txt file looks like this
My output
Info file name: C:\Ankit\VirEnv\pos.txt
Img file name: (NULL)
Vec file name: pos.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
Max z angle: 0.5
Show samples: FALSE
Width: 20
Height: 20
Max Scale: -1
RNG Seed: 12345
Create training samples from images collection...
Unable to open image: C:\Ankit\VirEnv\C:\Ankit\VirEnv\Test\Positive\opencv_frame_0.png
OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(3.4.16) Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in cv::Mat::Mat, file C:\build\3_4_winpack-build-win64-vc14\opencv\modules\core\src\matrix.cpp, line 751
But I get this error:
OpenCV(3.4.16) Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in cv::Mat::Mat, file C:\build\3_4_winpack-build-win64-vc14\opencv\modules\core\src\matrix.cpp, line 751
I don't know what is wrong, as far I know the file created using opencv_annotation has all the right bounding rectangle coordinates still the error shows up. I am using following this video This link and this open cv documentation https://docs.opencv.org/3.4/dc/d88/tutorial_traincascade.html