mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
DbViewer: added mapId
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1561 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -690,6 +690,7 @@ void DatabaseViewer::update(int value,
|
||||
{
|
||||
view->clear();
|
||||
int id = ids_.at(value);
|
||||
int mapId = -1;
|
||||
labelId->setText(QString::number(id));
|
||||
if(id>0)
|
||||
{
|
||||
@@ -712,15 +713,14 @@ void DatabaseViewer::update(int value,
|
||||
{
|
||||
imgDepth = uCvMat2QImage(depthMat);
|
||||
}
|
||||
}
|
||||
|
||||
if(memory_)
|
||||
{
|
||||
std::multimap<int, cv::KeyPoint> words = memory_->getWords(id);
|
||||
if(words.size())
|
||||
{
|
||||
view->setFeatures(words);
|
||||
}
|
||||
|
||||
mapId = memory_->getMapId(id);
|
||||
}
|
||||
|
||||
if(!img.isNull())
|
||||
@@ -765,7 +765,14 @@ void DatabaseViewer::update(int value,
|
||||
}
|
||||
}
|
||||
|
||||
labelId->setText(QString::number(id));
|
||||
if(mapId>=0)
|
||||
{
|
||||
labelId->setText(QString("%1 [%2]").arg(id).arg(mapId));
|
||||
}
|
||||
else
|
||||
{
|
||||
labelId->setText(QString::number(id));
|
||||
}
|
||||
view->fitInView(view->scene()->itemsBoundingRect(), Qt::KeepAspectRatio);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user