From b7da9d4be18b957e349c37a1f0736dfdc87b20c6 Mon Sep 17 00:00:00 2001 From: Gary Bradski Date: Sat, 4 Dec 2010 08:24:31 +0000 Subject: [PATCH] revamped --- samples/cpp/stereo_calib.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/samples/cpp/stereo_calib.cpp b/samples/cpp/stereo_calib.cpp index b02154b49..ad7c49c7d 100644 --- a/samples/cpp/stereo_calib.cpp +++ b/samples/cpp/stereo_calib.cpp @@ -2,7 +2,7 @@ /* *************** License:************************** Oct. 3, 2008 - Right to use this code in any way you want without warrenty, support or any guarentee of it working. + Right to use this code in any way you want without warranty, support or any guarantee of it working. BOOK: It would be nice if you cited it: Learning OpenCV: Computer Vision with the OpenCV Library @@ -41,13 +41,22 @@ using namespace cv; using namespace std; -// -// Given a list of chessboard images, the number of corners (nx, ny) -// on the chessboards, and a flag: useCalibrated for calibrated (0) or -// uncalibrated (1: use cvStereoCalibrate(), 2: compute fundamental -// matrix separately) stereo. Calibrate the cameras and display the -// rectified results along with the computed disparity images. -// +int print_help() +{ + cout << + " Given a list of chessboard images, the number of corners (nx, ny)\n" + " on the chessboards, and a flag: useCalibrated for \n" + " calibrated (0) or\n" + " uncalibrated \n" + " (1: use cvStereoCalibrate(), 2: compute fundamental\n" + " matrix separately) stereo. \n" + " Calibrate the cameras and display the\n" + " rectified results along with the computed disparity images. \n" << endl; + cout << "Usage:\n ./stereo_calib -w board_width -h board_height [-nr /*dot not view results*/] \n" << endl; + return 0; +} + + static void StereoCalib(const vector& imagelist, Size boardSize, bool useCalibrated=true, bool showRectified=true) { @@ -335,14 +344,6 @@ static bool readStringList( const string& filename, vector& l ) l.push_back((string)*it); return true; } - - -int print_help() -{ - cout << "Usage:\n ./stereo_calib -w board_width -h board_height [-nr /*dot not view results*/] \n"; - return 0; -} - int main(int argc, char** argv) {