izhengfan / se2lam

(ICRA 2019) Visual-Odometric On-SE(2) Localization and Mapping
https://github.com/izhengfan/se2lam
MIT License
404 stars 108 forks source link

bug反馈------工程引入的orb_slam代码固有问题 #33

Closed menglitanhua closed 3 years ago

menglitanhua commented 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值.