img_type describes the semantic content of the image (“rgb”,
“depth”, “segmentation”, …). encoding_format describes the
wire encoding of data — empty string for a raw ndarray (or a
raw pixel-buffer reshaped into one), or one of {“jpeg”, “png”,
“webp”} when data is the encoded bytes from a camera firmware /
image-transport plugin. The two are orthogonal: a JPEG is still
semantically an RGB image after decoding.
Fields
Union[np.ndarray, bytes]
image data (H x W x C ndarray for raw, or the encoded byte blob when
encoding_format is set).dict, optional
the parameters of image capture.
str
semantic image type (“rgb”, “depth”, “segmentation”, …).
str
"" for raw pixel data; “jpeg” / “png” / “webp” when
data is encoded bytes. Use Image.decode() to lazily turn encoded bytes into an ndarray.tuple, optional
Shape for raw bytes data (height, width, channels).
np.dtype, optional
Data type for raw bytes data.
Constructor
Signature
Methods
decode()
Signature
self.data) when the image is already an ndarray.
from_dict()
Signature
to_dict()
Signature
encoding_format; the receiver reconstructs via
from_dict without reshaping. For ndarrays we fall back
to the legacy raw-bytes-with-shape/dtype path.