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 RefneigRef with the relation between CheckneigCheck. 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 
Subgraph *  subgraphSrc 
Subgraph *  subgraphTrg 
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 
SubgraphMatcher::SubgraphMatcher  (  ) 
Definition at line 41 of file SubgraphMatcher.cpp.
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.

private 
Definition at line 1064 of file SubgraphMatcher.cpp.
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().
bool SubgraphMatcher::evalBinaryConstraints  (  Plane &  Ref, 
Plane &  neigRef,  
Plane &  Check,  
Plane &  neigCheck  
) 
! Compares the relation between RefneigRef with the relation between CheckneigCheck.
Check if the two pair of planes plane1plane2 ans planeAplaneB 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().
bool mrpt::pbmap::SubgraphMatcher::evalBinaryConstraintsOdometry  (  Plane &  plane1, 
Plane &  plane2,  
Plane &  planeA,  
Plane &  planeB  
) 
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().
bool SubgraphMatcher::evalUnaryConstraints2D  (  Plane &  plane1, 
Plane &  plane2,  
PbMap &  trgPbMap,  
bool  useStructure = false 

) 
Definition at line 327 of file SubgraphMatcher.cpp.
References mrpt::pbmap::Plane::areaHull, mrpt::pbmap::Plane::bFromStructure, mrpt::pbmap::Plane::bFullExtent, BhattacharyyaDist_(), mrpt::pbmap::Plane::d, mrpt::pbmap::Plane::elongation, mrpt::pbmap::Plane::hist_H, mrpt::pbmap::Plane::id, and mrpt::pbmap::Plane::v3normal.
bool SubgraphMatcher::evalUnaryConstraintsOdometry  (  Plane &  plane1, 
Plane &  plane2,  
PbMap &  trgPbMap,  
bool  useStructure = false 

) 
Definition at line 178 of file SubgraphMatcher.cpp.
References mrpt::pbmap::Plane::areaHull, mrpt::pbmap::Plane::bFromStructure, mrpt::pbmap::Plane::bFullExtent, BhattacharyyaDist_(), mrpt::pbmap::Plane::d, mrpt::pbmap::Plane::elongation, mrpt::pbmap::Plane::hist_H, mrpt::pbmap::Plane::id, and mrpt::pbmap::Plane::v3normal.
bool SubgraphMatcher::evalUnaryConstraintsOdometry2D  (  Plane &  plane1, 
Plane &  plane2,  
PbMap &  trgPbMap,  
bool  useStructure = false 

) 
Definition at line 467 of file SubgraphMatcher.cpp.
References mrpt::pbmap::Plane::areaHull, mrpt::pbmap::Plane::bFromStructure, mrpt::pbmap::Plane::bFullExtent, BhattacharyyaDist_(), mrpt::pbmap::Plane::d, mrpt::pbmap::Plane::elongation, mrpt::pbmap::Plane::hist_H, mrpt::pbmap::Plane::id, and mrpt::pbmap::Plane::v3normal.
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.
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.
Set source (current) subgraph.
Definition at line 62 of file SubgraphMatcher.h.
References subgraphSrc.
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.

private 
Definition at line 93 of file SubgraphMatcher.h.
config_heuristics mrpt::pbmap::SubgraphMatcher::configLocaliser 
Set of thresholds for PbMap matching.
Definition at line 87 of file SubgraphMatcher.h.
Referenced by mrpt::pbmap::PbMapLocaliser::compareSubgraphNeighbors(), mrpt::pbmap::PbMapLocaliser::PbMapLocaliser(), mrpt::pbmap::PbMapLocaliser::run(), and mrpt::pbmap::PbMapLocaliser::searchPlaneContext().

private 
Hash table for unary constraints.
Definition at line 96 of file SubgraphMatcher.h.
int mrpt::pbmap::SubgraphMatcher::nCheckConditions 
Definition at line 77 of file SubgraphMatcher.h.
Referenced by mrpt::pbmap::PbMapLocaliser::run().
int mrpt::pbmap::SubgraphMatcher::rejectSemantic 
Definition at line 81 of file SubgraphMatcher.h.
int mrpt::pbmap::SubgraphMatcher::semanticPair 
Definition at line 80 of file SubgraphMatcher.h.
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().
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().
int mrpt::pbmap::SubgraphMatcher::totalUnary 
Definition at line 79 of file SubgraphMatcher.h.

private 
List of planes correspondences.
Definition at line 92 of file SubgraphMatcher.h.
Page generated by Doxygen 1.8.14 for MRPT 1.5.5 Git: e06b63dbf Fri Dec 1 14:41:11 2017 +0100 at lun oct 28 01:31:35 CET 2019 