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

Change resolution when playing svo file using zed-ros-wrapper?

asked 2022-01-06 13:17:17 -0600

I have various svo files recorded at 1080 but want to replay at 720 as that will be the resolution used with the live camera. Is there any means to have the zed-ros-wrapper replay at a lower resolution than it was recorded at?

I have tried setting the general/resolution parameter to no effect. I have also considered just downsampling the 1080 svo files down to 720 and then just playing my new 720 files with zed-ros-wrapper but although it is trivial to go from svo to avi or png I can't see any way to go the other way.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-01-08 15:37:07 -0600

osilva gravatar image

The resolution of the svo file cannot be changed but you can retrieve image and convert the image after retrieval. You can use the API to do so. Take a look at this discussion on how:

# Retrieve SVO images
zed.retrieve_image(left_image, sl.VIEW.LEFT, resolution = sl.Resolution(1280,720))

if app_type == AppType.LEFT_AND_RIGHT:
    zed.retrieve_image(right_image, sl.VIEW.RIGHT, resolution = sl.Resolution(1280,720))
elif app_type == AppType.LEFT_AND_DEPTH:
    zed.retrieve_image(right_image, sl.VIEW.DEPTH, resolution = sl.Resolution(1280,720))
elif app_type == AppType.LEFT_AND_DEPTH_16:
    zed.retrieve_measure(depth_image, sl.MEASURE.DEPTH, resolution = sl.Resolution(1280,720))
edit flag offensive delete link more


So not possible with the existing wrapper, that's what I feared. Ok I'll fork it, see if they'll accept it as a pull request.

practisevoodoo gravatar image practisevoodoo  ( 2022-01-12 06:55:29 -0600 )edit

Question Tools


Asked: 2022-01-06 13:17:17 -0600

Seen: 284 times

Last updated: Jan 08 '22