Ask Your Question
0

Generating PNG images from Kinect data

asked 2012-07-01 08:35:38 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm a complete beginner at ROS and I am using a Turtlebot SDK. All I want to do is generate PNG images from my kinect depth and RGB data. One way is to modify the code in image_view (which currently has provision to save a frame as JPG by right-clicking the mouse). Is there a more direct way to do this? Or is there a provision already existing in ROS to do this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-07-01 16:41:02 -0500

updated 2012-07-02 13:38:56 -0500

Hi rps2689,

In the same stack as image_view there is another node called image_saver that saves image files without needing to click anything.

This node saves images in jpg format, so if you need them to be in PNG I guess that the fastest way is to modify the filename definition in /PATH_TO_ROS_STACKS/image_pipeline/image_view/src/nodes/image_saver.cpp:

std::string filename = (g_format % g_count % "jpg").str();

for this other:

std::string filename = (g_format % g_count % "png").str();

Hope this helps.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2012-07-01 08:35:38 -0500

Seen: 856 times

Last updated: Jul 02 '12