Skip to content

Commit b4e194a

Browse files
author
plnegre
committed
Fix camera info tool
1 parent d39341e commit b4e194a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

bag_tools/scripts/bag_tools/change_camera_info.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
* Redistributions in binary form must reproduce the above copyright
1313
notice, this list of conditions and the following disclaimer in the
1414
documentation and/or other materials provided with the distribution.
15-
* Neither the name of Systems, Robotics and Vision Group, University of
16-
the Balearican Islands nor the names of its contributors may be used to
17-
endorse or promote products derived from this software without specific
15+
* Neither the name of Systems, Robotics and Vision Group, University of
16+
the Balearican Islands nor the names of its contributors may be used to
17+
endorse or promote products derived from this software without specific
1818
prior written permission.
1919
2020
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
@@ -75,6 +75,10 @@ def replacement(replace_string):
7575
cam_info.R = calib_data['rectification_matrix']['data']
7676
cam_info.P = calib_data['projection_matrix']['data']
7777
cam_info.distortion_model = calib_data['distortion_model']
78+
cam_info.binning_x = 1;
79+
cam_info.binning_y = 1;
80+
cam_info.roi.width = calib_data['image_width']
81+
cam_info.roi.height = calib_data['image_height']
7882
return pair[0], cam_info
7983

8084
if __name__ == "__main__":

0 commit comments

Comments
 (0)