32 #include <pcl/point_types.h> 33 #include <opencv2/core/core.hpp> 34 #include <opencv2/features2d/features2d.hpp> 35 #include <opencv2/imgproc/imgproc.hpp> 57 const std::string & label = std::string(),
67 float compareTo(
const Signature & signature)
const;
68 bool isBadSignature()
const;
70 int id()
const {
return _id;}
71 int mapId()
const {
return _mapId;}
73 void setWeight(
int weight) {_modified=_weight!=weight;_weight = weight;}
76 void setLabel(
const std::string & label) {_modified=_label.compare(label)!=0;_label = label;}
77 const std::string &
getLabel()
const {
return _label;}
81 void addLinks(
const std::list<Link> & links);
82 void addLinks(
const std::map<int, Link> & links);
83 void addLink(
const Link & link);
85 bool hasLink(
int idTo)
const;
87 void changeLinkIds(
int idFrom,
int idTo);
90 void removeLink(
int idTo);
91 void removeVirtualLinks();
94 void setModified(
bool modified) {_modified = modified; _linksModified = modified;}
96 const std::map<int, Link> &
getLinks()
const {
return _links;}
98 bool isModified()
const {
return _modified || _linksModified;}
102 void removeAllWords();
103 void removeWord(
int wordId);
104 void changeWordsRef(
int oldWordId,
int activeWordId);
105 void setWords(
const std::multimap<int, cv::KeyPoint> & words);
108 const std::multimap<int, cv::KeyPoint> &
getWords()
const {
return _words;}
112 void setWordsDescriptors(
const std::multimap<int, cv::Mat> & descriptors) {_wordsDescriptors = descriptors;}
115 void setWords3(
const std::multimap<int, cv::Point3f> & words3) {_words3 = words3;}
118 void setVelocity(
float vx,
float vy,
float vz,
float vroll,
float vpitch,
float vyaw) {
119 _velocity = std::vector<float>(6,0);
128 const std::multimap<int, cv::Point3f> &
getWords3()
const {
return _words3;}
130 cv::Mat getPoseCovariance()
const;
132 const std::vector<float> &
getVelocity()
const {
return _velocity;}
137 long getMemoryUsed(
bool withSensorData=
true)
const;
const std::multimap< int, cv::Point3f > & getWords3() const
const Transform & getGroundTruthPose() const
const std::multimap< int, cv::KeyPoint > & getWords() const
void setWords3(const std::multimap< int, cv::Point3f > &words3)
const std::vector< float > & getVelocity() const
int getInvalidWordsCount() const
void setGroundTruthPose(const Transform &pose)
const SensorData & sensorData() const
const std::multimap< int, cv::Mat > & getWordsDescriptors() const
std::multimap< int, cv::KeyPoint > _words
void setEnabled(bool enabled)
std::vector< float > _velocity
bool isLinksModified() const
const std::string & getLabel() const
std::multimap< int, cv::Mat > _wordsDescriptors
Transform _groundTruthPose
void setWeight(int weight)
const std::map< int, int > & getWordsChanged() const
std::multimap< int, cv::Point3f > _words3
void setWordsDescriptors(const std::multimap< int, cv::Mat > &descriptors)
void setVelocity(float vx, float vy, float vz, float vroll, float vpitch, float vyaw)
void setPose(const Transform &pose)
void setSaved(bool saved)
void setLabel(const std::string &label)
const std::map< int, Link > & getLinks() const
const Transform & getPose() const
SensorData & sensorData()
std::map< int, Link > _links
void setModified(bool modified)
std::map< int, int > _wordsChanged