if (fs::exists(cmRoot / "sfm_data.bin") && !fs::exists(reconstructionPath)){
throwstd::runtime_error("No json found, please use openMVG_main_ConvertSfM_DataFormat with the bin to create the json file");
}
if (!fs::exists(cmRoot / "sfm_data.bin") && !fs::exists(reconstructionPath)){
throwstd::runtime_error("No project files found, please check the file path for sfm_data.json or sfm_data.bin");
}
if (fs::exists(cmRoot / "cloud_and_poses.ply") && !fs::exists(colorPointCloud)){
throwstd::runtime_error("No colorized.ply found, cloud_and_poses found, please run openMVG_main_ComputeSfM_DataColor and name the output colorized.ply");
}
if (!fs::exists(cmRoot / "cloud_and_poses.ply") && !fs::exists(colorPointCloud)){
throwstd::runtime_error("No project files found, please check the file path for sfm_data.json or sfm_data.bin");
}
std::ifstream f(reconstructionPath.string());
json data = json::parse(f);
f.close();
std::string image_root_path = data["root_path"];
std::cout << "Images should be in :" << image_root_path << std::endl;