Public Member Functions | Private Member Functions | Private Attributes
mbl_correspond_points Class Reference

Shapiro & Brady's point correspondence algorithm. More...

#include <mbl_correspond_points.h>

List of all members.

Public Member Functions

 mbl_correspond_points ()
 Dflt ctor.
void correspond (const vcl_vector< vgl_point_2d< double > > &points1, const vcl_vector< vgl_point_2d< double > > &points2, vcl_vector< unsigned > &matches, double sigma)
 Find best correspondence between points1 and points2.
void proximity_by_tanh (const vcl_vector< vgl_point_2d< double > > &points, vnl_matrix< double > &H, double sigma)
 Construct proximity matrix using cosh kernel.
const vnl_vector< double > & evals1 () const
 Eigenvalues of proximity matrix 1 in last call to correspond.
const vnl_vector< double > & evals2 () const
 Eigenvalues of proximity matrix 2 in last call to correspond.

Private Member Functions

unsigned closest_row (const vnl_matrix< double > &H1, const vnl_matrix< double > &H2, unsigned i)
 Return index of row in H2 most similar to row i of H1.
void fix_eigenvectors (vnl_matrix< double > &P)
 Ensure each column vector points in the same way.

Private Attributes

vnl_vector< double > evals1_
 Eigenvalues of proximity matrix 1.
vnl_vector< double > evals2_
 Eigenvalues of proximity matrix 2.

Detailed Description

Shapiro & Brady's point correspondence algorithm.

Includes improvements by Carcassoni and Hancock (a robust kernel in the distance metric).

Note that current version can't cope with different numbers of points. Need to re-order eigenvectors by absolute magnitude of eigenvalues. I'll do this soon - Tim.

Definition at line 20 of file mbl_correspond_points.h.


Constructor & Destructor Documentation

mbl_correspond_points::mbl_correspond_points ( )

Dflt ctor.

Definition at line 18 of file mbl_correspond_points.cxx.


Member Function Documentation

unsigned mbl_correspond_points::closest_row ( const vnl_matrix< double > &  H1,
const vnl_matrix< double > &  H2,
unsigned  i 
) [private]

Return index of row in H2 most similar to row i of H1.

Definition at line 23 of file mbl_correspond_points.cxx.

void mbl_correspond_points::correspond ( const vcl_vector< vgl_point_2d< double > > &  points1,
const vcl_vector< vgl_point_2d< double > > &  points2,
vcl_vector< unsigned > &  matches,
double  sigma 
)

Find best correspondence between points1 and points2.

On exit, matches[i] gives index of points2 which corresponds to points1[i]. Note that there may be a many to one correspondence produced.

Parameters:
sigmaScaling factor defining kernel width

On exit, matches[i] gives index of points2 which corresponds to points1[i].

Parameters:
sigmaScaling factor defining kernel width

Definition at line 64 of file mbl_correspond_points.cxx.

const vnl_vector<double>& mbl_correspond_points::evals1 ( ) const [inline]

Eigenvalues of proximity matrix 1 in last call to correspond.

Definition at line 59 of file mbl_correspond_points.h.

const vnl_vector<double>& mbl_correspond_points::evals2 ( ) const [inline]

Eigenvalues of proximity matrix 2 in last call to correspond.

Definition at line 62 of file mbl_correspond_points.h.

void mbl_correspond_points::fix_eigenvectors ( vnl_matrix< double > &  P) [private]

Ensure each column vector points in the same way.

Unit eigenvectors can point in one of two directions. Ensure p.1>=0 to obtain consistancy.

Definition at line 51 of file mbl_correspond_points.cxx.

void mbl_correspond_points::proximity_by_tanh ( const vcl_vector< vgl_point_2d< double > > &  points,
vnl_matrix< double > &  H,
double  sigma 
)

Construct proximity matrix using cosh kernel.

Construct distance matrix using cosh kernel.

On exit, D(i,j) = tanh(pi*d_ij/sigma) * 2/(pi*d_ij) where d_ij is the distance between points i and j

Definition at line 102 of file mbl_correspond_points.cxx.


Member Data Documentation

Eigenvalues of proximity matrix 1.

Definition at line 24 of file mbl_correspond_points.h.

Eigenvalues of proximity matrix 2.

Definition at line 26 of file mbl_correspond_points.h.


The documentation for this class was generated from the following files: