From 9c94a96c40a1d760d24da515dce252cafc21467b Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Tue, 3 Aug 2010 11:28:39 +0000 Subject: [PATCH] repaired aspect ratio option; fixed comments --- samples/cpp/calibration.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/samples/cpp/calibration.cpp b/samples/cpp/calibration.cpp index 3bfd7e7..cff22d9 100644 --- a/samples/cpp/calibration.cpp +++ b/samples/cpp/calibration.cpp @@ -10,11 +10,11 @@ using namespace cv; using namespace std; /* -example command line when 3 cameras are connected. - tri_calibration -w 4 -h 5 -s 0.025 -o camera_left.yml -op -oe + example command line for calibration from a live feed. + calibration -w 4 -h 5 -s 0.025 -o camera.yml -op -oe - example command line for a list of stored images(for copy-n-paste): - tri_calibration -w 4 -h 5 -s 0.025 -o camera.yml -op -oe image_list.xml + example command line for calibration from a list of stored images: + calibration -w 4 -h 5 -s 0.025 -o camera.yml -op -oe image_list.xml where image_list.xml is the standard OpenCV XML/YAML file consisting of the list of strings, e.g.: @@ -30,8 +30,6 @@ example command line when 3 cameras are connected. - you can also use a video file or live camera input to calibrate the camera - */ enum { DETECTION = 0, CAPTURING = 1, CALIBRATED = 2 }; @@ -307,6 +305,7 @@ int main( int argc, char** argv ) { if( sscanf( argv[++i], "%f", &aspectRatio ) != 1 || aspectRatio <= 0 ) return printf("Invalid aspect ratio\n" ), -1; + flags |= CV_CALIB_FIX_ASPECT_RATIO; } else if( strcmp( s, "-d" ) == 0 ) { -- 2.7.4