您当前的位置: 首页 >  opencv
  • 1浏览

    0关注

    483博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

从OpenCV源码了解traincascade训练报错:Train dataset for temp stage can not be filled.

高精度计算机视觉 发布时间:2018-08-17 22:52:34 ,浏览量:1

如果你在测试trainCascade时,资料目录没有放在项目目录中,很有可能触发下面的报错:

Train dataset for temp stage can not be filled.

我们很容易定位这个错误的来源,在cascadeClassifier.cpp中


bool CvCascadeClassifier::train( const string _cascadeDirName,
                                const string _posFilename,
                                const string _negFilename,
                                int _numPos, int _numNeg,
                                int _precalcValBufSize, int _precalcIdxBufSize,
                                int _numStages,
                                const CvCascadeParams& _cascadeParams,
                                const CvFeatureParams& _featureParams,
                                const CvCascadeBoostParams& _stageParams,
                                bool baseFormatSave,
                                double acceptanceRatioBreakValue )
{
    ...
    for( int i = startNumStages; i < numStages; i++ )
    {
        cout             
关注
打赏
1661664439
查看更多评论
0.3539s