Closed menglitanhua closed 3 years ago
ORBmatcher.cpp 文件中 287和155行,源代码 const float factor = 1.f / (float)HISTO_LENGTH; 应该改为 const float factor = (float)HISTO_LENGTH / 360.0f ; 其他代码不用修改。否则接下来的代码 // for orientation check float rot = frame1.keyPointsUn[i1].angle - frame2.keyPointsUn[bestIdx2].angle; if(rot < 0.0) rot += 360.f; int bin = round(rot*factor); if(bin == HISTO_LENGTH) bin = 0; rotHist[bin].push_back(i1); } bin计算后取值范围永远为0-12,永不会达到HISTO_LENGTH=30值.
ORBmatcher.cpp 文件中 287和155行,源代码 const float factor = 1.f / (float)HISTO_LENGTH; 应该改为 const float factor = (float)HISTO_LENGTH / 360.0f ; 其他代码不用修改。否则接下来的代码 // for orientation check float rot = frame1.keyPointsUn[i1].angle - frame2.keyPointsUn[bestIdx2].angle; if(rot < 0.0) rot += 360.f; int bin = round(rot*factor); if(bin == HISTO_LENGTH) bin = 0; rotHist[bin].push_back(i1); } bin计算后取值范围永远为0-12,永不会达到HISTO_LENGTH=30值.