diff --git a/cv-node/src/calibrate.cpp b/cv-node/src/calibrate.cpp index 0808fa00c59d3e4dfc54e3430e7b9dc08302621a..5591d2ba0945c8e7576ee4f87afb065b4561c7ca 100644 --- a/cv-node/src/calibrate.cpp +++ b/cv-node/src/calibrate.cpp @@ -291,7 +291,7 @@ bool Calibrate::recalibrate() { fs.release(); } else - cout << "Error: can not save the intrinsic parameters\n"; + LOG(ERROR) << "Error: can not save the intrinsic parameters"; Mat R1, R2, P1, P2, Q; Rect validRoi[2]; @@ -308,7 +308,7 @@ bool Calibrate::recalibrate() { fs.release(); } else - cout << "Error: can not save the extrinsic parameters\n"; + LOG(ERROR) << "Error: can not save the extrinsic parameters"; //Precompute maps for cv::remap() @@ -562,15 +562,15 @@ static bool _runCalibration( Calibrate::Settings& s, Size& imageSize, Mat& camer s.flag | CALIB_USE_LU); } - if (release_object) { + /*if (release_object) { cout << "New board corners: " << endl; cout << newObjPoints[0] << endl; cout << newObjPoints[s.boardSize.width - 1] << endl; cout << newObjPoints[s.boardSize.width * (s.boardSize.height - 1)] << endl; cout << newObjPoints.back() << endl; - } + }*/ - cout << "Re-projection error reported by calibrateCamera: "<< rms << endl; + LOG(INFO) << "Re-projection error reported by calibrateCamera: "<< rms; bool ok = checkRange(cameraMatrix) && checkRange(distCoeffs); diff --git a/cv-node/src/main.cpp b/cv-node/src/main.cpp index fb535deec8fc442e3467db03bc8f4e4e6f5a5672..470147f972360fd0e7e5649f1f3c9a83658d38e5 100644 --- a/cv-node/src/main.cpp +++ b/cv-node/src/main.cpp @@ -21,6 +21,7 @@ static bool OPTION_display = false; static bool OPTION_calibrate = false; static bool OPTION_flip = false; static bool OPTION_nostereo = false; +static bool OPTION_noextrinsics = false; void handle_options(char ***argv, int *argc) { while (*argc > 0) { @@ -47,6 +48,8 @@ void handle_options(char ***argv, int *argc) { OPTION_flip = true; } else if (cmd.find("--no-stereo") == 0) { OPTION_nostereo = true; + } else if (cmd.find("--no-extrinsics") == 0) { + OPTION_noextrinsics = true; } (*argc)--;