repaired aspect ratio option; fixed comments
This commit is contained in:
parent
2505e7e267
commit
9c94a96c40
@ -10,11 +10,11 @@ using namespace cv;
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
example command line when 3 cameras are connected.
|
example command line for calibration from a live feed.
|
||||||
tri_calibration -w 4 -h 5 -s 0.025 -o camera_left.yml -op -oe
|
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):
|
example command line for calibration from a list of stored images:
|
||||||
tri_calibration -w 4 -h 5 -s 0.025 -o camera.yml -op -oe image_list.xml
|
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
|
where image_list.xml is the standard OpenCV XML/YAML
|
||||||
file consisting of the list of strings, e.g.:
|
file consisting of the list of strings, e.g.:
|
||||||
|
|
||||||
@ -30,8 +30,6 @@ example command line when 3 cameras are connected.
|
|||||||
</images>
|
</images>
|
||||||
</opencv_storage>
|
</opencv_storage>
|
||||||
|
|
||||||
you can also use a video file or live camera input to calibrate the camera
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum { DETECTION = 0, CAPTURING = 1, CALIBRATED = 2 };
|
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 )
|
if( sscanf( argv[++i], "%f", &aspectRatio ) != 1 || aspectRatio <= 0 )
|
||||||
return printf("Invalid aspect ratio\n" ), -1;
|
return printf("Invalid aspect ratio\n" ), -1;
|
||||||
|
flags |= CV_CALIB_FIX_ASPECT_RATIO;
|
||||||
}
|
}
|
||||||
else if( strcmp( s, "-d" ) == 0 )
|
else if( strcmp( s, "-d" ) == 0 )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user