DynaSLAM icon indicating copy to clipboard operation
DynaSLAM copied to clipboard

Questions about function ExtractDynPoints()

Open KaninchenM opened this issue 4 years ago • 2 comments

Hi, sorry to bother you. I learned Semantic SLAM in recent months and now I'am doing some experiment basing on your code. After reading your paper and code, I have some confusions especially for the function Geometry::ExtractDynPoints(const vector<ORB_SLAM2::Frame> &vRefFrames,const ORB_SLAM2::Frame &currentFrame) (in Dynaslam/src/Geometry.cc).

  1. What's the meaning of variable vMPw
cv::Mat vMPw = refFrame.mTcw.inv() * vMPRefFrame;
  1. What is the purpose of the judgment sentence
const float d = refFrame.mImDepth.at<float>(v,u);
            if (d > 0 && d < 6){
                matRefFrame.at<float>(k,0) = refFrame.mvKeysUn[j].pt.x;
                matRefFrame.at<float>(k,1) = refFrame.mvKeysUn[j].pt.y;
                matRefFrame.at<float>(k,2) = 1.;
                matInvDepthRefFrame.at<float>(k,0) = 1./d;
                matDepthRefFrame.at<float>(k,0) = d;
                vLabels.at<float>(k,0) = i;
                k++;
            }

why the d should (d > 0 && d < 6)?

for (int i(0); i < matProjDepth.cols; i++)
        {
            if (matProjDepth.at<float>(0,i) < 7)
            {
                __matProjDepth.at<float>(0,h) = matProjDepth.at<float>(0,i);

                _vMPCurrentFrame.at<float>(0,h) = vMPCurrentFrame.at<float>(0,i);
                _vMPCurrentFrame.at<float>(1,h) = vMPCurrentFrame.at<float>(1,i);
                _vMPCurrentFrame.at<float>(2,h) = vMPCurrentFrame.at<float>(2,i);
                _vMPCurrentFrame.at<float>(3,h) = vMPCurrentFrame.at<float>(3,i);

                _vAllMatRefFrame.at<float>(h,0) = vAllMatRefFrame.at<float>(i,0);
                _vAllMatRefFrame.at<float>(h,1) = vAllMatRefFrame.at<float>(i,1);
                _vAllMatRefFrame.at<float>(h,2) = vAllMatRefFrame.at<float>(i,2);

                _vLabels.at<float>(h,0) = vLabels.at<float>(i,0);

                __vAllDepthRefFrame.at<float>(h,0) = vAllDepthRefFrame.at<float>(i,0);

                h++;
            }
        }

and why matProjDepth.at<float>(0,i) < 7 3. How to set the value of mDmax?

cv::Mat u1((2*mDmax+1)*(2*mDmax+1),2,CV_32F);
        int m(0);
        for (int i(-mDmax); i <= mDmax; i++){
            for (int j(-mDmax); j <= mDmax; j++){
                u1.at<float>(m,0) = i;
                u1.at<float>(m,1) = j;
                m++;
            }
        }

and what's the meaning of mDmax,such as in

if (matDepthDifference.at<float>(i,0) > mDepthThreshold)
            {
                int xIni = (int)matCurrentFrame.at<float>(i,0) - mDmax;
                int yIni = (int)matCurrentFrame.at<float>(i,1) - mDmax;
                int xEnd = (int)matCurrentFrame.at<float>(i,0) + mDmax + 1;
                int yEnd = (int)matCurrentFrame.at<float>(i,1) + mDmax + 1;
               ......
           }
  1. How to set the threshold τz(in code, it's mDepthThreshold)? In paper, it's 0.4m and in code it's 0.6m image image

  2. What's the use of mVarThreshold? Why only if (_stddev*_stddev)< mVarThreshold , can the keypoint be dynPoint? image

  3. I've statistics the spent time of GeometricModelCorrection part. In different data sequences, time-consuming varies greatly. In fr3_walking_rpy, it needs about 0.2s/frame while in fr3_walking_xyz, it needs 0.45+s/frame. Could you please give me some suggestions about what factors affect the GeometricModelCorrection part's spending time?

KaninchenM avatar Sep 09 '20 05:09 KaninchenM

Hope to get your help. Thank you so much!

KaninchenM avatar Sep 09 '20 06:09 KaninchenM

Answer Q5: find the idea in paper image

KaninchenM avatar Oct 10 '20 07:10 KaninchenM