ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

How to take save a snapshot from my kinect to disk?

asked 2011-03-10 07:55:42 -0600

Murph gravatar image

updated 2016-10-24 09:04:01 -0600

ngrennan gravatar image

I'm trying to debug a problem with my Kinect not working right.

In the tutorial, there is a pretty standard way to view the camera stream: rosrun image_view image_view image:=/camera/rgb/image_color

Is there a similarly simple way to save a snapshot to disk?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
6

answered 2011-03-10 08:41:36 -0600

Chad Rockey gravatar image

Left clicking on the image in image_view will save a screenshot to the directory from which you started image_view in c-turtle and below. In Diamondback, you have to right click for this behavior; this prevents a lot of accidental frame grabs. :)

For example, if you were in /home/murph/code/topSecret in your terminal and you ran rosrun image_view image_view image:=/camera/rgb/image_color, the image would be saved in that directory.

Images are titled frame0000.jpg, frame0001.jpg, and so on.

To read more, visit the image_view wiki page.

edit flag offensive delete link more
4

answered 2016-05-26 15:19:56 -0600

130s gravatar image

updated 2016-05-26 15:24:57 -0600

Adding to @raphael favier 's answer, you can time capturing by:

term-1$ rosrun image_view image_saver image:=image_raw _save_all_image:=false _filename_format:=foo.jpg __name:=image_saver

Then only when you call the following, image files are generated:

term-2$ rosservice call /image_saver/save

Got a hint at start-jsk/jsk_apc/#9.

edit flag offensive delete link more

Comments

1

is there a way to add timestamp to the image ? like the pcd images u get from kinect?

Baumboon gravatar image Baumboon  ( 2018-02-26 02:33:45 -0600 )edit

@Baumboon Please open a new question.

130s gravatar image 130s  ( 2018-02-26 02:35:43 -0600 )edit
2

answered 2011-03-10 08:03:56 -0600

raphael favier gravatar image

updated 2016-05-25 21:34:26 -0600

130s gravatar image

If you click on the picture in image_view, doesn't it save the picture?

Else, you can use image_saver in the image_view package.

rosrun image_view image_saver image:=[ your topic]

Raph

edit flag offensive delete link more

Comments

@raphael favier this rosrun gives me a infinite amount of image si there a way to just take one picture? and is there a way that i can put this in a code so when a publisher publishes something just then it take a picture?

ctguell gravatar image ctguell  ( 2013-10-08 05:48:48 -0600 )edit

@ctguell You just have to control the rate of how frequent rosrun command runs.

130s gravatar image 130s  ( 2016-05-25 21:35:35 -0600 )edit

Question Tools

Stats

Asked: 2011-03-10 07:55:42 -0600

Seen: 11,674 times

Last updated: May 26 '16