Skip to content

Commit

Permalink
add conditional orbslam optimizer for android and ios (need to rebuil…
Browse files Browse the repository at this point in the history
…d g2o)
  • Loading branch information
luc committed Jan 22, 2024
1 parent 6973a11 commit 8fd18c6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions modules/wai/source/orb_slam/Optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1554,15 +1554,17 @@ int Optimizer::OptimizeSim3(WAIKeyFrame* pKF1,
vSim3->setFixed(false);

//replacement because of new g2o (maybe this leads to errors...)
//vSim3->_principle_point[0] = K1.at<float>(0, 2);
//vSim3->_principle_point[1] = K1.at<float>(1, 2);
//vSim3->_focal_length[0] = K1.at<float>(0, 0);
//vSim3->_focal_length[1] = K1.at<float>(1, 1);

#if defined(SL_OS_ANDROID) || defined(SL_OS_MACIOS)
vSim3->_principle_point[0] = K1.at<float>(0, 2);
vSim3->_principle_point[1] = K1.at<float>(1, 2);
vSim3->_focal_length[0] = K1.at<float>(0, 0);
vSim3->_focal_length[1] = K1.at<float>(1, 1);
#else
vSim3->_principle_point1[0] = K1.at<float>(0,2);
vSim3->_principle_point1[1] = K1.at<float>(1,2);
vSim3->_focal_length1[0] = K1.at<float>(0,0);
vSim3->_focal_length1[1] = K1.at<float>(1,1);
#endif
//vSim3->_principle_point2[0] = K2.at<float>(0,2);
//vSim3->_principle_point2[1] = K2.at<float>(1,2);
//vSim3->_focal_length2[0] = K2.at<float>(0,0);
Expand Down

0 comments on commit 8fd18c6

Please sign in to comment.