Skip to content

Commit

Permalink
Update TemplatedVocabulary.h
Browse files Browse the repository at this point in the history
  • Loading branch information
raulmur committed Sep 8, 2015
1 parent 545a743 commit 7c7fb3d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Thirdparty/DBoW2/DBoW2/TemplatedVocabulary.h
Original file line number Diff line number Diff line change
Expand Up @@ -1354,16 +1354,17 @@ bool TemplatedVocabulary<TDescriptor,F>::loadFromTextFile(const std::string &fil
ss >> m_L;
int n1, n2;
ss >> n1;
m_scoring = (ScoringType)n1;
ss >> n2;
m_weighting = (WeightingType)n2;
createScoringObject();

if(m_k<0 || m_k>20 || m_L<1 || m_L>10 || n1<0 || n1>5 || n2<0 || n2>3)
{
std::cerr << "Vocabulary loading failure: This is not a correct text file!" << endl;
return false;
}

m_scoring = (ScoringType)n1;
m_weighting = (WeightingType)n2;
createScoringObject();

// nodes
int expected_nodes =
Expand Down

0 comments on commit 7c7fb3d

Please sign in to comment.