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);
87 void changeLinkIds(
int idFrom,
int idTo);
89 void removeLinks(
bool keepSelfReferringLinks =
false);
90 void removeLink(
int idTo);
91 void removeVirtualLinks();
93 void addLandmark(
const Link & landmark) {_landmarks.insert(std::make_pair(landmark.
to(), landmark));}
94 const std::map<int, Link> &
getLandmarks()
const {
return _landmarks;}
98 void setModified(
bool modified) {_modified = modified; _linksModified = modified;}
100 const std::multimap<int, Link> &
getLinks()
const {
return _links;}
102 bool isModified()
const {
return _modified || _linksModified;}
106 void removeAllWords();
107 void changeWordsRef(
int oldWordId,
int activeWordId);
108 void setWords(
const std::multimap<int, int> & words,
const std::vector<cv::KeyPoint> & keypoints,
const std::vector<cv::Point3f> & words3,
const cv::Mat & descriptors);
111 const std::multimap<int, int> &
getWords()
const {
return _words;}
112 const std::vector<cv::KeyPoint> &
getWordsKpts()
const {
return _wordsKpts;}
116 void setWordsDescriptors(
const cv::Mat & descriptors);
121 void setVelocity(
float vx,
float vy,
float vz,
float vroll,
float vpitch,
float vyaw) {
122 _velocity = std::vector<float>(6,0);
131 const std::vector<cv::Point3f> &
getWords3()
const {
return _words3;}
133 cv::Mat getPoseCovariance()
const;
135 const std::vector<float> &
getVelocity()
const {
return _velocity;}
140 unsigned long getMemoryUsed(
bool withSensorData=
true)
const;
const Transform & getGroundTruthPose() const
const std::vector< float > & getVelocity() const
int getInvalidWordsCount() const
const cv::Mat & getWordsDescriptors() const
bool isLinksModified() const
cv::Mat _wordsDescriptors
void setGroundTruthPose(const Transform &pose)
const std::vector< cv::Point3f > & getWords3() const
std::map< int, Link > _landmarks
const std::string & getLabel() const
void setEnabled(bool enabled)
std::vector< float > _velocity
const std::map< int, Link > & getLandmarks() const
const std::vector< cv::KeyPoint > & getWordsKpts() const
std::vector< cv::Point3f > _words3
Transform _groundTruthPose
std::vector< cv::KeyPoint > _wordsKpts
void setWeight(int weight)
const std::multimap< int, Link > & getLinks() const
void addLandmark(const Link &landmark)
std::multimap< int, int > _words
void setVelocity(float vx, float vy, float vz, float vroll, float vpitch, float vyaw)
std::multimap< int, Link > _links
const SensorData & sensorData() const
void setPose(const Transform &pose)
void setSaved(bool saved)
void setLabel(const std::string &label)
SensorData & sensorData()
void setModified(bool modified)
const Transform & getPose() const
const std::map< int, int > & getWordsChanged() const
std::map< int, int > _wordsChanged
const std::multimap< int, int > & getWords() const