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

How to get the real coordinates from the image coordinates?

asked 2014-02-19 21:30:12 -0600

Mobile_robot gravatar image

updated 2016-10-24 09:01:26 -0600

ngrennan gravatar image

Hello dear friends,

I want to calibrate an colored object, so with CMVISION I achieved to calibrate and it gives me the coordinate in the Image, but for calibration I need the Real coordinate, I know that in some how I could use PCL (point cloud library) to get them but I dont know how,

I am new in PCL , so any body can give me a hint to start?, (I am searching in parallel too)

Thank you in advance PS : I am using a Kinect.

edit retag flag offensive close merge delete


can you have a look at this question and if u have an answer may be provide me with it?

ghanimmukhtar gravatar image ghanimmukhtar  ( 2014-08-12 15:01:30 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-02-19 21:43:33 -0600

ahendrix gravatar image

updated 2014-02-20 07:16:51 -0600

As an example, I have a node that receives a point cloud, extracts an image and runs a vision algorithm on it, and then retrieves the XYZ coordinates of the detected features:

The key things to pick out are the conversion from a structured point cloud to an image:

sensor_msgs::ImagePtr image = boost::make_shared<sensor_msgs::Image>();
pcl::toROSMsg( *cloud, *image );

And the return conversion from image coordinates to a 3D point from the cloud:

pcl::PointXYZ p1 =, y);
edit flag offensive delete link more


Thank you for your answer, I am trying to understand your code... I appreciate your help

Mobile_robot gravatar image Mobile_robot  ( 2014-02-19 22:54:27 -0600 )edit

I just see your modification , thanks a lot dear ahendrix.... I appreciate your help Hamed

Mobile_robot gravatar image Mobile_robot  ( 2014-02-20 20:23:31 -0600 )edit

Question Tools

1 follower


Asked: 2014-02-19 21:30:12 -0600

Seen: 1,965 times

Last updated: Feb 20 '14