Main MRPT website > C++ reference for MRPT 1.5.9
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
mrpt::pbmap::SubgraphMatcher Class Reference

Detailed Description

This class finds the best correspondence between the planes of two subgraphs (i.e. sets of neighbor planes). It relies on an interpretation tree employing geometric restrictions that are represented as a set of unary and binary constraints.

Definition at line 37 of file SubgraphMatcher.h.

#include <mrpt/pbmap/SubgraphMatcher.h>

Public Member Functions

 SubgraphMatcher ()
 
bool evalUnaryConstraints (Plane &plane1, Plane &plane2, PbMap &trgPbMap, bool useStructure=false)
 ! Check if the two input planes could be the same More...
 
bool evalUnaryConstraints2D (Plane &plane1, Plane &plane2, PbMap &trgPbMap, bool useStructure=false)
 
bool evalUnaryConstraintsOdometry (Plane &plane1, Plane &plane2, PbMap &trgPbMap, bool useStructure=false)
 
bool evalUnaryConstraintsOdometry2D (Plane &plane1, Plane &plane2, PbMap &trgPbMap, bool useStructure=false)
 
bool evalBinaryConstraints (Plane &plane1, Plane &plane2, Plane &planeA, Plane &planeB)
 ! Compares the relation between Ref-neigRef with the relation between Check-neigCheck. More...
 
bool evalBinaryConstraintsOdometry (Plane &plane1, Plane &plane2, Plane &planeA, Plane &planeB)
 
void exploreSubgraphTreeR (std::set< unsigned > &evalRef, std::set< unsigned > &evalCheck, std::map< unsigned, unsigned > &matched)
 ! Recursive function that checks all the relations (direct and crossed) in the neighborhood of a plane. More...
 
void exploreSubgraphTreeR_Area (std::set< unsigned > &evalRef, std::set< unsigned > &evalCheck, std::map< unsigned, unsigned > &matched)
 
void setSourceSubgraph (Subgraph &subgSrc)
 
void setTargetSubgraph (Subgraph &subgTrg)
 
std::map< unsigned, unsigned > compareSubgraphs (Subgraph &subgraphSource, Subgraph &subgraphTarget, const int option=0)
 
float calcAreaMatched (std::map< unsigned, unsigned > &matched_planes)
 

Public Attributes

std::vector< std::map< unsigned, unsigned > > alreadyExplored
 
SubgraphsubgraphSrc
 
SubgraphsubgraphTrg
 
int nCheckConditions
 
int totalUnary
 
int semanticPair
 
int rejectSemantic
 
config_heuristics configLocaliser
 

Private Member Functions

float calcAreaUnmatched (std::set< unsigned > &unmatched_planes)
 

Private Attributes

std::map< unsigned, unsigned > winnerMatch
 
float areaWinnerMatch
 
std::vector< std::vector< int8_t > > hashUnaryConstraints
 

Constructor & Destructor Documentation

◆ SubgraphMatcher()

SubgraphMatcher::SubgraphMatcher ( )

Definition at line 41 of file SubgraphMatcher.cpp.

Member Function Documentation

◆ calcAreaMatched()

float SubgraphMatcher::calcAreaMatched ( std::map< unsigned, unsigned > &  matched_planes)

Return the total area of the matched planes in the frame source.

Definition at line 1055 of file SubgraphMatcher.cpp.

◆ calcAreaUnmatched()

float SubgraphMatcher::calcAreaUnmatched ( std::set< unsigned > &  unmatched_planes)
private

Definition at line 1064 of file SubgraphMatcher.cpp.

◆ compareSubgraphs()

std::map< unsigned, unsigned > SubgraphMatcher::compareSubgraphs ( Subgraph subgraphSource,
Subgraph subgraphTarget,
const int  option = 0 
)

Returns a list with plane matches from subgraphSrc to subgraphTrg.

Definition at line 1100 of file SubgraphMatcher.cpp.

References option, and mrpt::pbmap::Subgraph::subgraphPlanesIdx.

Referenced by mrpt::pbmap::PbMapLocaliser::searchPlaneContext().

◆ evalBinaryConstraints()

bool SubgraphMatcher::evalBinaryConstraints ( Plane Ref,
Plane neigRef,
Plane Check,
Plane neigCheck 
)

! Compares the relation between Ref-neigRef with the relation between Check-neigCheck.

Check if the two pair of planes plane1-plane2 ans planeA-planeB fulfill the same geometric relationship, and so, if they are candidates to be the same planes.

Returns true if both geometries are similar

Definition at line 632 of file SubgraphMatcher.cpp.

References mrpt::pbmap::Plane::areaHull, mrpt::pbmap::Plane::areaVoxels, mrpt::pbmap::Plane::bFromStructure, mrpt::pbmap::Plane::bFullExtent, mrpt::pbmap::Plane::id, mrpt::math::norm(), RAD2DEG, mrpt::pbmap::Plane::v3center, and mrpt::pbmap::Plane::v3normal.

Referenced by mrpt::pbmap::PbMapLocaliser::compareSubgraphNeighbors().

◆ evalBinaryConstraintsOdometry()

bool mrpt::pbmap::SubgraphMatcher::evalBinaryConstraintsOdometry ( Plane plane1,
Plane plane2,
Plane planeA,
Plane planeB 
)

◆ evalUnaryConstraints()

bool SubgraphMatcher::evalUnaryConstraints ( Plane plane1,
Plane plane2,
PbMap trgPbMap,
bool  useStructure = false 
)

! Check if the two input planes could be the same

Check if the two input planes fulfill a set of geometric constraints, and so, if they are candidates to be the same plane.

Definition at line 49 of file SubgraphMatcher.cpp.

References mrpt::pbmap::Plane::areaHull, mrpt::pbmap::Plane::bFromStructure, mrpt::pbmap::Plane::bFullExtent, BhattacharyyaDist_(), mrpt::pbmap::Plane::elongation, mrpt::pbmap::Plane::hist_H, and mrpt::pbmap::Plane::id.

Referenced by mrpt::pbmap::PbMapLocaliser::compareSubgraphNeighbors().

◆ evalUnaryConstraints2D()

bool SubgraphMatcher::evalUnaryConstraints2D ( Plane plane1,
Plane plane2,
PbMap trgPbMap,
bool  useStructure = false 
)

◆ evalUnaryConstraintsOdometry()

bool SubgraphMatcher::evalUnaryConstraintsOdometry ( Plane plane1,
Plane plane2,
PbMap trgPbMap,
bool  useStructure = false 
)

◆ evalUnaryConstraintsOdometry2D()

bool SubgraphMatcher::evalUnaryConstraintsOdometry2D ( Plane plane1,
Plane plane2,
PbMap trgPbMap,
bool  useStructure = false 
)

◆ exploreSubgraphTreeR()

void SubgraphMatcher::exploreSubgraphTreeR ( std::set< unsigned > &  evalRef,
std::set< unsigned > &  evalCheck,
std::map< unsigned, unsigned > &  matched 
)

! Recursive function that checks all the relations (direct and crossed) in the neighborhood of a plane.

Find the best combination of planes correspondences given two subgraphs represeting local neighborhoods of planes.

This function make redundant checks and therefore is NOT efficient at all

Definition at line 800 of file SubgraphMatcher.cpp.

References min.

◆ exploreSubgraphTreeR_Area()

void SubgraphMatcher::exploreSubgraphTreeR_Area ( std::set< unsigned > &  evalRef,
std::set< unsigned > &  evalCheck,
std::map< unsigned, unsigned > &  matched 
)

Definition at line 931 of file SubgraphMatcher.cpp.

References min.

◆ setSourceSubgraph()

void mrpt::pbmap::SubgraphMatcher::setSourceSubgraph ( Subgraph subgSrc)
inline

Set source (current) subgraph.

Definition at line 62 of file SubgraphMatcher.h.

References subgraphSrc.

◆ setTargetSubgraph()

void mrpt::pbmap::SubgraphMatcher::setTargetSubgraph ( Subgraph subgTrg)
inline

Set target subgraph.

Definition at line 65 of file SubgraphMatcher.h.

References subgraphTrg.

Member Data Documentation

◆ alreadyExplored

std::vector<std::map<unsigned,unsigned> > mrpt::pbmap::SubgraphMatcher::alreadyExplored

List of combinations that have been explored in the interpretation tree.

Definition at line 55 of file SubgraphMatcher.h.

◆ areaWinnerMatch

float mrpt::pbmap::SubgraphMatcher::areaWinnerMatch
private

Definition at line 93 of file SubgraphMatcher.h.

◆ configLocaliser

config_heuristics mrpt::pbmap::SubgraphMatcher::configLocaliser

◆ hashUnaryConstraints

std::vector<std::vector<int8_t> > mrpt::pbmap::SubgraphMatcher::hashUnaryConstraints
private

Hash table for unary constraints.

Definition at line 96 of file SubgraphMatcher.h.

◆ nCheckConditions

int mrpt::pbmap::SubgraphMatcher::nCheckConditions

Definition at line 77 of file SubgraphMatcher.h.

Referenced by mrpt::pbmap::PbMapLocaliser::run().

◆ rejectSemantic

int mrpt::pbmap::SubgraphMatcher::rejectSemantic

Definition at line 81 of file SubgraphMatcher.h.

◆ semanticPair

int mrpt::pbmap::SubgraphMatcher::semanticPair

Definition at line 80 of file SubgraphMatcher.h.

◆ subgraphSrc

Subgraph* mrpt::pbmap::SubgraphMatcher::subgraphSrc

One subgraph to be matched.

Definition at line 72 of file SubgraphMatcher.h.

Referenced by mrpt::pbmap::PbMapLocaliser::compareSubgraphNeighbors(), and setSourceSubgraph().

◆ subgraphTrg

Subgraph* mrpt::pbmap::SubgraphMatcher::subgraphTrg

The other subgraph to be matched.

Definition at line 75 of file SubgraphMatcher.h.

Referenced by mrpt::pbmap::PbMapLocaliser::compareSubgraphNeighbors(), and setTargetSubgraph().

◆ totalUnary

int mrpt::pbmap::SubgraphMatcher::totalUnary

Definition at line 79 of file SubgraphMatcher.h.

◆ winnerMatch

std::map<unsigned, unsigned> mrpt::pbmap::SubgraphMatcher::winnerMatch
private

List of planes correspondences.

Definition at line 92 of file SubgraphMatcher.h.




Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020