for(directory_iterator i(l_path),end_iter; i != end_iter; i++){
string im_name = filename;
//string im_name = i->path().filename().string();
string l_filename = l_path + im_name;
im_name.replace(im_name.begin(),im_name.begin() + 4, string("right"));
string r_filename = r_path + im_name;
Mat lim = imread(l_filename),rim = imread(r_filename);
if(!lim.empty() && !rim.empty()){
l_images.push_back(lim);
r_images.push_back(rim);
}
}
The above crashes on start up and yes the path is there but for some reason it won't run. I have tried this with out the path and it runs. I have no idea what is going wrong. Thanks for any help you can give. below is where i declare it. I am using the latest build of boost and qt creator with open cv to get disparity images for stereo vision, this is what i am using to make the xml file for calibration.
filename = DISTFOLDER + string("stereo_calib.xml");
calib = new calibrator(LEFTFOLDER,RIGHTFOLDER,1.f,5,4,"lImage.png");
calib->calc_image_points(true);
bool done = calib->calibrate();
if(!done){
qDebug("stereo calibration failed");
}
calib->save_info(filename);