安装orbslam3时终端一直报错error: no match for ‘operator/’
在github上Issues讨论区发现解决方案:
1.可能是opencv版本太低识别不出,建议opencv4.4
2.在报错的文件夹里,如KannalaBrandt8.cpp,LocalMapping.cc
在include 之后加上以下代码:
namespace cv
{
template<typename _Tp, int m, int n> static inline
Matx<_Tp, m, n> operator / (const Matx<_Tp, m, n> &a, float alpha)
{
return Matx<_Tp, m, n>(a, 1.f / alpha, Matx_ScaleOp());
}
}