createsample.exe crashes every time

asked 2016-06-27 12:29:18 -0600

Fixus gravatar image

Hi I am trying to create samples using opencv_createsamples.exe but it crashes every time. I've checked different builds, opencv2 and opencv3. I don't know how to overcome this. My command looks like this

opencv_createsamples.exe -img C:/Users/dpach/Pictures/Interfejsy/img/1.jpg -maxxangle 15 -maxyangle 15 -maxzangle 1 -w 80 -h 40 -vec test.vec -bgtresh 0 -bgcolor 0 -show

The windows to show samples is opening but after that I receive info that program is not responding. Any ideas ?

I've tried to start it from a pseudo unix bash and I receive then Segmentation fault

It crush after that Create training samples from single image applying distortions...

edit retag flag offensive close merge delete

Comments

1

i can't help you with the crash, but the idea of using a single image for this is doomed anyway (you won't get any quality out of it).

get a proper amount of positives (like in hundreds), and use an info file (image path Rect1 Rect2 ..) instead.

berak gravatar imageberak ( 2016-06-27 12:42:10 -0600 )edit

@break I've tried to prepare such file but every time I receive parse error. My file is a simple textfile where each file is in one line. Is that corret ?

Fixus gravatar imageFixus ( 2016-06-28 01:09:34 -0600 )edit

should look like:

c:/img/img1.jpg  1  140 100 45 45
c:/img/img2.jpg  2 100 200 50 50 50 30 25 25

please see here

berak gravatar imageberak ( 2016-06-28 01:20:55 -0600 )edit

@break how to create such file ? I mean that as far as I understand the numbers are: numer of objects on the image, coordinates of the object. How to get such coordinates ? If i have 100 pictures for example I need to manualy find those coordinates and type them in the file ?

Fixus gravatar imageFixus ( 2016-06-29 03:51:08 -0600 )edit
1

there is an annotation tool in opencv/apps, that does exactly that.

start it on the images dir, mark your objects with mouse, and it produces a text file.

berak gravatar imageberak ( 2016-06-29 03:55:19 -0600 )edit

Take a look at the following question which already describes quite detailed how to use the annotation tool! Good luck!

StevenPuttemans gravatar imageStevenPuttemans ( 2016-06-30 06:41:45 -0600 )edit