Extract image from ROS Image message
ROS Toolbox / ROS
The Read Image block extracts an image from a ROS Image
or CompressedImage
message. You can select the ROS message parameters of a topic active on a live ROS network or specify the message parameters separately. The ROS messages are specified as a nonvirtual bus. Use the Subscribe block output to receive a message from a ROS network and input the message to the Read Image block.
Note
When reading ROS image messages from the network, the Data
property of the message can exceed the maximum array length set in Simulink®. To increase the maximum array length, click Tools > Manage Array Lengths > Robot Operating System, select the Data array, and increase the size based on the number of points in the image.
Blank Message | CompressedImage
| Image
| readImage
| Subscribe