repaired aspect ratio option; fixed comments
authorVadim Pisarevsky <no@email>
Tue, 3 Aug 2010 11:28:39 +0000 (11:28 +0000)
committerVadim Pisarevsky <no@email>
Tue, 3 Aug 2010 11:28:39 +0000 (11:28 +0000)
samples/cpp/calibration.cpp

index 3bfd7e7..cff22d9 100644 (file)
@@ -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.
 </images>
 </opencv_storage>
 
- 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 )
         {