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

Revision history [back]

click to hide/show revision 1
initial version

To convert from compressed image to raw image, run the republish node.(Ref)

rosrun image_transport republish compressed in:=/xxxx/image_raw/compressed raw out:=/xxxx/image_raw/raw

Now in your node, you can subscribe to the raw topic, convert to cv2 image and save to disk.(Ref).

To convert from compressed image to raw image, run the republish node.(Ref)

rosrun image_transport republish compressed in:=/xxxx/image_raw/compressed raw out:=/xxxx/image_raw/raw

Now in your node, you can subscribe to the raw topic, convert to cv2 image and save to disk.(Ref).

EDIT: You can directly convert the compressed ROS image to opencv matrix by using compressed_imgmsg_to_cv2(cmprs_img_msg). (Ref).