Tango: fixed database saved in memory option when disabled (now disabled by default)

This commit is contained in:
matlabbe
2017-10-08 21:55:27 -04:00
parent 9a09db9212
commit 49f9a1e8d7
20 changed files with 158 additions and 80 deletions
+16
View File
@@ -292,4 +292,20 @@ cv::Mat Signature::getPoseCovariance() const
return covariance;
}
long Signature::getMemoryUsed(bool withSensorData) const // Return memory usage in Bytes
{
long total = _words.size() * sizeof(float) * 8 +
_words3.size() * sizeof(float) * 4;
if(!_wordsDescriptors.empty())
{
total += _wordsDescriptors.size() * sizeof(int);
total += _wordsDescriptors.size() * _wordsDescriptors.begin()->second.total() * _wordsDescriptors.begin()->second.elemSize();
}
if(withSensorData)
{
total+=_sensorData.getMemoryUsed();
}
return total;
}
} //namespace rtabmap