UZ-SLAMLab / ORB_SLAM3

ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM
GNU General Public License v3.0
6.59k stars 2.56k forks source link

Loading distortion parameters for KannalaBrandt #710

Open jaehwan-pi opened 1 year ago

jaehwan-pi commented 1 year ago

Hi, I have question. When reading parameters for KannalaBrandt model for camera2, it seems like it reads parameters for camera1.

void Settings::readCamera2(cv::FileStorage &fSettings) {
...
else if(cameraType_ == KannalaBrandt){
            //Read intrinsic parameters
            float fx = readParameter<float>(fSettings,"Camera2.fx",found);
            float fy = readParameter<float>(fSettings,"Camera2.fy",found);
            float cx = readParameter<float>(fSettings,"Camera2.cx",found);
            float cy = readParameter<float>(fSettings,"Camera2.cy",found);

            float k0 = readParameter<float>(fSettings,"Camera1.k1",found);
            float k1 = readParameter<float>(fSettings,"Camera1.k2",found);
            float k2 = readParameter<float>(fSettings,"Camera1.k3",found);
            float k3 = readParameter<float>(fSettings,"Camera1.k4",found);
...
}

Isn't this should be Camera2, not Camera1?

Your answer would be really appreciated.

(https://github.com/UZ-SLAMLab/ORB_SLAM3/blob/master/src/Settings.cc#L318-L321)

pantingchn commented 1 year ago

I have the same question, do you figure it out?