Open Lashhev opened 3 years ago
~No, but recently~ there is a PR related to this: https://github.com/ros-perception/image_transport_plugins/pull/98
@Lashhev, I am correcting my previous answer as after an experiment I would say it is supported but not documented.
I perfomed the following experiment with ROS Noetic:
types: sensor_msgs/CompressedImage [8f7a12909da2c9d3332d540a0977563f]
topics: /pylon_camera_node/image_raw/compressed 125 msgs : sensor_msgs/CompressedImage
By echoing the topic, the header states the original image was in bayer format
rostopic echo /pylon_camera_node/image_raw/compressed
header:
seq: 77
stamp:
secs: 1692615289
nsecs: 610064228
frame_id: "pylon_camera"
format: "bayer_rggb8; jpeg compressed "
.....
.....
[topic values]
...
...
rosrun image_view image_view image:=/pylon_camera_node/image_raw/compressed
the image_view
node complains with the following output
[image_transport] It looks like you are trying to subscribe directly to a transport-specific image topic '/pylon_camera_node/image_raw/compressed', in which case you will likely get a connection error. Try subscribing to the base topic '/pylon_camera_node/image_raw' instead with parameter ~image_transport set to 'compressed' (on the command line, _image_transport:=compressed). See http://ros.org/wiki/image_transport for details.
By adding the argument as shown in the hint of the warning,
rosrun image_view image_view image:=/pylon_camera_node/image_raw _image_transport:=compressed
I get back a color image with the header:
rostopic echo /image_view/output
header:
seq: 0
stamp:
secs: 1692615291
nsecs: 312088400
frame_id: "pylon_camera"
height: 1200
width: 1600
encoding: "bgr8"
is_bigendian: 0
step: 4800
One would have to study the code for the publisher and subscriber in the noetic-devel
here and here to check what if/else branches are taken.
If anyone has other experience or knowledge about this, please share, IMO it seems that compression and uncompression is working for Bayer formats as well but it is not documented.
Does the compressed image plugin support bayer image format?