Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
jafar::traversability::MatchesContainer Class Reference

This class represents the actual interface between the modules and gfm and traversability. More...


Detailed Description

This class represents the actual interface between the modules and gfm and traversability.

Using the constructor the output of a gfm engine is translated into a suitable format. Additionally, the set of point-to-point matches can be normalized (and denormalized). Note that a dynamic (using statistics of the atches) and a static (using values defined once) normalization is distinguished.

Definition at line 304 of file trv_util.hpp.

#include <trv_util.hpp>

List of all members.

Public Member Functions

 MatchesContainer ()
 Zero constructor, containing no data.
 MatchesContainer (const jafar::gfm::MatchingResult &rm, int width=-1, int height=-1)
 Constructor translating the output object of gfm.
 MatchesContainer (MatchesContainer *mcBuffer[], int idx0, int idx1, int bufferSize, int width=-1, int height=-1)
 MatchesContainer (const KLT_FeatureTable &ft, int idx0, int idx1, int width=-1, int height=-1)
 Constructor constructing the matches container from a KLT feature table.
 MatchesContainer (jblas::mat &points_ref, jblas::mat &points_mat, int width=-1, int height=-1)
 Constructor taking the matches directly as matrix objects.
 MatchesContainer (const MatchesContainer &mc)
 Copy constructor performing a deep copy!
void printInfo (void)
 Print out statistics and states of instances.
void normalize (void)
 Normalize both points_ref and points_match.
void denormalize (void)
 Undo the normalization.
jblas::mat33 denormalizeHom (jblas::mat33 H01)
 A homography estimated with normalized data has to be updated with this function.
jblas::matpoints_ref (void)
jblas::matpoints_match (void)
double point_ref_u (int idx) const
 Get u of point_ref indexed by idx.
double point_ref_v (int idx) const
 Get v of point_ref indexed by idx.
double point_match_u (int idx) const
 Get u of point_match indexed by idx.
double point_match_v (int idx) const
 Get v of point_match indexed by idx.
int nOfMatches (void) const
int id (int idx) const
 Get the identifier of the pair of match given by idx.
bool isNormalized (void) const
void setWeight (const double weight, const int idx)
void setPartition (const int partition, const int idx)
double getWeight (const int idx) const
int getPartition (const int idx)
jblas::vecweights (void)

Private Member Functions

void calcInfo (int width=-1, int height=-1)
 Calculate statistics (if necessary).
int countTrackedFeatures (KLT_FeatureTable ft, int idx0, int idx1)

Private Attributes

jblas::mat mPoints_ref
jblas::mat mPoints_match
jblas::veci mIdentifier
jblas::veci mPartition
jblas::vec mWeight
MatchesInfo mInfo
bool mIsNormalized
bool mIsStaticallyNormalized

Constructor & Destructor Documentation

jafar::traversability::MatchesContainer::MatchesContainer ( const jafar::gfm::MatchingResult rm,
int  width = -1,
int  height = -1 
)

Constructor translating the output object of gfm.

If the arguments width and height are passed exlicitely, the constructor sets the static normalization mode where no data statistics is exploited in order to perform the normalization. Static normalization is faster for large amount of features. The default value for width and height is -1. If any of those arguments is set to -1, the normalization is performed based on the features themselves (see calcInfo).

Parameters:
rmresult of matcher of type gfm::MatchingResult
widthwidth factor defining the normalization parameters, default value -1
heightheight factor defining the normalization parameters, default value -1
jafar::traversability::MatchesContainer::MatchesContainer ( const KLT_FeatureTable ft,
int  idx0,
int  idx1,
int  width = -1,
int  height = -1 
)

Constructor constructing the matches container from a KLT feature table.

Parameters:
ftfeature table of type KLT_FEatureTable, consisting of data for at least two frames
idx0idx of frame 0, for a two-frame table: 0
idx1idx of frame 1, for a two-frame table: 1
widthwidth factor, pass only if data has to be normalized statically, default: -1
heightheight factor, pass only if data has to be normalized statically, default: -1
jafar::traversability::MatchesContainer::MatchesContainer ( jblas::mat points_ref,
jblas::mat points_mat,
int  width = -1,
int  height = -1 
)

Constructor taking the matches directly as matrix objects.

Parameters:
points_refreference points (image 0)
points_matmatched points (image 1)
widthimage width, pass only if data has to be normalized statically, default: -1
heightimage height, pass only if data has to be normalized statically, default: -1

Copy constructor performing a deep copy!

Parameters:
mcof class MatchesContainer

Member Function Documentation

void jafar::traversability::MatchesContainer::calcInfo ( int  width = -1,
int  height = -1 
) [private]

Calculate statistics (if necessary).

If width<0 or height<0 static info is calculated.

Undo the normalization.

It is assumed that the data already was normalized before.

A homography estimated with normalized data has to be updated with this function.

Parameters:
H01Homography from camera 1 to camera camera 0
Returns:
Updated homography from camera 1 to camera 0
int jafar::traversability::MatchesContainer::id ( int  idx) const [inline]

Get the identifier of the pair of match given by idx.

Parameters:
idxindex of match pair
Returns:
identifier of match pair

Definition at line 425 of file trv_util.hpp.

Returns:
false if not normalized, true if normalized

Definition at line 429 of file trv_util.hpp.

Returns:
number of matches.

Definition at line 419 of file trv_util.hpp.

Normalize both points_ref and points_match.

The points will be transformed such that the centroids lie around (0,0) and the standard deviation of the point scatter is sqrt(2). In the static mode, the statistics are replaced by predefined, heuristically determined paramters.

double jafar::traversability::MatchesContainer::point_match_u ( int  idx) const [inline]

Get u of point_match indexed by idx.

Parameters:
idxmatch index
Returns:
u of point_match

Definition at line 409 of file trv_util.hpp.

double jafar::traversability::MatchesContainer::point_match_v ( int  idx) const [inline]

Get v of point_match indexed by idx.

Parameters:
idxmatch index
Returns:
u of point_match

Definition at line 415 of file trv_util.hpp.

double jafar::traversability::MatchesContainer::point_ref_u ( int  idx) const [inline]

Get u of point_ref indexed by idx.

Parameters:
idxmatch index
Returns:
u of point_ref

Definition at line 397 of file trv_util.hpp.

double jafar::traversability::MatchesContainer::point_ref_v ( int  idx) const [inline]

Get v of point_ref indexed by idx.

Parameters:
idxmatch index
Returns:
u of point_ref

Definition at line 403 of file trv_util.hpp.

Returns:
pointer to points_match

Definition at line 391 of file trv_util.hpp.

Returns:
pointer to points_ref

Definition at line 387 of file trv_util.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:52 for Jafar by doxygen 1.7.6.1
LAAS-CNRS