OpenCV: how to create .vec file to use with opencv_traincascade

前端 未结 2 1410
花落未央
花落未央 2020-12-20 00:10

As I explained in my previous post here, I am trying to generate some cascade.xml files to recognize euro coins to be used in my iOS app. Anyway, I am founding

2条回答
  •  轮回少年
    2020-12-20 00:51

    I've used the negative samples database of the INRIA training http://pascal.inrialpes.fr/data/human/

    and this input (png with alpha transparency around the coin):

    using this with this command:

    opencv_createsamples -img pos_color.png -num 10 -bg neg.txt -info test.dat -maxxangle 0.6 -maxyangle 0 -maxzangle 0.3 -maxidev 100 -bgcolor 0 -bgthresh 0

    produces output like this:

    so background color obviously didn't work. Converting to grayscale in the beginning however gives me this input:

    and same command produces output like this:

    I know this is no answer to all of your questions, but maybe it still helps.

提交回复
热议问题