mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user