can readCalibrationIni function get ROI data parsing a file?
Hi everybody, I'm building a simple application that read a file .txt, parse it with
bool readCalibrationIni(const std::string& file_name, std::string& camera_name,
sensor_msgs::CameraInfo& cam_info)
of "camera_calibration_parsers" package and create an object "sensor_msgs::CameraInfo". This function seems don't parse ROI (Region Of Interest) info contained in the file, for example:
# Camera intrinsics
[image]
width
640
height
480
[TrusCamera]
camera matrix
782.015630 0.000000 347.626583
0.000000 785.621477 155.819230
0.000000 0.000000 1.000000
distortion
-0.153979 -0.023735 -0.002647 0.002344 0.000000
rectification
1.000000 0.000000 0.000000
0.000000 1.000000 0.000000
0.000000 0.000000 1.000000
projection
757.675406 0.000000 349.847926 0.000000
0.000000 765.347350 152.545843 0.000000
0.000000 0.000000 1.000000 0.000000
[roi]
x_offset
0
y_offset
0
height
0
width
0
do_rectify
False
parsing this file the following fields are filled in the CameraInfo object:
CameraInfo_()
: header()
, height(0)
, width(0)
, distortion_model()
, D()
, K()
, R()
, P()
but not the fields related to ROI and binning
, binning_x(0)
, binning_y(0)
, roi()
{
K.assign(0.0);
R.assign(0.0);
P.assign(0.0);
}
How to set them?