0
$\begingroup$

Rosanswers logo

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?


Originally posted by rps2689 on ROS Answers with karma: 1 on 2012-07-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Martin Peris with karma: 5625 on 2012-07-01

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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