Skip to content

Commit d3d9045

Browse files
authored
Merge pull request #77 from ros-drivers/correct_default_camera_info
Noticed the default camera info was actually wrong, corrected
2 parents 31d60f2 + 666b07d commit d3d9045

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/video_stream.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,16 @@ virtual sensor_msgs::CameraInfo get_default_camera_info_from_image(sensor_msgs::
8888
// Don't let distorsion matrix be empty
8989
cam_info_msg.D.resize(5, 0.0);
9090
// Give a reasonable default intrinsic camera matrix
91-
cam_info_msg.K = boost::assign::list_of(1.0) (0.0) (img->width/2.0)
92-
(0.0) (1.0) (img->height/2.0)
91+
cam_info_msg.K = boost::assign::list_of(img->width/2.0) (0.0) (img->width/2.0)
92+
(0.0) (img->height/2.0) (img->height/2.0)
9393
(0.0) (0.0) (1.0);
9494
// Give a reasonable default rectification matrix
9595
cam_info_msg.R = boost::assign::list_of (1.0) (0.0) (0.0)
9696
(0.0) (1.0) (0.0)
9797
(0.0) (0.0) (1.0);
9898
// Give a reasonable default projection matrix
99-
cam_info_msg.P = boost::assign::list_of (1.0) (0.0) (img->width/2.0) (0.0)
100-
(0.0) (1.0) (img->height/2.0) (0.0)
99+
cam_info_msg.P = boost::assign::list_of (img->width/2.0) (0.0) (img->width/2.0) (0.0)
100+
(0.0) (img->height/2.0) (img->height/2.0) (0.0)
101101
(0.0) (0.0) (1.0) (0.0);
102102
return cam_info_msg;
103103
}

0 commit comments

Comments
 (0)