mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-05 17:47:49 +08:00
-Updated CameraModel and StereoCameraModel so that a stereo camera model can be initialization from know intrinsics and extrinsics
-CreateSimpleCalibrationDialog updated to create mono/stereo calibration files with advanced option (setting intrinsics of each camera + extrinsics between them). Rectification R and new camera P matrices are then automatically computed. -Added GeodeticCoords class for convience conversion between GPS values (latitude/longitude/altitude) to local coordinate (ENU). -Added support of Malaga Urban and St Lucia ground truths. -CameraImages: added option to debayer images. Timestamps file: added support of "sec millisec" format. -Added UException class: exceptions are sent instead of exiting the application on UASSERT or UFATAL.
This commit is contained in:
@@ -74,21 +74,25 @@ public:
|
||||
|
||||
void initRectificationMap();
|
||||
|
||||
bool isValid() const {return !K_.empty() &&
|
||||
!D_.empty() &&
|
||||
!R_.empty() &&
|
||||
!P_.empty() &&
|
||||
fx()>0.0 &&
|
||||
fy()>0.0;}
|
||||
bool isValid() const {return (!K_.empty() || !P_.empty()) && fx()>0.0 && fy()>0.0;}
|
||||
bool isValidForRectification() const
|
||||
{
|
||||
return imageSize_.width>0 &&
|
||||
imageSize_.height>0 &&
|
||||
!K_.empty() &&
|
||||
!D_.empty() &&
|
||||
!R_.empty() &&
|
||||
!P_.empty();
|
||||
}
|
||||
|
||||
void setName(const std::string & name) {name_=name;}
|
||||
const std::string & name() const {return name_;}
|
||||
|
||||
double fx() const {return P_.at<double>(0,0);}
|
||||
double fy() const {return P_.at<double>(1,1);}
|
||||
double cx() const {return P_.at<double>(0,2);}
|
||||
double cy() const {return P_.at<double>(1,2);}
|
||||
double Tx() const {return P_.at<double>(0,3);}
|
||||
double fx() const {return P_.empty()?K_.empty()?0.0:K_.at<double>(0,0):P_.at<double>(0,0);}
|
||||
double fy() const {return P_.empty()?K_.empty()?0.0:K_.at<double>(1,1):P_.at<double>(1,1);}
|
||||
double cx() const {return P_.empty()?K_.empty()?0.0:K_.at<double>(0,2):P_.at<double>(0,2);}
|
||||
double cy() const {return P_.empty()?K_.empty()?0.0:K_.at<double>(1,2):P_.at<double>(1,2);}
|
||||
double Tx() const {return P_.empty()?0.0:P_.at<double>(0,3);}
|
||||
|
||||
const cv::Mat & K() const {return K_;} //intrinsic camera matrix
|
||||
const cv::Mat & D() const {return D_;} //intrinsic distorsion matrix
|
||||
|
||||
Reference in New Issue
Block a user