Jafar
|
This class represents the actual interface between the modules and gfm and traversability. More...
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>
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::mat * | points_ref (void) |
jblas::mat * | points_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::vec * | weights (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 |
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).
rm | result of matcher of type gfm::MatchingResult |
width | width factor defining the normalization parameters, default value -1 |
height | height 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.
ft | feature table of type KLT_FEatureTable, consisting of data for at least two frames |
idx0 | idx of frame 0, for a two-frame table: 0 |
idx1 | idx of frame 1, for a two-frame table: 1 |
width | width factor, pass only if data has to be normalized statically, default: -1 |
height | height 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.
points_ref | reference points (image 0) |
points_mat | matched points (image 1) |
width | image width, pass only if data has to be normalized statically, default: -1 |
height | image height, pass only if data has to be normalized statically, default: -1 |
Copy constructor performing a deep copy!
mc | of class MatchesContainer |
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.
void jafar::traversability::MatchesContainer::denormalize | ( | void | ) |
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.
H01 | Homography from camera 1 to camera camera 0 |
int jafar::traversability::MatchesContainer::id | ( | int | idx | ) | const [inline] |
Get the identifier of the pair of match given by idx.
idx | index of match pair |
Definition at line 425 of file trv_util.hpp.
bool jafar::traversability::MatchesContainer::isNormalized | ( | void | ) | const [inline] |
Definition at line 429 of file trv_util.hpp.
int jafar::traversability::MatchesContainer::nOfMatches | ( | void | ) | const [inline] |
Definition at line 419 of file trv_util.hpp.
void jafar::traversability::MatchesContainer::normalize | ( | void | ) |
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.
idx | match index |
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.
idx | match index |
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.
idx | match index |
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.
idx | match index |
Definition at line 403 of file trv_util.hpp.
jblas::mat* jafar::traversability::MatchesContainer::points_match | ( | void | ) | [inline] |
Definition at line 391 of file trv_util.hpp.
jblas::mat* jafar::traversability::MatchesContainer::points_ref | ( | void | ) | [inline] |
Definition at line 387 of file trv_util.hpp.
Generated on Wed Oct 15 2014 00:37:52 for Jafar by doxygen 1.7.6.1 |