-1
#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);  
};

Compiler is throwing error 'CvTrackers' has not been declared when I compile. The same function when I declare it outside the class the compiler was not throwing any error. But when I make it class member the compiler is throwing error. Guys help me to resolve this error.

berak
  • 39,159
  • 9
  • 91
  • 89
pradeep
  • 48
  • 2
  • 11
  • Could you clarify the function causing the problem please? – Careful Now Feb 19 '16 at 19:08
  • @Daniel Dowd it is causing problem in all the functions that I have mentioned above. "CvTracks::const_iterator ot" is mainly used in for loop for iteration purpose. – pradeep Feb 19 '16 at 20:06

1 Answers1

0

Ok so I looked through the CVBlobs.h file on Github and the iterator used in the for loops in the relevant struct is CvTracks::iterator. I would suggest trying to remove the const_ and see if that works.

Careful Now
  • 260
  • 1
  • 9
  • I have tried as per your suggestion. Its not working. When I declare `int CarOrPerson(long area, float wh, CvTracks::const_iterator ot, int *labelTrack[]);` outside the class compiler will not throw error. But if i declare it within class(class member) in public compiler is throwing error. When I declare or make this particular function as class member compiler is not able to find CvTracks::const_iterator declaration. Can you please tell me the reason for this? – pradeep Feb 22 '16 at 19:52
  • I think the problem is with CvTracks declaration not with const_iterator. – pradeep Feb 22 '16 at 19:54
  • @berak could you please help me to resolve this issue? – pradeep Feb 22 '16 at 21:43