bazar
1.3.1
|
3D to 2D projection matrix More...
#include <projection_matrix.h>
Public Member Functions | |
projection_matrix (void) | |
~projection_matrix () | |
projection_matrix & | operator= (const projection_matrix &P) |
void | print (FILE *file, char *calibration_filename) |
bool | load_tdir (const char *tdir_filename) |
bool | load_tdir (const char *tdir_filename, int w, int h) |
void | load (FILE *f) |
bool | read_from_matchmover_output (FILE *f) |
void | set_3x4_matrix (double P[3][4], int width, int height) |
void | get_3x4_matrix (double P[3][4]) |
void | set_original_internal_parameters (int image_width, int image_height, double fx, double fy, double cx, double cy) |
void | set_original_internal_parameters (double fx, double fy, double cx, double cy) |
void | change_image_size (int new_width, int new_height) |
bool | read_internal_parameters_from_tdir_file (const char *tdir_filename) |
double | get_cx (void) |
double | get_cy (void) |
double | get_fx (void) |
double | get_fy (void) |
void | set_camera_centre_and_lookat_point (double Cx, double Cy, double Cz, double Lx, double Ly, double Lz, double angle_vertical) |
void | set_external_parameters (double omega, double phi, double kappa, double Tx, double Ty, double Tz) |
void | set_angles (double omega, double phi, double kappa) |
void | set_external_parameters (double rot[3][3], double transl[3]) |
void | set_external_parameters (double wc2vc[3][4]) |
void | set_external_parameters (double **wc2vc) |
void | set_external_parameters (double *state) |
void | set_external_parameters_exp_map (double *state, CvMat *JR=0) |
void | set_external_parameters (CvMat *H) |
void | set_rotation_to_Id (void) |
void | set_translation_to_0 (void) |
void | get_external_parameters (double *omega, double *phi, double *kappa, double *Tx, double *Ty, double *Tz) |
void | get_external_parameters (double *state) |
void | get_external_parameters_exp_map (double *state) |
void | get_angles (double *omega, double *phi, double *kappa) |
void | translate_x (double delta) |
void | translate_y (double delta) |
void | translate_z (double delta) |
void | rotate_x (double delta) |
void | rotate_y (double delta) |
void | rotate_z (double delta) |
void | world_to_cam (double *M, double *Mc) |
void | get_optical_centre (double *Cx, double *Cy, double *Cz) |
double * | get_optical_centre (void) |
double * | get_V (double u, double v) |
void | get_V (double u, double v, double *V) |
void | get_V (double u, double v, double *Vx, double *Vy, double *Vz) |
void | set_GL_zmin_zmax (double zmin, double zmax) |
void | set_GL_PROJECTION (int xdim, int ydim, float *gl_vector) |
void | set_GL_MODELVIEW (double *gl_matrix) |
bool | visible_triangle (double X1, double Y1, double Z1, double X2, double Y2, double Z2, double X3, double Y3, double Z3) |
void | project (const double X, const double Y, const double Z, double *u, double *v) |
void | project (const double X, const double Y, const double Z, float *u, float *v) |
Static Public Member Functions | |
static FILE * | open_matchmover_output (char *filename) |
static void | close_matchmover_output (FILE *f) |
Friends | |
ostream & | operator<< (ostream &o, const projection_matrix &P) |
3D to 2D projection matrix
Definition at line 35 of file projection_matrix.h.
projection_matrix::projection_matrix | ( | void | ) |
Definition at line 31 of file projection_matrix.cpp.
projection_matrix::~projection_matrix | ( | ) |
Definition at line 41 of file projection_matrix.cpp.
void projection_matrix::change_image_size | ( | int | new_width, |
int | new_height | ||
) |
Definition at line 380 of file projection_matrix.cpp.
|
static |
Definition at line 268 of file projection_matrix.cpp.
void projection_matrix::get_3x4_matrix | ( | double | P[3][4] | ) |
Definition at line 737 of file projection_matrix.cpp.
References gfla_copy_3x4().
void projection_matrix::get_angles | ( | double * | omega, |
double * | phi, | ||
double * | kappa | ||
) |
|
inline |
Definition at line 71 of file projection_matrix.h.
|
inline |
Definition at line 72 of file projection_matrix.h.
void projection_matrix::get_external_parameters | ( | double * | omega, |
double * | phi, | ||
double * | kappa, | ||
double * | Tx, | ||
double * | Ty, | ||
double * | Tz | ||
) |
Definition at line 704 of file projection_matrix.cpp.
References gfla_get_euler_angles_from_rotation().
void projection_matrix::get_external_parameters | ( | double * | state | ) |
Definition at line 699 of file projection_matrix.cpp.
void projection_matrix::get_external_parameters_exp_map | ( | double * | state | ) |
Definition at line 519 of file projection_matrix.cpp.
References cvmSet().
|
inline |
Definition at line 73 of file projection_matrix.h.
|
inline |
Definition at line 74 of file projection_matrix.h.
void projection_matrix::get_optical_centre | ( | double * | Cx, |
double * | Cy, | ||
double * | Cz | ||
) |
Definition at line 748 of file projection_matrix.cpp.
double * projection_matrix::get_optical_centre | ( | void | ) |
Definition at line 758 of file projection_matrix.cpp.
double * projection_matrix::get_V | ( | double | u, |
double | v | ||
) |
Definition at line 769 of file projection_matrix.cpp.
void projection_matrix::get_V | ( | double | u, |
double | v, | ||
double * | V | ||
) |
Definition at line 778 of file projection_matrix.cpp.
References gfla_normalize_3().
void projection_matrix::get_V | ( | double | u, |
double | v, | ||
double * | Vx, | ||
double * | Vy, | ||
double * | Vz | ||
) |
Definition at line 790 of file projection_matrix.cpp.
References gfla_norme().
void projection_matrix::load | ( | FILE * | f | ) |
Definition at line 213 of file projection_matrix.cpp.
bool projection_matrix::load_tdir | ( | const char * | tdir_filename | ) |
Load external and internal parameters from a tdir file, estimating image width and height.
THE WIDTH AND HEIGHT ESTIMATION MIGHT BE WRONG!
Definition at line 181 of file projection_matrix.cpp.
References diagDiff().
bool projection_matrix::load_tdir | ( | const char * | tdir_filename, |
int | w, | ||
int | h | ||
) |
Load external and internal parameters from a tdir file. The w and h specify the size of the projection rectangle.
Definition at line 146 of file projection_matrix.cpp.
|
static |
Definition at line 251 of file projection_matrix.cpp.
projection_matrix & projection_matrix::operator= | ( | const projection_matrix & | P | ) |
Definition at line 45 of file projection_matrix.cpp.
References gfla_copy_3(), and gfla_copy_3x3().
void projection_matrix::print | ( | FILE * | file, |
char * | calibration_filename | ||
) |
Definition at line 337 of file projection_matrix.cpp.
|
inline |
Definition at line 163 of file projection_matrix.h.
References gfla_mul_mat_vect_3x4().
|
inline |
Definition at line 177 of file projection_matrix.h.
References gfla_mul_mat_vect_3x4().
bool projection_matrix::read_from_matchmover_output | ( | FILE * | f | ) |
Definition at line 273 of file projection_matrix.cpp.
References gfla_mul_mat_vect_3x3(), and gfla_opp_3().
bool projection_matrix::read_internal_parameters_from_tdir_file | ( | const char * | tdir_filename | ) |
Definition at line 396 of file projection_matrix.cpp.
void projection_matrix::rotate_x | ( | double | delta | ) |
Definition at line 666 of file projection_matrix.cpp.
void projection_matrix::rotate_y | ( | double | delta | ) |
Definition at line 677 of file projection_matrix.cpp.
void projection_matrix::rotate_z | ( | double | delta | ) |
Definition at line 688 of file projection_matrix.cpp.
void projection_matrix::set_3x4_matrix | ( | double | P[3][4], |
int | width, | ||
int | height | ||
) |
Definition at line 96 of file projection_matrix.cpp.
References gfla_det().
void projection_matrix::set_angles | ( | double | omega, |
double | phi, | ||
double | kappa | ||
) |
void projection_matrix::set_camera_centre_and_lookat_point | ( | double | Cx, |
double | Cy, | ||
double | Cz, | ||
double | Lx, | ||
double | Ly, | ||
double | Lz, | ||
double | angle_vertical | ||
) |
Definition at line 431 of file projection_matrix.cpp.
References gfla_cross_product(), and gfla_normalize_3().
void projection_matrix::set_external_parameters | ( | double | omega, |
double | phi, | ||
double | kappa, | ||
double | Tx, | ||
double | Ty, | ||
double | Tz | ||
) |
Definition at line 463 of file projection_matrix.cpp.
References gfla_get_rotation_from_euler_angles().
void projection_matrix::set_external_parameters | ( | double | rot[3][3], |
double | transl[3] | ||
) |
Definition at line 566 of file projection_matrix.cpp.
References gfla_copy_3(), and gfla_copy_3x3().
void projection_matrix::set_external_parameters | ( | double | wc2vc[3][4] | ) |
Definition at line 542 of file projection_matrix.cpp.
void projection_matrix::set_external_parameters | ( | double ** | wc2vc | ) |
Definition at line 554 of file projection_matrix.cpp.
void projection_matrix::set_external_parameters | ( | double * | state | ) |
Definition at line 475 of file projection_matrix.cpp.
void projection_matrix::set_external_parameters | ( | CvMat * | H | ) |
Definition at line 590 of file projection_matrix.cpp.
References cvmGet(), gfla_add_3(), gfla_cross_product(), gfla_normalize_3(), gfla_scale_3(), and gfla_sub_3().
void projection_matrix::set_external_parameters_exp_map | ( | double * | state, |
CvMat * | JR = 0 |
||
) |
Definition at line 480 of file projection_matrix.cpp.
References cvmGet().
void projection_matrix::set_GL_MODELVIEW | ( | double * | gl_matrix | ) |
Definition at line 857 of file projection_matrix.cpp.
void projection_matrix::set_GL_PROJECTION | ( | int | xdim, |
int | ydim, | ||
float * | gl_vector | ||
) |
Definition at line 815 of file projection_matrix.cpp.
References gfla_mul_mat_3x3x4(), and S.
void projection_matrix::set_GL_zmin_zmax | ( | double | zmin, |
double | zmax | ||
) |
Definition at line 809 of file projection_matrix.cpp.
void projection_matrix::set_original_internal_parameters | ( | int | image_width, |
int | image_height, | ||
double | fx, | ||
double | fy, | ||
double | cx, | ||
double | cy | ||
) |
Definition at line 356 of file projection_matrix.cpp.
void projection_matrix::set_original_internal_parameters | ( | double | fx, |
double | fy, | ||
double | cx, | ||
double | cy | ||
) |
Definition at line 370 of file projection_matrix.cpp.
void projection_matrix::set_rotation_to_Id | ( | void | ) |
Definition at line 574 of file projection_matrix.cpp.
void projection_matrix::set_translation_to_0 | ( | void | ) |
Definition at line 583 of file projection_matrix.cpp.
void projection_matrix::translate_x | ( | double | delta | ) |
Definition at line 645 of file projection_matrix.cpp.
void projection_matrix::translate_y | ( | double | delta | ) |
Definition at line 652 of file projection_matrix.cpp.
void projection_matrix::translate_z | ( | double | delta | ) |
Definition at line 659 of file projection_matrix.cpp.
bool projection_matrix::visible_triangle | ( | double | X1, |
double | Y1, | ||
double | Z1, | ||
double | X2, | ||
double | Y2, | ||
double | Z2, | ||
double | X3, | ||
double | Y3, | ||
double | Z3 | ||
) |
Definition at line 865 of file projection_matrix.cpp.
References gfla_cross_product(), and gfla_dot_product().
void projection_matrix::world_to_cam | ( | double * | M, |
double * | Mc | ||
) |
Definition at line 714 of file projection_matrix.cpp.
|
friend |
Definition at line 328 of file projection_matrix.cpp.