ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Converting 3D point to 2D pixel position using callibration data

asked 2015-12-18 05:12:39 -0600

updated 2015-12-18 07:55:22 -0600

Hi There,

I'm in the process of registering a camera image from a GoPro to a mesh generated from a lidar scanner. For this I need to transform a 3D point in the camera frame to a 2D pixel point in the image. I've found the calibration data for the camera using the camera_calibration package and I've found this page:

http://wiki.ros.org/image_pipeline/Ca... Which describes the transformations I'm looking for, however I don't understand the notation used in section 3 to describe the actual vector operations to achieve the transformation I need.

Is there a package which encapsulates this transformation? Or can someone explain what:

X' = [R,t]X transform

sx = X' projection

x* = d(x) distortion

q = Kx* pixel coordinates

means in terms of vector operations.

Thanks, Pete

edit retag flag offensive close merge delete

Comments

I'm pretty sure there is a package, but I can't come up with the name right now.

dornhege gravatar image dornhege  ( 2015-12-18 05:53:57 -0600 )edit

You probably should also take into account that several 3d points will be projected onto the same pixel. As your camera and the lidar do not have the same position, you will have only project visible points into the camera and not the points that are occluded by other 3d objects.

NEngelhard gravatar image NEngelhard  ( 2015-12-18 07:28:26 -0600 )edit

There's the image_proc package, but that only seems to produce a rectilinear image from the distorted wide angle image. I need a function to transform 3D points directly, I may have to dig into the source files for this.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2015-12-18 08:49:35 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-12-18 09:10:42 -0600

NEngelhard gravatar image

If you just want to project points into the image, you can use the pinhole_camera_model-class:

http://docs.ros.org/jade/api/image_ge...

cv::Point2d image_geometry::PinholeCameraModel::project3dToPixel ( const cv::Point3d & xyz ) const

edit flag offensive delete link more

Comments

Great, that looks perfect. I'll give it a go in a few hours and let you know how I get on. Thanks.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2015-12-18 09:17:12 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-12-18 05:12:39 -0600

Seen: 2,792 times

Last updated: Dec 18 '15