SensorData: updated how compressed user_data is detected

This commit is contained in:
matlabbe
2016-09-26 16:33:24 -04:00
parent a4dd47374e
commit b7fae1a65b
4 changed files with 31 additions and 10 deletions

View File

@@ -133,6 +133,13 @@ public:
int getSignatureIdByLabel(const std::string & label, bool lookInDatabase = true) const;
bool labelSignature(int id, const std::string & label);
std::map<int, std::string> getAllLabels() const;
/**
* Set user data. Detect automatically if raw or compressed. If raw, the data is
* compressed too. A matrix of type CV_8UC1 with 1 row is considered as compressed.
* If you have one dimension unsigned 8 bits raw data, make sure to transpose it
* (to have multiple rows instead of multiple columns) in order to be detected as
* not compressed.
*/
bool setUserData(int id, const cv::Mat & data);
int getDatabaseMemoryUsed() const; // in bytes
std::string getDatabaseVersion() const;

View File

@@ -101,6 +101,13 @@ public:
int triggerNewMap();
bool labelLocation(int id, const std::string & label);
/**
* Set user data. Detect automatically if raw or compressed. If raw, the data is
* compressed too. A matrix of type CV_8UC1 with 1 row is considered as compressed.
* If you have one dimension unsigned 8 bits raw data, make sure to transpose it
* (to have multiple rows instead of multiple columns) in order to be detected as
* not compressed.
*/
bool setUserData(int id, const cv::Mat & data);
void generateDOTGraph(const std::string & path, int id=0, int margin=5);
void exportPoses(

View File

@@ -187,7 +187,14 @@ public:
const StereoCameraModel & stereoCameraModel() const {return _stereoCameraModel;}
void setUserDataRaw(const cv::Mat & userDataRaw); // only set raw
void setUserData(const cv::Mat & userData); // detect automatically if raw or compressed. If raw, the data is compressed too.
/**
* Set user data. Detect automatically if raw or compressed. If raw, the data is
* compressed too. A matrix of type CV_8UC1 with 1 row is considered as compressed.
* If you have one dimension unsigned 8 bits raw data, make sure to transpose it
* (to have multiple rows instead of multiple columns) in order to be detected as
* not compressed.
*/
void setUserData(const cv::Mat & userData);
const cv::Mat & userDataRaw() const {return _userDataRaw;}
const cv::Mat & userDataCompressed() const {return _userDataCompressed;}