lower resolution of images with image_transport
I'd like to publish/subscribe to streams with different resolutions from a camera node. How would I change the resolution using image_transport? Or is there a better place for creating additional streams?
Asked by waspinator on 2017-11-02 13:42:21 UTC
Answers
image_proc resize is relatively new http://wiki.ros.org/image_proc (the inner page link isn't working) doesn't have a lot of detail but the source cfg file shows all the parameters:
https://github.com/ros-perception/image_pipeline/blob/indigo/image_proc/cfg/Resize.cfg
You need to run a nodelet for it for every destination resolution you want, the nodelet doesn't have to subscribe or publish to other nodelets but there is a performance enhancement if you go to that extra effort.
It looks like it can do either scale factor (e.g. 0.5 for half as big, 5.0 for five times as large) or a destination resolution in pixels.
(TODO I have some aspect ratio preserving code in my own version that inserts black vertical or horizontal letterbox bars that I ought to merge in).
Asked by lucasw on 2017-11-02 14:05:15 UTC
Comments