0

Rosanswers logo

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/CameraInfo 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


Originally posted by PeteBlackerThe3rd on ROS Answers with karma: 9529 on 2015-12-18

Post score: 0


Original comments

Comment by dornhege on 2015-12-18:
I'm pretty sure there is a package, but I can't come up with the name right now.

Comment by NEngelhard on 2015-12-18:
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.

Comment by PeteBlackerThe3rd on 2015-12-18:
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.

1 Answers1

0

Rosanswers logo

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_geometry/html/c++/classimage__geometry_1_1PinholeCameraModel.html#a30b3761aadfa4b91c7fedb97442c2f13

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


Originally posted by NEngelhard with karma: 3519 on 2015-12-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by PeteBlackerThe3rd on 2015-12-18:
Great, that looks perfect. I'll give it a go in a few hours and let you know how I get on. Thanks.