Ask Your Question
0

Which topics to use?

asked 2012-04-26 03:08:23 -0600

nios gravatar image

updated 2016-10-24 08:59:52 -0600

ngrennan gravatar image

Hi all!

I am currently deciding which topics from the kinect camera should I use. As I am absolutely new to ROS I thought that maybe someone with more experience could suggest an appropriate way.

In the end I need data, which would contain color and depth information for each pixel of recordered images. I also need to represent this information as a 4D array (or 3D for color + 1D for depth) of raw numbers as I need to process them afterwards.

By now I recorded a bag file with topics:

  • /camera/rgb/image_raw
  • /camera/depth/image_raw

But then I found this article and am considering to record a new bag file with topics:

  • /camera/rgb/image_color -- this gives me a color image
  • /camera/depth/image_raw -- this gives me depth in mm

I am thinking of then converting image_color via this (part 1.5) method to a cv::Mat format.

I would be very grateful if anyone would say if I'm thinking in the right direction. Thank you in advance.

edit retag flag offensive close merge delete

Comments

You should probably record the corresponding /camera/*/camera_info topics, too. They contain useful calibration information.

joq gravatar imagejoq ( 2012-04-26 04:14:03 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-04-26 04:17:48 -0600

tbh gravatar image

I don't know what kind of processing you're doing, but you might look into the pcl library. The kinect also publishes some point cloud topics, some of which I think have the spatial information and the color for each point grouped together.

You can look at them in rviz. Just add a pointcloud2 and subscribe to one of the topics (say, /camera/rgb/points). Displaying them as points with Color Transformer RGB8 shows you the color info too.

edit flag offensive delete link more

Comments

Thank you, I already looked at it, but I would prefer to have separately rgb image and depth image as matrices, so that color of the pixel can be taken from one matrix and depth from the other. But I have to think - maybe I can produce those from the point clouds.

nios gravatar imagenios ( 2012-04-26 22:28:26 -0600 )edit

Thank you, I already looked at it, but I would prefer to have separately rgb image and depth image as matrices, so that color of the pixel can be taken from one matrix and depth from the other.

nios gravatar imagenios ( 2012-04-26 22:28:29 -0600 )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: 2012-04-26 03:08:23 -0600

Seen: 196 times

Last updated: Apr 26 '12