Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug in parameters to perform_griding? #166

Closed
charmoniumQ opened this issue May 18, 2021 · 1 comment
Closed

Possible bug in parameters to perform_griding? #166

charmoniumQ opened this issue May 18, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@charmoniumQ
Copy link
Contributor

At ov_core/src/track/TrackKLT.cpp:532, you call:

Grider_FAST::perform_griding(img1pyr.at(0), pts1_ext, num_features, num_featsneeded_1, grid_x, grid_y, threshold, true)

where num_features is an int.

But Grider_FAST::perform_griding is defined at ov_core/src/track/Grider_FAST.h:L94 as:

void perform_griding(const cv::Mat&, std::vector<cv::KeyPoint>&, bool, int, int, int, int, bool)

num_features is implicitly coerced into a boolean; the one which determines if griding is performed with multiple threads. Is this a mistake or is it intentional?

@goldbattle goldbattle added the bug Something isn't working label May 18, 2021
@goldbattle
Copy link
Member

Should be fixed, I did see some randomness which I made a small note:
https://github.com/rpng/open_vins/blob/master/ov_core/src/track/TrackKLT.cpp#L366-L379

// NOTE: if we multi-thread this atomic can cause some randomness due to multiple thread detecting features
// NOTE: this is due to the fact that we select update features based on feat id
// NOTE: thus the order will matter since we try to select oldest (smallest id) to update with
// NOTE: not sure how to remove... maybe a better way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants