bazar  1.3.1
Classes | Functions
CamCalibration.cpp File Reference
#include <assert.h>
#include <cv.h>
#include <highgui.h>
#include "CamCalibration.h"
#include <optimization/ls_minimizer2.h>
Include dependency graph for CamCalibration.cpp:

Go to the source code of this file.

Classes

struct  ProjObs

Functions

void twomat_gradian (double fx, double fy, double cx, double cy, double R_matrix[3][3], double Rx, double Ry, double Rz, CvMat *R_jacobian, double S_matrix[3][3], double Sx, double Sy, double Sz, CvMat *S_jacobian, double p[3], double cgret[24], double uv[2])
 Calculates gradient.
void showmatrix_ch (CvMat &M)
 Special function to print the connection matrix.
void showmatrix (CvMat &M)
 Utility function to print a matrix to the screen.
void showmatrix (CvMat &M, const char *header)
 Utility function to print a matrix to the screen.
void showmatrix (const char *header, CvMat &M)
 Utility function to print a matrix to the screen.
void showmatrix_file (CvMat &M, FILE *stream)
 Utility function to print a matrix to a file.
int imin (int a, int b)
static void fill_random (int array[], int size)
static CvPoint cvPoint (double a, double b)

Function Documentation

static CvPoint cvPoint ( double  a,
double  b 
)
static
static void fill_random ( int  array[],
int  size 
)
static

Definition at line 371 of file CamCalibration.cpp.

References rand().

int imin ( int  a,
int  b 
)

Definition at line 80 of file CamCalibration.cpp.

void showmatrix ( CvMat &  M)

Utility function to print a matrix to the screen.

Prints a matrix to the screen. If it is a 3x3 matrix, the determinant is shown, too.

Definition at line 40 of file gradient.cpp.

References cvmGet().

void showmatrix ( CvMat &  M,
const char *  header 
)

Utility function to print a matrix to the screen.

Prints a matrix to the screen. If it is a 3x3 matrix, the determinant is shown, too. header specifies a title string.

Definition at line 64 of file gradient.cpp.

References showmatrix().

void showmatrix ( const char *  header,
CvMat &  M 
)

Utility function to print a matrix to the screen.

Prints a matrix to the screen. If it is a 3x3 matrix, the determinant is shown, too. header specifies a title string.

Definition at line 76 of file gradient.cpp.

References showmatrix().

void showmatrix_ch ( CvMat &  M)

Special function to print the connection matrix.

Prints the connection matrix. Therefore it uses only rows that exist (at least 1 existing connection to a camera) and displays the number of the view.

Definition at line 14 of file gradient.cpp.

References cvmGet().

void showmatrix_file ( CvMat &  M,
FILE *  stream 
)

Utility function to print a matrix to a file.

Prints the matrix M to file stream.

Definition at line 85 of file gradient.cpp.

References cvmGet().

void twomat_gradian ( double  fx,
double  fy,
double  cx,
double  cy,
double  R_matrix[3][3],
double  Rx,
double  Ry,
double  Rz,
CvMat *  R_jacobian,
double  S_matrix[3][3],
double  Sx,
double  Sy,
double  Sz,
CvMat *  S_jacobian,
double  p[3],
double  cgret[24],
double  uv[2] 
)

Calculates gradient.

Calculates gradient of point p using a calibration matrix
with specified intrinsic parameters fx , fy , cx , cy ,
rotation matrix R and translation vector Rx , Ry , Rz ,
rotation matrix S and translation vector Sx , Sy , Sz.
The jacobian matrices have to be specified: R_jacobian , S_Jacobian.
The result for all parameters is given in cgret[24] , the first 12 parameters for the u-coordinate, the following 12 for the v-coordinate, each of the specifying the two multiplied Rt-matrices.

Definition at line 101 of file gradient.cpp.