Skip to content

fixing centroids override by using cv::mat deep copy#53

Open
yinonb4 wants to merge 1 commit intormsalinas:masterfrom
yinonb4:centroids_bugfix
Open

fixing centroids override by using cv::mat deep copy#53
yinonb4 wants to merge 1 commit intormsalinas:masterfrom
yinonb4:centroids_bugfix

Conversation

@yinonb4
Copy link

@yinonb4 yinonb4 commented Jul 26, 2023

Hi
as part of working and improving orb slam 3, we encountered a bug in assigning new centroids to the voc tree.

we offer simple and clean solution to this in the following commit.

when creating a new voc tree from around 1 million features in the orbslam3 voc.txt, we found that features which are selected as cluster centers during the k-medians are mutated, meaning the leaves that are supposed to represent those features actually hold the mutated version (cluster centers). for example, in a tree with around 900k leaves, we noticed about 200k were mutated.

this damaged the correctness of the voc tree, since we needed to assign weights to each feature/leaf, using the original voc.txt weights. this means mutated features had no correct weights. after this change, we notice no original feature was mutated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant