Main Page | Modules | Class List | File List | Class Members | File Members

Geometric Fitting
[Vision Package]


Classes

struct  Gan_Homog33Match
 Structure to hold details of scene and image data to be used in computing 2D homographies. More...

Defines

#define gel(M, i, j)   gan_mat_get_el(M,i,j)
#define sel(M, i, j, v)   gan_mat_set_el(M,i,j,v)
#define gel(M, i, j)   gan_mat_get_el(M,i,j)
#define sel(M, i, j, v)   gan_mat_set_el(M,i,j,v)
#define gel(M, i, j)   gan_mat_get_el(M,i,j)
#define sel(M, i, j, v)   gan_mat_set_el(M,i,j,v)
#define gel(M, i, j)   gan_mat_get_el(M,i,j)
#define sel(M, i, j, v)   gan_mat_set_el(M,i,j,v)
#define gel(M, i, j)   gan_mat_get_el(M,i,j)
#define sel(M, i, j, v)   gan_mat_set_el(M,i,j,v)

Enumerations

enum  Gan_Homog33MatchType { GAN_HOMOG33_POINT, GAN_HOMOG33_LINE, GAN_HOMOG33_LINE_ENDPOINTS, GAN_HOMOG33_IGNORE }
 Type of matching feature when computing 2D homography. More...

Functions

Gan_Bool gan_affine33_increment_p (Gan_PseudoInverseStruct *pis, Gan_Vector3 *X, Gan_Vector3 *x, double scale, int *eq_count)
 Increments the calculation of a 3x3 affine homography for a point.
Gan_Bool gan_affine33_increment_le (Gan_PseudoInverseStruct *pis, Gan_Vector3 *X, Gan_Vector3 *l, double scale, int *eq_count)
 Increments the calculation of a 3x3 homography for a line.
Gan_Bool gan_affine33_solve (Gan_PseudoInverseStruct *pis, int eq_count, Gan_Matrix23 *P)
 Solves for the 3x3 affine homography between two planes.
Gan_Bool gan_affine33_fit (Gan_Homog33Match *match, unsigned nmatches, Gan_Matrix23 *H)
 Computes the 2D affine transformation between points and lines.
Gan_PseudoInverseStructgan_affine33_init (Gan_PseudoInverseStruct *pis)
 Macro: Initialises the calculation of a 3x3 affine homography.
void gan_affine33_free (Gan_PseudoInverseStruct *pis)
 Macro: Frees structure used to calculate an affine 3x3 homography.
Gan_Bool gan_affine33_reset (Gan_PseudoInverseStruct *pis)
 Macro: Resets the structure used to calculate a 3x3 affine homography.
Gan_Bool gan_essential_matrix_fit (Gan_Vector3 *p1, Gan_Vector3 *p2, int n, Gan_Camera *cal1, Gan_Camera *cal2, Gan_SymMatEigenStruct *sme, Gan_Euclid3D *euc)
 Computes the essential matrix from point matches.
Gan_Bool gan_fundamental_matrix_fit (Gan_Vector3 *p1, Gan_Vector3 *p2, int n, Gan_SymMatEigenStruct *sme, Gan_Matrix33 *F)
 Computes the fundamental matrix from point matches.
Gan_Bool gan_homog33_increment_p (Gan_SymMatEigenStruct *sme, Gan_Vector3 *X, Gan_Vector3 *x, double scale, int *eq_count)
 Increments the calculation of a 3x3 homography for a point.
Gan_Bool gan_homog33_increment_l (Gan_SymMatEigenStruct *sme, Gan_Vector3 *L, Gan_Vector3 *l, double scale, int *eq_count)
 Increments the calculation of a 3x3 homography for a line.
Gan_Bool gan_homog33_increment_le (Gan_SymMatEigenStruct *sme, Gan_Vector3 *X, Gan_Vector3 *l, double scale, int *eq_count)
 Increments the calculation of a 3x3 homography for a line.
Gan_Bool gan_homog33_solve (Gan_SymMatEigenStruct *sme, int eq_count, Gan_Matrix33 *P)
 Solves for the 3x3 homography between two planes.
Gan_Bool gan_homog33_fit_points (const Gan_Vector3 *x, const Gan_Vector3 *X, unsigned int n, Gan_Matrix33 *H)
 Computes a 3x3 homography between two planes.
Gan_Bool gan_homog33_fit (Gan_Homog33Match *match, unsigned nmatches, Gan_Matrix33 *H)
 Computes a 3x3 homography between two planes.
Gan_SymMatEigenStructgan_homog33_init (Gan_SymMatEigenStruct *sme)
 Macro: Initialises the calculation of a 3x3 homography.
void gan_homog33_free (Gan_SymMatEigenStruct *sme)
 Macro: Frees the structure used to calculate a 3x3 homography.
Gan_Bool gan_homog33_reset (Gan_SymMatEigenStruct *sme)
 Macro: Resets the structure used to calculate a 3x3 homography.
Gan_Bool gan_homog34_increment_p (Gan_SymMatEigenStruct *sme, Gan_Vector4 *X, Gan_Vector3 *x, double scale, int *eq_count)
 Increments the calculation of a 3x4 homography for a point.
Gan_Bool gan_homog34_increment_le (Gan_SymMatEigenStruct *sme, Gan_Vector4 *X1, Gan_Vector4 *X2, Gan_Vector3 *l, double scale, int *eq_count)
 Increments the calculation of a 3x4 homography.
Gan_Bool gan_homog34_solve (Gan_SymMatEigenStruct *sme, int eq_count, Gan_Matrix34 *P)
 Solves for the 3x4 homography between 2D & 3D systems.
Gan_SymMatEigenStructgan_homog34_init (Gan_SymMatEigenStruct *sme)
 Macro: Initialises the calculation of a 3x4 homography.
void gan_homog34_free (Gan_SymMatEigenStruct *sme)
 Macro: Frees the structure used to calculate a 3x4 homography.
Gan_Bool gan_homog34_reset (Gan_SymMatEigenStruct *sme)
 Macro: Resets the structure used to calculate a 3x4 homography.

Enumeration Type Documentation

enum Gan_Homog33MatchType
 

Type of matching feature when computing 2D homography.

Enumeration values:
GAN_HOMOG33_POINT  Match scene point to image point
GAN_HOMOG33_LINE  Match scene line to image line
GAN_HOMOG33_LINE_ENDPOINTS  Match scene line endpoints to image line
GAN_HOMOG33_IGNORE  rejected match


Function Documentation

Gan_Bool gan_affine33_fit Gan_Homog33Match match,
unsigned  nmatches,
Gan_Matrix23 H
 

Computes the 2D affine transformation between points and lines.

Parameters:
match Array of feature matches
nmatches The number of point/line matches
H The affine homography to be computed
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Solves for the affine homography between two planes, given point <--> point, line <--> line and point <--> line correspondences between the two planes, as given by the data array.

See also:
gan_homog33_fit().

void gan_affine33_free Gan_PseudoInverseStruct pis  ) 
 

Macro: Frees structure used to calculate an affine 3x3 homography.

Parameters:
pis A pointer to a pseudo-inverse structure
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Frees the structure used to calculate a 3x3 affine homography between two planes.

See also:
gan_affine33_increment_l().

Gan_Bool gan_affine33_increment_le Gan_PseudoInverseStruct pis,
Gan_Vector3 X,
Gan_Vector3 l,
double  scale,
int *  eq_count
 

Increments the calculation of a 3x3 homography for a line.

Parameters:
pis A pointer to a pseudo-inverse structure
X A point in the source coordinate frame for the homography
l A line in the destination coordinate frame
scale A scaling on the outer product of #X & #l
eq_count Pointer to the total number of equations or NULL
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Increments the accumulated sum of outer products of vectors to be used to compute the homography between two projective 2D planes, given a point in one plane lying in a line in the other.

Call this function using points x having the same z coordinate.

See also:
gan_affine33_increment_l().

Gan_Bool gan_affine33_increment_p Gan_PseudoInverseStruct pis,
Gan_Vector3 X,
Gan_Vector3 x,
double  scale,
int *  eq_count
 

Increments the calculation of a 3x3 affine homography for a point.

Parameters:
pis A pointer to a pseudo-inverse structure
X A point in the source coordinate frame for the homography
x A point in the destination coordinate frame
scale A scaling on the outer product of X and x
eq_count A pointer to the total number of equations or NULL
Returns:
GAN_TRUE success, GAN_FALSE failure.
Increments the accumulated sum of outer products of vectors to be used to compute the homography between two projective 2D planes, given a point correspondence between the planes.

Call this function using points x having the same z coordinate.

See also:
gan_affine33_increment_l().

Gan_PseudoInverseStruct* gan_affine33_init Gan_PseudoInverseStruct pis  ) 
 

Macro: Initialises the calculation of a 3x3 affine homography.

Parameters:
pis A pointer to a pseudo-inverse structure, or NULL
Initialises the calculation of a 3x3 affine homography between two planes.
Returns:
Non-NULL on success, NULL on failure.
See also:
gan_affine33_increment_l().

Gan_Bool gan_affine33_reset Gan_PseudoInverseStruct pis  ) 
 

Macro: Resets the structure used to calculate a 3x3 affine homography.

Parameters:
pis A pointer to a pseudo-inverse structure
Resets the structure used to calculate a 3x3 affine homography between two planes.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_affine33_increment_l().

Gan_Bool gan_affine33_solve Gan_PseudoInverseStruct pis,
int  eq_count,
Gan_Matrix23 P
 

Solves for the 3x3 affine homography between two planes.

Parameters:
pis A pointer to a pseudo-inverse structure
eq_count Pointer to the total number of equations or NULL
P The homography matrix
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Solves for the 3x3 homography between two planes, having accumulated point/line correspondences.

See also:
gan_affine33_increment_l().

Gan_Bool gan_essential_matrix_fit Gan_Vector3 p1,
Gan_Vector3 p2,
int  n,
Gan_Camera cal1,
Gan_Camera cal2,
Gan_SymMatEigenStruct sme,
Gan_Euclid3D pose
 

Computes the essential matrix from point matches.

Parameters:
p1 The array of image points in image 1
p2 The array of image points in image 2
n The number of point matches
cal1 Camera for image 1
cal2 Camera for image 2
sme An eigensystem structure to use or NULL
euc The relative pose between the two cameras
Applies the Longuet-Higgins eight-point algorithm to compute the essential matrix for images 1 & 2. This is converted into the rotation & translation (up to scale) between the cameras, which are written into the #euc structure. If the #sme structure to compute eigenvectors & eigenvalues is passed as NULL, a suitable structure is allocated and freed inside the function.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Warning:
The rank-2 constraint on E is not imposed.
See also:
gan_fundamental_matrix_fit().

Gan_Bool gan_fundamental_matrix_fit Gan_Vector3 p1,
Gan_Vector3 p2,
int  n,
Gan_SymMatEigenStruct sme,
Gan_Matrix33 F
 

Computes the fundamental matrix from point matches.

Parameters:
p1 The array of image points in image 1
p2 The array of image points in image 2
n The number of point matches
sme An eigensystem structure to use or NULL
F The fundamental matrix to be filled
Applies the Longuet-Higgins eight-point algorithm to compute the fundamental matrix for images 1 & 2. If the #sme structure to compute eigenvectors & eigenvalues is passed as NULL, a suitable structure is allocated and freed inside the function.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Warning:
The rank-2 constraint on $ F $ is not imposed. Any normalisation of the image data should be applied before using the function.
See also:
gan_essential_matrix_fit().

Gan_Bool gan_homog33_fit Gan_Homog33Match match,
unsigned  nmatches,
Gan_Matrix33 H
 

Computes a 3x3 homography between two planes.

Parameters:
match An array of point/line matches
nmatches The number of point/line matches unsigned nmatches
H The homography to be computed
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Solves for the homography between two planes, given point <--> point, line <--> line and point <--> line correspondences between the two planes, as given by the data array.

See also:
gan_homog33_increment_l().

Gan_Bool gan_homog33_fit_points const Gan_Vector3 x,
const Gan_Vector3 X,
unsigned int  n,
Gan_Matrix33 H
 

Computes a 3x3 homography between two planes.

Parameters:
x An array of "image" points
X An array of "world" points
n The number of points in the arrays
H The homography to be computed
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Solves for the homography between two planes, given point <--> point correspondences between the two planes.

This function invokes projective normalisation to solve for the homography, so there is no need to pre-normalise the data.

void gan_homog33_free Gan_SymMatEigenStruct sme  ) 
 

Macro: Frees the structure used to calculate a 3x3 homography.

Parameters:
sme A pointer to a symmetric eigensystem structure
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Frees the structure used to calculate a 3x3 homography between two planes.

See also:
gan_homog33_increment_l().

Gan_Bool gan_homog33_increment_l Gan_SymMatEigenStruct sme,
Gan_Vector3 L,
Gan_Vector3 l,
double  scale,
int *  eq_count
 

Increments the calculation of a 3x3 homography for a line.

Parameters:
sme A pointer to a symmetric eigensystem structure
L A line in the source coordinate frame for the homography
l A line in the destination coordinate frame
scale A scaling on the outer product of L and l
eq_count A pointer to the total number of equations or NULL
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Increments the accumulated sum of outer products of vectors to be used to compute the homography between two projective 2D planes, given a line correspondence between the planes.

See also:
gan_homog33_increment_p().

Gan_Bool gan_homog33_increment_le Gan_SymMatEigenStruct sme,
Gan_Vector3 X,
Gan_Vector3 l,
double  scale,
int *  eq_count
 

Increments the calculation of a 3x3 homography for a line.

Parameters:
sme A pointer to a symmetric eigensystem structure
X A point in the source coordinate frame for the homography
l A line in the destination coordinate frame
scale A scaling on the outer product of #X & #l
eq_count Pointer to the total number of equations or NULL
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Increments the accumulated sum of outer products of vectors to be used to compute the homography between two projective 2D planes, given a point in one plane lying in a line in the other.

See also:
gan_homog33_increment_l().

Gan_Bool gan_homog33_increment_p Gan_SymMatEigenStruct sme,
Gan_Vector3 X,
Gan_Vector3 x,
double  scale,
int *  eq_count
 

Increments the calculation of a 3x3 homography for a point.

Parameters:
sme A pointer to a symmetric eigensystem structure
X A point in the source coordinate frame for the homography
x A point in the destination coordinate frame
scale A scaling on the outer product of X and x
eq_count A pointer to the total number of equations or NULL
Returns:
GAN_TRUE success, GAN_FALSE failure.
Increments the accumulated sum of outer products of vectors to be used to compute the homography between two projective 2D planes, given a point correspondence between the planes.

See also:
gan_homog33_increment_l().

Gan_SymMatEigenStruct* gan_homog33_init Gan_SymMatEigenStruct sme  ) 
 

Macro: Initialises the calculation of a 3x3 homography.

Parameters:
sme A pointer to a symmetric eigensystem structure, or NULL
Initialises the calculation of a 3x3 homography between two planes.
Returns:
Non-NULL on success, NULL on failure.
See also:
gan_homog33_increment_l().

Gan_Bool gan_homog33_reset Gan_SymMatEigenStruct sme  ) 
 

Macro: Resets the structure used to calculate a 3x3 homography.

Parameters:
sme A pointer to a symmetric eigensystem structure
Resets the structure used to calculate a 3x3 homography between two planes.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_homog33_increment_l().

Gan_Bool gan_homog33_solve Gan_SymMatEigenStruct sme,
int  eq_count,
Gan_Matrix33 P
 

Solves for the 3x3 homography between two planes.

Parameters:
sme A pointer to a symmetric eigensystem structure
eq_count Pointer to the total number of equations or NULL
P The homography matrix
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
Solves for the 3x3 homography between two planes, having accumulated point/line correspondences.

See also:
gan_homog33_increment_l().

void gan_homog34_free Gan_SymMatEigenStruct sme  ) 
 

Macro: Frees the structure used to calculate a 3x4 homography.

Parameters:
sme A pointer to a symmetric eigensystem structure Frees the structure used to calculate a 3x4 homography.
Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_homog34_increment_l().

Gan_Bool gan_homog34_increment_le Gan_SymMatEigenStruct sme,
Gan_Vector4 X1,
Gan_Vector4 X2,
Gan_Vector3 l,
double  scale,
int *  eq_count
 

Increments the calculation of a 3x4 homography.

Parameters:
sme A pointer to a symmetric eigensystem structure
X1 First point in the source 3D coordinate frame
X2 Second point in the source 3D coordinate frame
l Line in the destination 2D coordinate frame
scale A scaling on the outer product of X1/X2 and l
eq_count Pointer to the total number of equations or NULL
Increments the accumulated sum of outer products of vectors to be used to compute the homography between a projective 3D and a projective 2D coordinate systems, given a correspondence between the two points in the 3D coordinate system and a line in the 2D coordinate system.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_homog34_increment_p().

Gan_Bool gan_homog34_increment_p Gan_SymMatEigenStruct sme,
Gan_Vector4 X,
Gan_Vector3 x,
double  scale,
int *  eq_count
 

Increments the calculation of a 3x4 homography for a point.

Parameters:
sme A pointer to a symmetric eigensystem structure
X A point in the source coordinate frame for the homography
x A point in the destination coordinate frame
scale A scaling on the outer product of X & x
eq_count Pointer to the total number of equations or NULL
Increments the accumulated sum of outer products of vectors to be used to compute the homography between a projective 3D and a projective 2D coordinate systems, given a point correspondence between the coordinate systems.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_homog34_increment_le().

Gan_SymMatEigenStruct* gan_homog34_init Gan_SymMatEigenStruct sme  ) 
 

Macro: Initialises the calculation of a 3x4 homography.

Parameters:
sme A pointer to a symmetric eigensystem structure, or NULL
Initialises the calculation of a 3x4 homography

Returns:
non-NULL on success, NULL on failure.
See also:
gan_homog34_increment_l().

Gan_Bool gan_homog34_reset Gan_SymMatEigenStruct sme  ) 
 

Macro: Resets the structure used to calculate a 3x4 homography.

Parameters:
sme A pointer to a symmetric eigensystem structure
Resets the structure used to calculate a 3x4 homography between 3D and 2D coordinates.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_homog34_increment_le().

Gan_Bool gan_homog34_solve Gan_SymMatEigenStruct sme,
int  eq_count,
Gan_Matrix34 P
 

Solves for the 3x4 homography between 2D & 3D systems.

Parameters:
sme A pointer to a symmetric eigensystem structure
eq_count Total number of equations
P The homography matrix
Solves for the 3x4 homography between 2D & 3D systems, having accumulated point/line correspondences.

Returns:
GAN_TRUE on success, GAN_FALSE on failure.
See also:
gan_homog34_increment_p().


Generated on Fri Mar 17 12:45:02 2006 by  doxygen 1.3.9.1