0.15: statistics are now compressed in database. Eigen issue: using linear() instead of rotation() to get rotation from affine3f. Increased loading speed of statistics in DatabaseViewer. Added graph:calcRMSE().

This commit is contained in:
matlabbe
2017-11-09 12:03:01 -05:00
parent 8cdd138143
commit 71d9816f4b
22 changed files with 685 additions and 602 deletions
+17
View File
@@ -270,4 +270,21 @@ cv::Mat uncompressData(const unsigned char * bytes, unsigned long size)
return data;
}
cv::Mat compressString(const std::string & str)
{
// +1 to include null character
return compressData2(cv::Mat(1, str.size()+1, CV_8SC1, (void *)str.data()));
}
std::string uncompressString(const cv::Mat & bytes)
{
cv::Mat strMat = uncompressData(bytes);
if(!strMat.empty())
{
UASSERT(strMat.type() == CV_8SC1 && strMat.rows == 1);
return (const char*)strMat.data;
}
return "";
}
} /* namespace rtabmap */