Skip to main content

unpack_u16

Function unpack_u16 

Source
pub fn unpack_u16(
    format: PixelFormat,
    width: u32,
    height: u32,
    row_stride: Option<usize>,
    src: &[u8],
) -> Result<Vec<u16>, ConvertError>
Expand description

The camera’s sample values of a single-component format (Mono*, Bayer*), one per pixel, row-major. A Bayer mosaic is returned as it is.

row_stride is the distance in bytes from the start of one line to the next when the camera pads its lines; None reads the image as one run. The module’s Geometry section says which is which.