0
$\begingroup$

Rosanswers logo

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.


Originally posted by niosus on ROS Answers with karma: 386 on 2012-04-26

Post score: 0


Original comments

Comment by joq on 2012-04-26:
You should probably record the corresponding /camera/*/camera_info topics, too. They contain useful calibration information.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by thebyohazard with karma: 3562 on 2012-04-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by niosus on 2012-04-26:
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.

Comment by niosus on 2012-04-26:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.