createsamples generate bus error

asked 2018-03-14 05:48:46 -0600

TheDelta gravatar image

updated 2018-03-15 18:15:14 -0600

Hello !

I'm using OpenCV 3.4.1, compiled on Ubuntu 17.10.
I try to reproduce tutorial, but when i launch opencv_createsamples -img watch5050.jpg -bg bg.txt -info info/info.lst -pngoutput info -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 1950, i get this output :

Info file name: info/info.lst
Img file name: watch5050.jpg
Vec file name: (NULL)
BG file name: bg.txt
Num: 1950
BG color: 0
BG threshold: 80
Invert: FALSE
Max intensity deviation: 40
Max x angle: 0.5
Max y angle: 0.5
Max z angle: 0.5
Show samples: FALSE
Width: 24
Height: 24
Max Scale: -1
RNG Seed: 12345
Create test samples from single image applying distortions...
Open background image: neg/78.jpg
Erreur du bus (core dumped)

I search for hours on google, stack overflow, github issues, and didn't find any solution. So , i would appreciate any assistance on this matter, thank you !

EDIT: After hours and hours of research, grabbing libs and compiling over and over, my litte brother and I found the solution : the problem came from the bg.txt. We don't know why, but re-typing the file solved everything.
Note that the two files are now identic... but one work and not the other one.

edit retag flag offensive close merge delete

Comments

  • there were indeed bugs related to this, can you try to update to latest master ?
  • idk, what kind of object you're trying with, but that method of "synthesizing" a lot of images from a single one never works with objects in the real world.
berak gravatar imageberak ( 2018-03-14 05:52:56 -0600 )edit

I'm already on the latest version of opencv : just compiled yesterday from the git repo. The object, as in the tutorial, is a watch.

TheDelta gravatar imageTheDelta ( 2018-03-14 06:08:17 -0600 )edit

better get a few hundred real images of that. small variations in lighting / backgound.

(that tutorial is somewhat a lie, you'll see yourself. (or scroll to the bottom, where he can't detect his watch))

berak gravatar imageberak ( 2018-03-14 06:33:31 -0600 )edit