Skip to content

Commit

Permalink
Remove a cluster from the cluster list if no close descriptors were f…
Browse files Browse the repository at this point in the history
…ound

Fixes dorian3d#39.
  • Loading branch information
ljanyst committed Nov 26, 2018
1 parent 4d08e9f commit 3ea44f1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/DBoW2/TemplatedVocabulary.h
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,10 @@ void TemplatedVocabulary<TDescriptor,F>::HKmeansStep(NodeId parent_id,


F::meanValue(cluster_descriptors, clusters[c]);
if (clusters[c].empty()) {
clusters.erase(clusters.begin() + c);
}

}

} // if(!first_time)
Expand Down

0 comments on commit 3ea44f1

Please sign in to comment.