Skip to content

Commit

Permalink
Fix orbmatcher (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
izhengfan authored Nov 21, 2020
1 parent d9bb4ae commit fab42cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ORBmatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int ORBmatcher::SearchByBoW(PtrKeyFrame pKF1, PtrKeyFrame pKF2,
for(int i=0;i<HISTO_LENGTH;i++)
rotHist[i].reserve(500);

const float factor = 1.0f/HISTO_LENGTH;
const float factor = (float)HISTO_LENGTH / 360.0f ;

int nmatches = 0;

Expand Down Expand Up @@ -284,7 +284,7 @@ int ORBmatcher::MatchByWindow(const Frame &frame1, Frame &frame2,
vector<int> rotHist[HISTO_LENGTH];
for(int i = 0; i < HISTO_LENGTH; i++)
rotHist[i].reserve(500);
const float factor = 1.f / (float)HISTO_LENGTH;
const float factor = (float)HISTO_LENGTH / 360.0f ;

vector<int> vMatchesDistance(frame2.N, INT_MAX);
vector<int> vnMatches21(frame2.N, -1);
Expand Down

0 comments on commit fab42cd

Please sign in to comment.