NAME

get_camera_matrix_from_point_and_line_correspondences - Given at least six line or point correspondences, will approximate the camera matrix

SYNOPSIS

#include "g/g_camera_matrix.h"

Example compile flags (system dependent):
  -DLINUX_X86_64 -DLINUX_X86_64_OPTERON  -DGNU_COMPILER 
   -I/home/kobus/include
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 


int get_camera_matrix_from_point_and_line_correspondences
(
	Matrix **camera,
	const Vector_vector *points2d,
	const Vector_vector *points3d,
	int numPoints,
	const Vector_vector *lines2d,
	const Vector_vector *lines3da,
	const Vector_vector *lines3db,
	int numLines
);

PARAMETERS

Matrix **camera
Target location for camera-matrix
const Vector_vector *points2d
2d points as an array of 3-vectors
const Vector_vector *points3d
3d points as an array of 4-vectors
int numPoints
The number of point correspondences
const Vector_vector *lines2d
2d lines as an array of 3-vectors
const Vector_vector *lines3da
3d points as an array of 4 vectors
const Vector_vector *lines3db
3d points as an array of 4-vectors
int numLines
The number of line correspondences

DESCRIPTION

among them using a least-squares strategy. Sets the given matrix to contain an approximated camera matrix given enough correspondences. Takes the points correspondences as arrays of Vectors, With the 2d points being in 3-vector form and the 3d points being 4-vectors. The lines are given in three arrays, with the 2d lines being 3-vectors and hte 3d lines being two seperate points in 3d, (4-vectors). The number of point and line correspondences needs to be given. The function requires at least 6 corespondences total, but has no maximum.

RETURNS

ERROR if Vectors are the wrong size. NO_ERROR otherwise. Can still fail if too correspondences are linearly dependent.

RELATED

get_camera_matrix_from_line_correspondences

DISCLAIMER

This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.

AUTHOR

Andrew Emmott (aemmott)

DOCUMENTER

Andrew Emmott (aemmott)

SEE ALSO

put_point_corrs , put_line_corrs , ransac_calibrate_camera_from_corrs