错误:'CvTrackers'尚未申报

时间:2016-02-19 18:06:14

标签: c++ cvblobslib

#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <cvblob.h>

#include <iostream>
using std::string;
#include <cstdlib>


class ImageProcessing
{
//  ImageProcessing* ImgPtr;
    private:

    IplImage *img0, *img1;
    IplImage* ReducImg;
    IplImage* ReducImgColor;
    CvSize imgSize;

    CvPoint C1,C2;

    public:

    friend class CarVideoHandler;
    ImageProcessing(void);
    ~ImageProcessing(void);

    void checkZone(CvTracks::const_iterator ot, double position1, double position2, int **T1,int **T2,int **T3,int **T4, int &numCars, int dire, int p, string type,string dc, string dp);
    void checkZoneOneLine(CvTracks::const_iterator ot, double position1, int **T1,int **T2, int &numCars, int dire, int p, string type, int **distance,string dc, string dp);
    int CarOrPerson(long area, float wh, CvTracks::const_iterator ot, int *labelTrack[]);
    string idTrackCarPerson(IplImage *colourImage1, int *labelTrack[],  CvBlobs::const_iterator it, CvTracks::const_iterator ot, int percent, double lin, double position1, double position2, CvFont font, char* wow, int **T1, int **T2, int **T3, int **T4, int &numCars, int &numPersons, int *Xx, int *Xy, int *Yx, int *Yy, int *dire, int n, int m, int p,string dc, string dp);  
};

编译时抛出错误'CvTrackers'在编译时尚未声明。当我在类外面声明它时,编译器没有抛出任何错误。但是当我使它成为类成员时,编译器会抛出错误。伙计们帮我解决了这个错误。

1 个答案:

答案 0 :(得分:0)

好的,我查看了Github上的CVBlobs.h文件,相关结构中for循环中使用的迭代器是CvTracks :: iterator。我建议尝试删除const_并查看是否有效。