Deinterleaving in Dlib
The Dlib library uses the unsigned char type for pixel color representation, and we can use floating-point types only for grayscaled images. The Dlib library stores pixels in the row-major order with interleaved channels and data is placed in memory continuously with a single block. There are no special functions in the Dlib library to manage image channels, so we cannot deinterleave them or mix them. However, we can use raw pixel data to manage color values manually. There are two functions in the Dlib library that can help us: the image_data() function to access raw pixel data, and the width_step() function to get the padding value. The most straightforward approach to deinterleave the Dlib image object is using ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access