Error “Train dataset for temp stage can not be filled.” while using traincascade tool of OpenCV

前端 未结 10 1108
灰色年华
灰色年华 2020-12-16 20:35

I\'m building the opencv_traincascade.exe tool from source code (OpenCV 2.4.0) using vs2010 on windows 7. I want to train a LBP classifier, so I\'m using opencv_traincascade

10条回答
  •  没有蜡笔的小新
    2020-12-16 20:45

    I hope to close this question. For those who stumbled over this as well. I know its old. I debugged the traincascade and found, that at some point the following line:

    src = imread( imgFilenames[last++], CV_LOAD_IMAGE_GRAYSCALE );
    

    returns a null mat. This line should read the background images.

    This bug occures, if you build traincascade.cpp as debug and are using the release libs and dlls of opencv. (The other way around shouldn't work as well.

提交回复
热议问题