I'm working on some OpenCV code and developed it in VS 2008 on windows. I'm trying to run the code on Linux with g++ but I get the error "Cannot call constructor 'ImageProcessor::ImageProcessor' directly" for ImageProcessor and all of the other classes I have created. I've attempted to find a way to indirectly call the constructor, but to no avail. Any suggestion would be great. The code compiles and runs fine on Windows.
if (x == 1){
cout <<"MODE SELECTED: IMAGE TESTING \n";
ImageProcessor* IP = new ImageProcessor;
LaneDetector* LD = new LaneDetector;
LaneInfo* LI1 = new LaneInfo;
LaneInfo* LI2 = new LaneInfo;
LaneVector* LV = new LaneVector;
cvNamedWindow("Window",CV_WINDOW_AUTOSIZE);
IplImage* temp = 0;
IplImage* img0 = 0;
img0 = cvLoadImage(PICTURE_INPUT);
CvRect r = cvRect(0,((img0->height)/3),img0->width,((img0->height)/3)+20);
cout <<"IMG0 LOADED \n";
while(1){
IP->ImageProcessor::ImageProcessor(img0, r);
temp = IP->ImageProcessor::get_processed_image();
LD->LaneDetector::LaneDetector(temp,r);
LD->LaneDetector::find_edges();
LI1 = LD->LaneDetector::find_lanes(5);
LI2 = LD->LaneDetector::find_lanes(25);
LV->LaneVector::LaneVector(LI1,LI2);
LV->LaneVector::print_lane_angle_info();
if( (cvWaitKey(20) & 255) == 27 ) break;
cvShowImage("Window", temp);
hold(1);
}
}