# This message contains an uncompressed image # (0, 0) is at top-left corner of image # Header header # std_msgs/Header
uint32 height # image height, that is, number of rows uint32 width # image width, that is, number of columns
# The legal values for encoding are in file src/image_encodings.cpp # If you want to standardize a new string format, join # ros-users@lists.sourceforge.net and send an email proposing a new encoding. string encoding # Encoding of pixels -- channel meaning, ordering, size # taken from the list of strings in include/sensor_msgs/image_encodings.h
uint8 is_bigendian # is this data bigendian? uint32 step # Full row length in bytes uint8[] data # actual matrix data, size is (step * rows)
其中 header 是标准结构:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Standard metadata for higher-level stamped data types. # This is generally used to communicate timestamped data # in a particular coordinate frame. # # sequence ID: consecutively increasing ID uint32 seq
#Two-integer timestamp that is expressed as: # * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs') # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs') # time-handling sugar is provided by the client library time stamp
#Frame this data is associated with string frame_id
Details: ---------- "image_transport/compressed" - Provided by package: compressed_image_transport - Publisher: This plugin publishes a CompressedImage using either JPEG or PNG compression.
- Subscriber: This plugin decompresses a CompressedImage topic.
---------- "image_transport/compressedDepth" - Provided by package: compressed_depth_image_transport - Publisher: This plugin publishes a compressed depth images using PNG compression.
- Subscriber: This plugin decodes a compressed depth images.
---------- "image_transport/ffmpeg" *** Plugins are not built. *** - Provided by package: ffmpeg_image_transport - Publisher: This plugin encodes frame into ffmpeg compressed packets
- Subscriber: This plugin decodes frame from ffmpeg compressed packets
---------- "image_transport/raw" - Provided by package: image_transport - Publisher: This is the default publisher. It publishes the Image as-is on the base topic.
- Subscriber: This is the default pass-through subscriber for topics of type sensor_msgs/Image.
---------- "image_transport/theora" - Provided by package: theora_image_transport - Publisher: This plugin publishes a video packet stream encoded using Theora.
- Subscriber: This plugin decodes a video packet stream encoded using Theora.
# This message contains a compressed image Header header # std_msgs/Header string format # Specifies the format of the data # Acceptable values: # jpeg, png uint8[] data # Compressed image buffer
<base_topic>/compressed/format (string, default: jpeg) Compression format to use, “jpeg” or “png”.
<base_topic>/compressed/jpeg_quality (int, default: 80) JPEG quality percentile, in the range [1, 100]. Lower values trade image quality for space savings.
<base_topic>/compressed/png_level (int, default: 9) PNG compression level, in the range [1, 9]. Higher values trade computation time for space savings.
<base topic>/theora/optimize_for (int, default: Quality (1)) Controls whether to use constant bitrate (CBR) encoding, aiming for ~theora/target_bitrate; or variable bitrate (VBR) encoding, aiming for ~theora/quality. Values are Bitrate (0) and Quality (1).
<base topic>/theora/target_bitrate (int, default: 800000) Target bitrate. Used if optimize_for is set to Bitrate.
<base topic>/theora/quality (int, default: 31) Encoding quality level, in the range [0, 63]. Used if optimize_for is set to Quality.
<base topic>/theora/keyframe_frequency (int, default: 64) Maximum distance between key frames. If set to 1, every frame is a keyframe.