Added screenshots for ProcessADataSet tutorial.

Updated default parameter "RawDataKept" in database to true.
Fixed a bug of showing rejected loop closure image in GUI when RawDataKept=false and the loop closure id is not set (only highestHypothesisId when the loop is rejected).

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@211 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2011-06-21 18:32:23 +00:00
parent fb48cce623
commit f7cf230c87
11 changed files with 11 additions and 11 deletions

View File

@@ -425,11 +425,14 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
if(stat.loopClosureId()>0 || highestHypothesisId>0)
{
int id = stat.loopClosureId()>0?stat.loopClosureId():highestHypothesisId;
QByteArray ba;
QBuffer buffer(&ba);
buffer.open(QIODevice::WriteOnly);
lcImg.save(&buffer, "JPEG"); // writes image into JPEG format
_imagesMap.insert(id, ba);
if(!_imagesMap.contains(id))
{
QByteArray ba;
QBuffer buffer(&ba);
buffer.open(QIODevice::WriteOnly);
lcImg.save(&buffer, "JPEG"); // writes image into JPEG format
_imagesMap.insert(id, ba);
}
}
}
}
@@ -475,7 +478,8 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
{
if(lcImg.isNull())
{
QMap<int, QByteArray>::iterator iter = _imagesMap.find(stat.loopClosureId());
int id = stat.loopClosureId()>0?stat.loopClosureId():highestHypothesisId;
QMap<int, QByteArray>::iterator iter = _imagesMap.find(id);
if(iter != _imagesMap.end())
{
if(!lcImg.loadFromData(iter.value(), "JPEG"))
@@ -484,10 +488,6 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
lcImg = QImage();
}
}
else if(stat.loopClosureImage())
{
lcImg = Ipl2QImage(stat.loopClosureImage());
}
}
if(!lcImg.isNull())