0
$\begingroup$

Rosanswers logo

I entered this command to extract depth images from intel realsense R200 camera:

rosrun image_view extract_images _sec_per_frame:=0.01 image:=/camera/depth/image_raw

I wasn't able to get the images, instead showed this error:

[ERROR] [1529053683.952956798]: Unable to convert 16UC1 image to bgr8
[ WARN] [1529053683.953020485]: Couldn't save image, no data!

When i entered this command for color images, it worked:

rosrun image_view extract_images _sec_per_frame:=0.01 image:=/camera/color/image_raw

How can this issue be resolved?


Originally posted by janhvi_02 on ROS Answers with karma: 13 on 2018-06-15

Post score: 0


Original comments

Comment by PratNag on 2018-06-19:
Can you list all the published image topics? You cannot extract from image:=/camera/depth/image_raw because the format needed for extract_images is different. Maybe there is different topic like depth_registered or depth_rect...I have used the zed camera and had faced similar problems.

Comment by janhvi_02 on 2018-06-21:
I tried for dpeth_registered and depth_rectify but I think i need to provide encoding for depth images.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

extract_images can only save images with bgr8 encoding. You could try using image_saver which provide option for setting encoding of the image topic, something like so:

rosrun image_view image_saver _encoding:=16UC1 image:=/camera/depth/image_raw

Originally posted by mathsci with karma: 41 on 2018-06-20

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by janhvi_02 on 2018-06-21:
Thanks a lot, i could extract depth images using this command.

Comment by janhvi_02 on 2018-06-29:
Can you also provide a single command for extracting both depth and color images?

Comment by jayess on 2018-06-29:
@janhvi_02 if this answered your question then please click on the check mark to mark it as correct.

$\endgroup$

Your Answer

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