code/main.cpp
/**
 *Reads the configuration parameters for this program
 *@param cameraMatrix pointer to the camara Matrix to recieve the new data
 *@param distCoeffs pointer to the matrix that will hold the distortion Coefficients
*/
Reads the configuration parameters for this program
@param cameraMatrix pointer to the camara Matrix to recieve the new data
@param distCoeffs pointer to the matrix that will hold the distortion Coefficients
Reads the configuration parameters for this program @param cameraMatrix pointer to the camara Matrix to recieve the new data @param distCoeffs pointer to the matrix that will hold the distortion Coefficients
void readConfigParams(std::string *method, std::string *matcher, bool* calibrate){
        cv::FileStorage fs( "../config.cfg", cv::FileStorage::READ );
        if(fs.isOpened()){
            fs["method" ] >> *method;
            fs["matcher"] >> *matcher;
            fs["calibrate"] >> *calibrate;
            fs.release();
        }
        else{
            cv::FileStorage fs( "../config.cfg", cv::FileStorage::WRITE );
            fs << "method" << "ORB";
            *method = "ORB";
            fs << "matcher"    << "FLANN";
            *matcher = "FLANN";
            fs << "calibrate"    << false;
            *calibrate = false;
        }
}
void readConfigParams ( std :: string * method , std :: string * matcher , bool * calibrate ) { cv :: FileStorage fs ( " " , cv :: FileStorage :: READ ) ; if ( fs . isOpened ( ) ) { fs [ " " ] >> * method ; fs [ " " ] >> * matcher ; fs [ " " ] >> * calibrate ; fs . release ( ) ; } else { cv :: FileStorage fs ( " " , cv :: FileStorage :: WRITE ) ; fs << " " << " " ; * method = " " ; fs << " " << " " ; * matcher = " " ; fs << " " << false ; * calibrate = false ; } }
Reads the configuration parameters for this program
@param cameraMatrix pointer to the camara Matrix to recieve the new data
@param distCoeffs pointer to the matrix that will hold the distortion Coefficients
Reads the configuration parameters for this program @param cameraMatrix pointer to the camara Matrix to recieve the new data @param distCoeffs pointer to the matrix that will hold the distortion Coefficients
//TODO other parameters can be added here