-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:
matlabbe
2014-10-28 01:20:57 +00:00
parent 457c068e0f
commit b56e03b463
30 changed files with 632 additions and 424 deletions

View File

@@ -66,6 +66,7 @@ namespace util3d
// format : ".png" ".jpg" "" (empty is general)
CompressionThread::CompressionThread(const cv::Mat & mat, const std::string & format) :
constCompressedData_(0),
uncompressedData_(mat),
format_(format),
image_(!format.empty()),
@@ -74,8 +75,8 @@ CompressionThread::CompressionThread(const cv::Mat & mat, const std::string & fo
UASSERT(format.empty() || format.compare(".png") == 0 || format.compare(".jpg") == 0);
}
// assume image
CompressionThread::CompressionThread(const std::vector<unsigned char> & bytes, bool isImage) :
compressedData_(bytes),
CompressionThread::CompressionThread(const std::vector<unsigned char> * bytes, bool isImage) :
constCompressedData_(bytes),
image_(isImage),
compressMode_(false)
{}
@@ -97,15 +98,15 @@ void CompressionThread::mainLoop()
}
else // uncompress
{
if(!compressedData_.empty())
if(constCompressedData_ && constCompressedData_->size())
{
if(image_)
{
uncompressedData_ = uncompressImage(compressedData_);
uncompressedData_ = uncompressImage(*constCompressedData_);
}
else
{
uncompressedData_ = uncompressData(compressedData_);
uncompressedData_ = uncompressData(*constCompressedData_);
}
}
}