mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
-Updated File menu with new actions "New database...", "Open database", "Close database" and "Edit database". Each new session will be automatically saved when closing the database. The "play" action cannot be activated until a new database is created or a previous session database is opened.
- Memory usage reviewed for the GUI: we don't uncompress data for downloaded nodes from "Download all clouds" action. - Odometry: added optional argument "initialPose" to reset() method git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1930 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -88,7 +88,7 @@ Signature::Signature(
|
||||
|
||||
Signature::~Signature()
|
||||
{
|
||||
ULOGGER_DEBUG("id=%d", _id);
|
||||
//ULOGGER_DEBUG("id=%d", _id);
|
||||
}
|
||||
|
||||
void Signature::addNeighbors(const std::map<int, Transform> & neighbors)
|
||||
@@ -247,9 +247,9 @@ void Signature::uncompressData()
|
||||
if(_imageRaw.empty() && _image.size())
|
||||
{
|
||||
//uncompress data
|
||||
util3d::CompressionThread ctImage(_image, true);
|
||||
util3d::CompressionThread ctDepth(_depth, true);
|
||||
util3d::CompressionThread ctDepth2D(_depth2D, false);
|
||||
util3d::CompressionThread ctImage(&_image, true);
|
||||
util3d::CompressionThread ctDepth(&_depth, true);
|
||||
util3d::CompressionThread ctDepth2D(&_depth2D, false);
|
||||
ctImage.start();
|
||||
ctDepth.start();
|
||||
ctDepth2D.start();
|
||||
@@ -262,4 +262,55 @@ void Signature::uncompressData()
|
||||
}
|
||||
}
|
||||
|
||||
void Signature::uncompressData(cv::Mat * image, cv::Mat * depth, cv::Mat * depth2D) const
|
||||
{
|
||||
if(image)
|
||||
{
|
||||
*image = _imageRaw;
|
||||
}
|
||||
if(depth)
|
||||
{
|
||||
*depth = _depthRaw;
|
||||
}
|
||||
if(depth2D)
|
||||
{
|
||||
*depth2D = _depth2DRaw;
|
||||
}
|
||||
if( (image && image->empty()) ||
|
||||
(depth && depth->empty()) ||
|
||||
(depth2D && depth2D->empty()))
|
||||
{
|
||||
util3d::CompressionThread ctImage(&_image, true);
|
||||
util3d::CompressionThread ctDepth(&_depth, true);
|
||||
util3d::CompressionThread ctDepth2D(&_depth2D, false);
|
||||
if(image && image->empty())
|
||||
{
|
||||
ctImage.start();
|
||||
}
|
||||
if(depth && depth->empty())
|
||||
{
|
||||
ctDepth.start();
|
||||
}
|
||||
if(depth2D && depth2D->empty())
|
||||
{
|
||||
ctDepth2D.start();
|
||||
}
|
||||
ctImage.join();
|
||||
ctDepth.join();
|
||||
ctDepth2D.join();
|
||||
if(image)
|
||||
{
|
||||
*image = ctImage.getUncompressedData();
|
||||
}
|
||||
if(depth)
|
||||
{
|
||||
*depth = ctDepth.getUncompressedData();
|
||||
}
|
||||
if(depth2D)
|
||||
{
|
||||
*depth2D = ctDepth2D.getUncompressedData();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} //namespace rtabmap
|
||||
|
||||
Reference in New Issue
Block a user