diff --git a/src/CameraModels/KannalaBrandt8.cpp b/src/CameraModels/KannalaBrandt8.cpp index 6876ad5..f5b8939 100644 --- a/src/CameraModels/KannalaBrandt8.cpp +++ b/src/CameraModels/KannalaBrandt8.cpp @@ -531,6 +531,7 @@ namespace ORB_SLAM3 { cv::SVD::compute(A,w,u,vt,cv::SVD::MODIFY_A| cv::SVD::FULL_UV); cv::Matx41f x3D_h = vt.row(3).t(); - x3D = x3D_h.get_minor<3,1>(0,0) / x3D_h(3); + // x3D = x3D_h.get_minor<3,1>(0,0) / x3D_h(3); + x3D = cv::Matx31f(x3D_h.get_minor<3,1>(0,0)(0) / x3D_h(3), x3D_h.get_minor<3,1>(0,0)(1) / x3D_h(3), x3D_h.get_minor<3,1>(0,0)(2) / x3D_h(3)); } } diff --git a/src/LocalMapping.cc b/src/LocalMapping.cc index 1107d06..376761f 100644 --- a/src/LocalMapping.cc +++ b/src/LocalMapping.cc @@ -773,7 +773,9 @@ void LocalMapping::CreateNewMapPoints() continue; // 归一化成为齐次坐标,然后提取前面三个维度作为欧式坐标 // Euclidean coordinates - x3D = x3D_h.get_minor<3,1>(0,0) / x3D_h(3); + // x3D = x3D_h.get_minor<3,1>(0,0) / x3D_h(3); + x3D = cv::Matx31f(x3D_h.get_minor<3,1>(0,0)(0) / x3D_h(3), x3D_h.get_minor<3,1>(0,0)(1) / x3D_h(3), x3D_h.get_minor<3,1>(0,0)(2) / x3D_h(3)); + bEstimated = true; } diff --git a/src/MapPoint.cc b/src/MapPoint.cc index 2a736f4..6bec876 100644 --- a/src/MapPoint.cc +++ b/src/MapPoint.cc @@ -30,7 +30,7 @@ mutex MapPoint::mGlobalMutex; /** * @brief 构造函数 */ - mnFirstKFid(0), mnFirstFrame(0), nObs(0), mnTrackReferenceForFrame(0), +MapPoint::MapPoint() : mnFirstKFid(0), mnFirstFrame(0), nObs(0), mnTrackReferenceForFrame(0), mnLastFrameSeen(0), mnBALocalForKF(0), mnFuseCandidateForKF(0), mnLoopPointForKF(0), mnCorrectedByKF(0), mnCorrectedReference(0), mnBAGlobalForKF(0), mnVisible(1), mnFound(1), mbBad(false), mpReplaced(static_cast(NULL)) diff --git a/src/Tracking.cc b/src/Tracking.cc index 5b2485c..ea067a0 100644 --- a/src/Tracking.cc +++ b/src/Tracking.cc @@ -4383,7 +4383,7 @@ bool Tracking::Relocalization() } //整个追踪线程执行复位操作 -void Tracking::Reset() +void Tracking::Reset(bool bLocMap) { Verbose::PrintMess("System Reseting", Verbose::VERBOSITY_NORMAL); //基本上是挨个请求各个线程终止