I am trying to create samples through createsamples.exe. But I am able to generate samples for smaller value of num (num< 20). It crashes for higher values(num>20). I am running this utility with these args:
-vec "D:\train.vec" -img "D:\object.png" -bg "D:\files.txt" -maxxangle 0 -maxyangle 0 -maxzangle 0 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 4960 -h 3506 - num 50
object.png is of 4644*342 size in pixels.
I am getting this exception:
Unhandled exception at 0x000000013FCBB284 in opencv_createsamples.exe: 0xC0000005: Access violation reading location 0x0000000002AB4000.
While debugging, getting exception in line no. (340 or 345) in cvsamples.cpp inside function void cvWarpPerspective( CvArr* src, CvArr* dst, double quad[4][2] ). The value of src_step at the time of exception is 4644.
if( isrc_x >= 0 && isrc_x <= src_size.width && //line no. 337 isrc_y >= -1 && isrc_y < src_size.height ) //line no. 338 { i01 = s[src_step]; // line no. 340 }
if( isrc_x >= -1 && isrc_x < src_size.width && // line no.342 isrc_y >= -1 && isrc_y < src_size.height ) // line no. 343 { i11 = s[src_step+1]; // line no. 345 }
It is also giving the same exception when giving non zero values of max?angle. Is there any issue in the way I am using this utility or is there any issue with the code? Using OpenCv 2.4.9 (src code 30th March build with TBB).
Thanks for any help!!