34 #include <QHBoxLayout>
35 #include <QPushButton>
36 #include <QProgressBar>
41 const QMap<int, Signature> * cache,
42 const std::map<int, int> * mapIds,
53 imageView_->setObjectName(
"multisession_imageview");
59 this->setLayout(
new QHBoxLayout());
60 QVBoxLayout * vLayout =
new QVBoxLayout();
62 QHBoxLayout * hLayout =
new QHBoxLayout();
65 vLayout->addLayout(hLayout, 0);
66 ((QHBoxLayout*)this->layout())->addLayout(vLayout, 1);
79 loopLinks.insert(localLinks.begin(), localLinks.end());
81 if(!loopLinks.empty())
108 std::map<int, std::pair<int, float> > top;
109 const std::map<int, float> & likelihood =
stats.posterior();
110 for(std::map<int, float>::const_iterator
iter=likelihood.begin();
iter!=likelihood.end(); ++
iter)
118 ((QHBoxLayout*)this->layout())->addWidget(subView, 1);
119 subViews_.insert(std::make_pair(mapId, std::make_pair(subView, 0)));
122 if(top.find(mapId) == top.end() || top.at(mapId).second <
iter->second)
124 uInsert(top, std::make_pair(mapId, std::make_pair(
iter->first,
iter->second)));
133 for(std::multimap<int, Link>::iterator jter=loopLinks.begin(); jter!=loopLinks.end(); ++jter)
137 int mapId =
mapIds_->at(jter->first);
138 iter->second.second += mapId==
iter->first?1:0;
144 int nodeId = top.at(
iter->first).first;
145 if(
cache_->contains(nodeId))
150 Link link = loopLinks.find(nodeId) != loopLinks.end()?loopLinks.find(nodeId)->second:
Link();
151 std::multimap<int, cv::KeyPoint> keypoints;
152 for(std::multimap<int, int>::const_iterator jter=
s.getWords().begin(); jter!=
s.getWords().end(); ++jter)
154 if(jter->first>0 && lastSignature.
getWords().find(jter->first) != lastSignature.
getWords().end())
156 keypoints.insert(std::make_pair(jter->first,
s.getWordsKpts()[jter->second]));
160 if(!keypoints.empty())
162 s.sensorData().uncompressDataConst(&image, 0);
165 iter->second.first->updateView(
175 iter->second.first->clear();
180 iter->second.first->clear();
185 iter->second.first->clear();
190 iter->second.first->clear();
198 delete iter->second.first;