mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-04 00:57:46 +08:00
Retrieval margin spreading +2
Rollback change about last location in WM not used in posterior (now it is) In consoleApp, surf extraction is done outside the rtabmap processing git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@295 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
+14
-18
@@ -660,25 +660,21 @@ std::map<int, float> Memory::computeLikelihood(const Signature * signature, cons
|
||||
std::map<int, int>::const_iterator iter = wm.begin();
|
||||
for(; iter!=wm.end(); ++iter)
|
||||
{
|
||||
//ignore the last in WM
|
||||
if(iter->first != wm.rbegin()->first)
|
||||
float sim = signature->compareTo(this->getSignature(iter->first));
|
||||
likelihood.insert(likelihood.end(), std::pair<int, float>(iter->first, sim));
|
||||
sumSimilarity += sim;
|
||||
UDEBUG("sim %d with %d = %f", signature->id(), iter->first, sim);
|
||||
if(sim>maxSim)
|
||||
{
|
||||
float sim = signature->compareTo(this->getSignature(iter->first));
|
||||
likelihood.insert(likelihood.end(), std::pair<int, float>(iter->first, sim));
|
||||
sumSimilarity += sim;
|
||||
UDEBUG("sim %d with %d = %f", signature->id(), iter->first, sim);
|
||||
if(sim>maxSim)
|
||||
{
|
||||
maxSim = sim;
|
||||
}
|
||||
if(sim)
|
||||
{
|
||||
++nonNulls;
|
||||
}
|
||||
else
|
||||
{
|
||||
++nulls;
|
||||
}
|
||||
maxSim = sim;
|
||||
}
|
||||
if(sim)
|
||||
{
|
||||
++nonNulls;
|
||||
}
|
||||
else
|
||||
{
|
||||
++nulls;
|
||||
}
|
||||
}
|
||||
ULOGGER_DEBUG("sumSimilarity=%f, maxSim=%f, nonNulls=%d, nulls=%d)", sumSimilarity, maxSim, nonNulls, nulls);
|
||||
|
||||
Reference in New Issue
Block a user