The ImageSource Utils

karabo::utils namespace contains functions which are of common use for image source devices. This is the list of the currently provided ones:

void karabo::util::unpackMono12Packed(const uint8_t *data, const uint32_t width, const uint32_t height, uint16_t *unpackedData)

Unpack the input MONO12PACKED data to MONO12.

In MONO12PACKED pixel data format, every 3 bytes contain data for 2 pixels, according to the following table:

Byte Pixel - Data bits
B0 P0 11…4
B1 P1 3…0 | P0 3…0
B2 P1 11…4
Bm Pn 11…4

Parameters
  • data: The pointer to the input packed data
  • width: The image width
  • height: The image height
  • unpackedData: The pointer to the output unpacked data