mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
CameraModel: save distortion_model field for ROS compatibility
This commit is contained in:
@@ -231,6 +231,17 @@ bool CameraModel::save(const std::string & directory) const
|
||||
fs << "data" << std::vector<double>((double*)D_.data, ((double*)D_.data)+(D_.rows*D_.cols));
|
||||
fs << "}";
|
||||
|
||||
// compaibility with ROS
|
||||
|
||||
if(D_.cols > 5)
|
||||
{
|
||||
fs << "distortion_model" << "rational_polynomial";
|
||||
}
|
||||
else
|
||||
{
|
||||
fs << "distortion_model" << "plumb_bob";
|
||||
}
|
||||
|
||||
fs << "rectification_matrix" << "{";
|
||||
fs << "rows" << R_.rows;
|
||||
fs << "cols" << R_.cols;
|
||||
|
||||
Reference in New Issue
Block a user