{ "title": "foxglove.RawImage", "description": "A raw image", "$comment": "Generated by https://github.com/foxglove/foxglove-sdk", "type": "object", "properties": { "timestamp": { "type": "object", "title": "time", "properties": { "sec": { "type": "integer", "minimum": 0 }, "nsec": { "type": "integer", "minimum": 0, "maximum": 999999999 } }, "description": "Timestamp of image" }, "frame_id": { "type": "string", "description": "Frame of reference for the image. The origin of the frame is the optical center of the camera. +x points to the right in the image, +y points down, and +z points into the plane of the image." }, "width": { "type": "integer", "minimum": 0, "description": "Image width in pixels" }, "height": { "type": "integer", "minimum": 0, "description": "Image height in pixels" }, "encoding": { "type": "string", "description": "Encoding of the raw image data. See the `data` field description for supported values." }, "step": { "type": "integer", "minimum": 0, "description": "Byte length of a single row. This is usually some multiple of `width` depending on the encoding, but can be greater to incorporate padding." }, "data": { "type": "string", "contentEncoding": "base64", "description": "Raw image data.\n\nFor each `encoding` value, the `data` field contains image pixel data serialized as follows:\n\n- `yuv422` or `uyvy`:\n - Pixel colors are decomposed into [Y'UV](https://en.wikipedia.org/wiki/Y%E2%80%B2UV) channels.\n - Pixel channel values are represented as unsigned 8-bit integers.\n - U and V values are shared between horizontal pairs of pixels. Each pair of output pixels is serialized as [U, Y1, V, Y2].\n - `step` must be greater than or equal to `width` * 2.\n- `yuv422_yuy2` or `yuyv`:\n - Pixel colors are decomposed into [Y'UV](https://en.wikipedia.org/wiki/Y%E2%80%B2UV) channels.\n - Pixel channel values are represented as unsigned 8-bit integers.\n - U and V values are shared between horizontal pairs of pixels. Each pair of output pixels is encoded as [Y1, U, Y2, V].\n - `step` must be greater than or equal to `width` * 2.\n- `nv12`:\n - Pixel colors are decomposed into [Y'UV](https://en.wikipedia.org/wiki/Y%E2%80%B2UV) channels using 4:2:0 chroma subsampling. The data is stored in [NV12](https://www.kernel.org/doc/html/v4.10/media/uapi/v4l/pixfmt-nv12.html) semi-planar layout with two contiguous planes: a Y (luma) plane followed by an interleaved UV (chroma) plane.\n - All channel values are represented as unsigned 8-bit integers.\n - Both planes use `step` as their row stride.\n - The Y plane contains one luma value per pixel (`step` * `height` bytes).\n - The UV plane contains interleaved U, V chroma pairs, subsampled by a factor of 2 in both dimensions (`width`/2 pairs per row, `height`/2 rows, `step` * `height`/2 bytes). Each U, V pair is shared by a 2x2 block of pixels.\n - `width` and `height` must be even.\n - `step` must be greater than or equal to `width`.\n - Total `data` length is `step` * `height` * 3/2 bytes.\n- `rgb8`:\n - Pixel colors are decomposed into Red, Green, and Blue channels.\n - Pixel channel values are represented as unsigned 8-bit integers.\n - Each output pixel is serialized as [R, G, B].\n - `step` must be greater than or equal to `width` * 3.\n- `rgba8`:\n - Pixel colors are decomposed into Red, Green, Blue, and Alpha channels.\n - Pixel channel values are represented as unsigned 8-bit integers.\n - Each output pixel is serialized as [R, G, B, Alpha].\n - `step` must be greater than or equal to `width` * 4.\n- `bgr8` or `8UC3`:\n - Pixel colors are decomposed into Blue, Green, and Red channels.\n - Pixel channel values are represented as unsigned 8-bit integers.\n - Each output pixel is serialized as [B, G, R].\n - `step` must be greater than or equal to `width` * 3.\n- `bgra8`:\n - Pixel colors are decomposed into Blue, Green, Red, and Alpha channels.\n - Pixel channel values are represented as unsigned 8-bit integers.\n - Each output pixel is encoded as [B, G, R, Alpha].\n - `step` must be greater than or equal to `width` * 4.\n- `32FC1`:\n - Pixel brightness is represented as a single-channel, 32-bit little-endian IEEE 754 floating-point value, ranging from 0.0 (black) to 1.0 (white).\n - `step` must be greater than or equal to `width` * 4.\n- `bayer_rggb8`, `bayer_bggr8`, `bayer_gbrg8`, or `bayer_grbg8`:\n - Pixel colors are decomposed into Red, Blue and Green channels.\n - Pixel channel values are represented as unsigned 8-bit integers, and serialized in a 2x2 bayer filter pattern.\n - The order of the four letters after `bayer_` determine the layout, so for `bayer_wxyz8` the pattern is:\n ```text\n w | x\n - + -\n y | z\n ```\n - `step` must be greater than or equal to `width`.\n- `mono8` or `8UC1`:\n - Pixel brightness is represented as unsigned 8-bit integers.\n - `step` must be greater than or equal to `width`.\n- `mono16` or `16UC1`:\n - Pixel brightness is represented as 16-bit unsigned little-endian integers. Rendering of these values is controlled in [Image panel color mode settings](https://docs.foxglove.dev/docs/visualization/panels/image#general).\n - `step` must be greater than or equal to `width` * 2.\n" } }, "required": [ "timestamp", "frame_id", "width", "height", "encoding", "step", "data" ] }