Enumerations | Functions | Variables
opencv_calibration.cpp File Reference
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <cctype>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <iostream>
#include <fstream>
Include dependency graph for opencv_calibration.cpp:

Go to the source code of this file.

Enumerations

enum  { DETECTION = 0, CAPTURING = 1, CALIBRATED = 2 }
 
enum  Pattern { CHESSBOARD, CIRCLES_GRID, ASYMMETRIC_CIRCLES_GRID }
 

Functions

static void calcChessboardCorners (Size boardSize, float squareSize, vector< Point3f > &corners, Pattern patternType=CHESSBOARD)
 
static double computeReprojectionErrors (const vector< vector< Point3f > > &objectPoints, const vector< vector< Point2f > > &imagePoints, const vector< Mat > &rvecs, const vector< Mat > &tvecs, const Mat &cameraMatrix, const Mat &distCoeffs, vector< float > &perViewErrors)
 
static void help ()
 
int main (int argc, char **argv)
 
static bool readInputFile (const string &filename, vector< string > &l) throw (std::exception)
 
static bool readStringList (const string &filename, vector< string > &l)
 
static bool runAndSave (const string &outputFilename, const vector< vector< Point2f > > &imagePoints, Size imageSize, Size boardSize, Pattern patternType, float squareSize, float aspectRatio, int flags, Mat &cameraMatrix, Mat &distCoeffs, bool writeExtrinsics, bool writePoints)
 
static bool runCalibration (vector< vector< Point2f > > imagePoints, Size imageSize, Size boardSize, Pattern patternType, float squareSize, float aspectRatio, int flags, Mat &cameraMatrix, Mat &distCoeffs, vector< Mat > &rvecs, vector< Mat > &tvecs, vector< float > &reprojErrs, double &totalAvgErr)
 
static void saveCameraParams (const string &filename, Size imageSize, Size boardSize, float squareSize, float aspectRatio, int flags, const Mat &cameraMatrix, const Mat &distCoeffs, const vector< Mat > &rvecs, const vector< Mat > &tvecs, const vector< float > &reprojErrs, const vector< vector< Point2f > > &imagePoints, double totalAvgErr)
 

Variables

const char * liveCaptureHelp
 
const char * usage
 

Enumeration Type Documentation

anonymous enum
Enumerator
DETECTION 
CAPTURING 
CALIBRATED 

Definition at line 79 of file opencv_calibration.cpp.

enum Pattern
Enumerator
CHESSBOARD 
CIRCLES_GRID 
ASYMMETRIC_CIRCLES_GRID 

Definition at line 80 of file opencv_calibration.cpp.

Function Documentation

static void calcChessboardCorners ( Size  boardSize,
float  squareSize,
vector< Point3f > &  corners,
Pattern  patternType = CHESSBOARD 
)
static

Definition at line 108 of file opencv_calibration.cpp.

static double computeReprojectionErrors ( const vector< vector< Point3f > > &  objectPoints,
const vector< vector< Point2f > > &  imagePoints,
const vector< Mat > &  rvecs,
const vector< Mat > &  tvecs,
const Mat &  cameraMatrix,
const Mat &  distCoeffs,
vector< float > &  perViewErrors 
)
static

Definition at line 82 of file opencv_calibration.cpp.

static void help ( )
static

Definition at line 46 of file opencv_calibration.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 318 of file opencv_calibration.cpp.

static bool readInputFile ( const string &  filename,
vector< string > &  l 
)
throw (std::exception
)
static

Definition at line 266 of file opencv_calibration.cpp.

static bool readStringList ( const string &  filename,
vector< string > &  l 
)
static

Definition at line 248 of file opencv_calibration.cpp.

static bool runAndSave ( const string &  outputFilename,
const vector< vector< Point2f > > &  imagePoints,
Size  imageSize,
Size  boardSize,
Pattern  patternType,
float  squareSize,
float  aspectRatio,
int  flags,
Mat &  cameraMatrix,
Mat &  distCoeffs,
bool  writeExtrinsics,
bool  writePoints 
)
static

Definition at line 288 of file opencv_calibration.cpp.

static bool runCalibration ( vector< vector< Point2f > >  imagePoints,
Size  imageSize,
Size  boardSize,
Pattern  patternType,
float  squareSize,
float  aspectRatio,
int  flags,
Mat &  cameraMatrix,
Mat &  distCoeffs,
vector< Mat > &  rvecs,
vector< Mat > &  tvecs,
vector< float > &  reprojErrs,
double &  totalAvgErr 
)
static

*|CALIB_FIX_K3*/|CALIB_FIX_K4|CALIB_FIX_K5);

Definition at line 134 of file opencv_calibration.cpp.

static void saveCameraParams ( const string &  filename,
Size  imageSize,
Size  boardSize,
float  squareSize,
float  aspectRatio,
int  flags,
const Mat &  cameraMatrix,
const Mat &  distCoeffs,
const vector< Mat > &  rvecs,
const vector< Mat > &  tvecs,
const vector< float > &  reprojErrs,
const vector< vector< Point2f > > &  imagePoints,
double  totalAvgErr 
)
static

Definition at line 167 of file opencv_calibration.cpp.

Variable Documentation

const char* liveCaptureHelp
Initial value:
=
"When the live video from camera is used as input, the following hot-keys may be used:\n"
" <ESC>, 'q' - quit the program\n"
" 'g' - start capturing images\n"
" 'u' - switch undistortion on/off\n"

Definition at line 40 of file opencv_calibration.cpp.

const char* usage
Initial value:
=
" \nexample command line for calibration from a live feed.\n"
" calibration -w 4 -h 5 -s 0.025 -o camera.yml -op -oe\n"
" \n"
" example command line for calibration from a list of stored images:\n"
" imagelist_creator image_list.xml *.png\n"
" calibration -w 4 -h 5 -s 0.025 -o camera.yml -op -oe image_list.xml\n"
" where image_list.xml is the standard OpenCV XML/YAML\n"
" use imagelist_creator to create the xml or yaml list\n"
" file consisting of the list of strings, e.g.:\n"
" \n"
"<?xml version=\"1.0\"?>\n"
"<opencv_storage>\n"
"<images>\n"
"view000.png\n"
"view001.png\n"
"<!-- view002.png -->\n"
"view003.png\n"
"view010.png\n"
"one_extra_view.jpg\n"
"</images>\n"
"</opencv_storage>\n"

Definition at line 14 of file opencv_calibration.cpp.



tuw_aruco
Author(s): Lukas Pfeifhofer
autogenerated on Mon Jun 10 2019 15:41:03