0
$\begingroup$

Rosanswers logo

HI there,

I have visualized a textured mesh in rviz based on depth and camera data. To view it from a certain camera perspective (not necessarily the one used for texturing) I am using the camera display with appropriate camera_info and image topics (the image is not interesting here since I only want the textured mesh to be displayed). So now I can see the mesh through a virtual camera with certain intrinsic and extrinsic parameters.

What I further want, is to save the displayed image to a file. Preferably everytime the topic containing the textured mesh gets updated. I considered simply taking screenshots, but the resolution (and aspectratio/fov) would not match the specified camera parameters for the virtual camera.

So is it possible to save the image from the camera display with the specified size in the camera_info topic?


Originally posted by fergo on ROS Answers with karma: 11 on 2015-03-24

Post score: 1


Original comments

Comment by lucasw on 2016-02-21:
This is similar to http://answers.ros.org/question/142351/publishing-virtual-camera-images-from-rviz/

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I'm not aware of a way to do this automatically. You could probably write an rviz plugin to do it though. You'd need to learn how to make a plugin:

http://docs.ros.org/indigo/api/rviz_plugin_tutorials/html/display_plugin_tutorial.html

and then maybe inherit from the ImageDisplay or the CameraDisplay classes:

https://github.com/ros-visualization/rviz/blob/indigo-devel/src/rviz/default_plugin/camera_display.h


Originally posted by William with karma: 17335 on 2015-03-24

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.