Classes | Defines | Functions
calibration_standalone.h File Reference
#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <boost/algorithm/string.hpp>
#include <stdio.h>
#include <vector>
#include <iostream>
#include <string>
Include dependency graph for calibration_standalone.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SensorDataEntry

Defines

#define DEBUG_CORNERS_GUI   1
#define DEBUG_GUI   1
#define NR_SQUARE_X   4
#define NR_SQUARE_Y   6
#define SQ_SIZE   41

Functions

void calculateIntrinsicParametersError (SensorDataEntry sde, std::vector< int > &badPairs, std::vector< int > goodPairs, double max_err)
void computeExtrinsicParameters (SensorDataEntry &sde, CvSize checkboard, int nr_pairs)
int computeIntrinsicParameters (SensorDataEntry &sde, CvSize checkboard, double sq_size, std::vector< int > &badPairs, double max_err, int wait)
std::vector< SensorDataEntrycreateSensorEntries (int argc, char **argv, std::vector< int > pPNGFileIndices, CvSize checkboard, int ith)
void finishUp (std::vector< SensorDataEntry > inputData)
void get4x4TransformationMatrix (CvMat *R, CvMat *t, CvMat *T)
void getCalibrationCheckboardCorners (SensorDataEntry &sde, CvSize checkboard, double sq_size, std::vector< int > &badPairs, std::vector< int > &goodPairs)
int getExtrinsicBetween (std::string left, std::string right, CvSize checkboard, std::vector< SensorDataEntry > inputData, int nr_pairs, int *nums)
std::vector< CvPoint3D64f > getObjectPoints (CvSize checkboard, double sq_size, int n_frames)
int ParseArgument (int argc, char **argv, const char *str, int &val)
int ParseArgument (int argc, char **argv, const char *str, double &val)
std::vector< int > ParseFileExtensionArgument (int argc, char **argv, const char *extension)
int ParseRangeArguments (int argc, char **argv, const char *str, int &s, int &e)
void printMatrix (CvMat *matrix, double value=1.0)
void printTransformation (CvMat *rot, CvMat *tr)

Define Documentation

#define DEBUG_CORNERS_GUI   1

Definition at line 49 of file calibration_standalone.h.

#define DEBUG_GUI   1

Definition at line 48 of file calibration_standalone.h.

#define NR_SQUARE_X   4

Definition at line 44 of file calibration_standalone.h.

#define NR_SQUARE_Y   6

Definition at line 45 of file calibration_standalone.h.

#define SQ_SIZE   41

Definition at line 46 of file calibration_standalone.h.


Function Documentation

void calculateIntrinsicParametersError ( SensorDataEntry  sde,
std::vector< int > &  badPairs,
std::vector< int >  goodPairs,
double  max_err 
)

Obtain the intrinsic camera parameters error for this entry using its associated input images

Note:
: results are stored in projImgPoints in <u,v>

Definition at line 580 of file calibration_standalone.h.

void computeExtrinsicParameters ( SensorDataEntry sde,
CvSize  checkboard,
int  nr_pairs 
)

Obtain the extrinsic camera parameters for this entry using its associated input images

Definition at line 708 of file calibration_standalone.h.

int computeIntrinsicParameters ( SensorDataEntry sde,
CvSize  checkboard,
double  sq_size,
std::vector< int > &  badPairs,
double  max_err,
int  wait 
)

Obtain the intrisic camera parameters for this entry using its associated input images

Note:
: If we set CV_CALIB_USE_INTRINSIC_GUESS, we require initial values in sde.intrinsic for fx, fy, cx, cy that will be further optimized

Definition at line 672 of file calibration_standalone.h.

std::vector<SensorDataEntry> createSensorEntries ( int  argc,
char **  argv,
std::vector< int >  pPNGFileIndices,
CvSize  checkboard,
int  ith 
)
Note:
: do not create the pointNumbers here, but rather after <getCalibrationCheckboardCorners ()> inputData.at (i).pointNumbers = cvCreateMat (1, nr_pairs, CV_32SC1);
: do not create the objectPoints here, but rather after <getCalibrationCheckboardCorners ()> inputData.at (i).objectPoints = cvCreateMat (checkboard.width * checkboard.height * nr_pairs, 3, CV_64FC1);
: do not create the imagePoints here, but rather after <getCalibrationCheckboardCorners ()> inputData.at (i).imagePoints = cvCreateMat (checkboard.width * checkboard.height * nr_pairs, 2, CV_64FC1);

Definition at line 278 of file calibration_standalone.h.

void finishUp ( std::vector< SensorDataEntry inputData)

---[ Release memory

Definition at line 256 of file calibration_standalone.h.

void get4x4TransformationMatrix ( CvMat *  R,
CvMat *  t,
CvMat *  T 
)

Definition at line 488 of file calibration_standalone.h.

void getCalibrationCheckboardCorners ( SensorDataEntry sde,
CvSize  checkboard,
double  sq_size,
std::vector< int > &  badPairs,
std::vector< int > &  goodPairs 
)
Note:
: badPairs contains <sde.pairs.at (i)> and not like goodPairs!

Prepare to copy data to the Sensor entry

Definition at line 380 of file calibration_standalone.h.

int getExtrinsicBetween ( std::string  left,
std::string  right,
CvSize  checkboard,
std::vector< SensorDataEntry inputData,
int  nr_pairs,
int *  nums 
)

---[ Display results

Definition at line 511 of file calibration_standalone.h.

std::vector<CvPoint3D64f> getObjectPoints ( CvSize  checkboard,
double  sq_size,
int  n_frames 
)

Create a checkboard model

Note:
: it doesn't matter what values we have here as long as they are consistently used for all images

Definition at line 176 of file calibration_standalone.h.

int ParseArgument ( int  argc,
char **  argv,
const char *  str,
int &  val 
)

Definition at line 55 of file calibration_standalone.h.

int ParseArgument ( int  argc,
char **  argv,
const char *  str,
double &  val 
)

Definition at line 73 of file calibration_standalone.h.

std::vector<int> ParseFileExtensionArgument ( int  argc,
char **  argv,
const char *  extension 
)

Definition at line 115 of file calibration_standalone.h.

int ParseRangeArguments ( int  argc,
char **  argv,
const char *  str,
int &  s,
int &  e 
)

Definition at line 91 of file calibration_standalone.h.

void printMatrix ( CvMat *  matrix,
double  value = 1.0 
)

Definition at line 146 of file calibration_standalone.h.

void printTransformation ( CvMat *  rot,
CvMat *  tr 
)

Definition at line 159 of file calibration_standalone.h.



camera_calibration_standalone
Author(s): Radu Bogdan Rusu (rusu@cs.tum.edu)
autogenerated on Mon Oct 6 2014 08:41:52