opencv_createsamples makes a square white background around image [closed]
I have the following image that I want to detect:
After running following command:
opencv_createsamples -img banana.png -bg bg.txt -info info/info.txt -pngoutput info -maxxangle 0.5 -maxyangle 0.5 -maxzangle 0.5 -num 1950
It creates the image:
As it can be seen there is a white background around banana. Does anybody knows how to remove it?
forget the idea of "synthesizing" positive images, entilrey, it never works in the real world.
you need a few hundred real world images of your object. (also "real world" negatives).
then, the whole idea of training cascades is somewhat deprecated (use deep learning instead), and current opencv does no more come with tools to train that.
oh, and opencv NEVER respects transparency in images. avoid those for computer-vision, as good as you can !