From 58806a3974f8dd535ed683cf2f8028f08bf4bfcd Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nwpope@utu.fi> Date: Wed, 13 Mar 2019 12:37:14 +0200 Subject: [PATCH] Minor log changes --- cv-node/src/calibrate.cpp | 10 +++++----- cv-node/src/main.cpp | 3 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cv-node/src/calibrate.cpp b/cv-node/src/calibrate.cpp index 0808fa00c..5591d2ba0 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 fb535deec..470147f97 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)--; -- GitLab