Ask Your Question
0

How to get the real coordinates from the image coordinates?

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

Mobile_robot gravatar image

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

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

Comments

can you have a look at this question and if u have an answer may be provide me with it? http://answers.ros.org/question/18984...

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

1 Answer

Sort by ยป oldest newest most voted
0

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

ahendrix gravatar image

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

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:

https://github.com/trainman419/target...

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 = depth.at(x, y);
edit flag offensive delete link more

Comments

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 -0500 )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 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 1,720 times

Last updated: Feb 20 '14