Skip to content

Commit 6c4464d

Browse files
committed
Remove remove a cluster from the cluster list if no close descriptors were found
Fixes dorian3d#39.
1 parent 4d08e9f commit 6c4464d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/DBoW2/TemplatedVocabulary.h

+4
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@ void TemplatedVocabulary<TDescriptor,F>::HKmeansStep(NodeId parent_id,
712712

713713

714714
F::meanValue(cluster_descriptors, clusters[c]);
715+
if (clusters[c].empty()) {
716+
clusters.erase(clusters.begin() + c);
717+
}
718+
715719
}
716720

717721
} // if(!first_time)

0 commit comments

Comments
 (0)