Commit c1a862f1 authored by Gary Bradski's avatar Gary Bradski

minor docs and help code at top

parent f87de190
/*
* 3calibration.cpp -- Calibrate 3 cameras in a horizontal line together.
*/
#include "opencv2/opencv.hpp" #include "opencv2/opencv.hpp"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
...@@ -8,6 +12,37 @@ using namespace std; ...@@ -8,6 +12,37 @@ using namespace std;
enum { DETECTION = 0, CAPTURING = 1, CALIBRATED = 2 }; enum { DETECTION = 0, CAPTURING = 1, CALIBRATED = 2 };
void test()
{
printf( "This is a camera calibration sample that calibrates 3 horizontally placed cameras together.\n"
"Usage: 3calibration\n"
" -w <board_width> # the number of inner corners per one of board dimension\n"
" -h <board_height> # the number of inner corners per another board dimension\n"
" [-s <squareSize>] # square size in some user-defined units (1 by default)\n"
" [-o <out_camera_params>] # the output filename for intrinsic [and extrinsic] parameters\n"
" [-zt] # assume zero tangential distortion\n"
" [-a <aspectRatio>] # fix aspect ratio (fx/fy)\n"
" [-p] # fix the principal point at the center\n"
" [input_data] # input data - text file with a list of the images of the board\n"
"\n" );
}
static void calcChessboardCorners(Size boardSize, float squareSize, vector<Point3f>& corners) static void calcChessboardCorners(Size boardSize, float squareSize, vector<Point3f>& corners)
{ {
corners.resize(0); corners.resize(0);
...@@ -161,21 +196,9 @@ int main( int argc, char** argv ) ...@@ -161,21 +196,9 @@ int main( int argc, char** argv )
vector<vector<Point2f> > imgpt[3]; vector<vector<Point2f> > imgpt[3];
vector<string> imageList; vector<string> imageList;
if( argc < 2 ) if(argc < 2)
{ test();
printf( "This is a camera calibration sample.\n"
"Usage: calibration\n"
" -w <board_width> # the number of inner corners per one of board dimension\n"
" -h <board_height> # the number of inner corners per another board dimension\n"
" [-s <squareSize>] # square size in some user-defined units (1 by default)\n"
" [-o <out_camera_params>] # the output filename for intrinsic [and extrinsic] parameters\n"
" [-zt] # assume zero tangential distortion\n"
" [-a <aspectRatio>] # fix aspect ratio (fx/fy)\n"
" [-p] # fix the principal point at the center\n"
" [input_data] # input data - text file with a list of the images of the board\n"
"\n" );
return 0;
}
for( i = 1; i < argc; i++ ) for( i = 1; i < argc; i++ )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment