Skip to content

Commit

Permalink
Fix match::projection (Remove GPL infringing code)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymd-stella committed Jan 29, 2022
1 parent 6f84d2c commit 172df99
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/openvslam/match/projection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,22 +140,23 @@ unsigned int projection::match_current_and_last_frames(data::frame& curr_frm, co

// Acquire keypoints in the cell where the reprojected 3D points exist
const auto last_scale_level = last_frm.frm_obs_.keypts_.at(idx_last).octave;
std::vector<unsigned int> indices;
int min_level;
int max_level;
if (assume_forward) {
indices = curr_frm.get_keypoints_in_cell(reproj(0), reproj(1),
margin * curr_frm.orb_params_->scale_factors_.at(last_scale_level),
last_scale_level, last_frm.orb_params_->num_levels_ - 1);
min_level = last_scale_level;
max_level = last_frm.orb_params_->num_levels_ - 1;
}
else if (assume_backward) {
indices = curr_frm.get_keypoints_in_cell(reproj(0), reproj(1),
margin * curr_frm.orb_params_->scale_factors_.at(last_scale_level),
0, last_scale_level);
min_level = 0;
max_level = last_scale_level;
}
else {
indices = curr_frm.get_keypoints_in_cell(reproj(0), reproj(1),
margin * curr_frm.orb_params_->scale_factors_.at(last_scale_level),
last_scale_level - 1, last_scale_level + 1);
min_level = last_scale_level - 1;
max_level = last_scale_level + 1;
}
auto indices = curr_frm.get_keypoints_in_cell(reproj(0), reproj(1),
margin * curr_frm.orb_params_->scale_factors_.at(last_scale_level),
min_level, max_level);
if (indices.empty()) {
continue;
}
Expand Down

0 comments on commit 172df99

Please sign in to comment.