May 2020
Intermediate to advanced
530 pages
17h 8m
English
Dlib is another popular library for image processing. This library has different types used for math routines and image processing. The library documentation recommends using the Dlib::array2d type for images. The Dlib::array2d type is a template type that has to be parametrized with a pixel type. Pixel types in the Dlib library are defined with pixel-type traits. There are the following predefined pixel types: rgb_pixel, bgr_pixel, rgb_alpha_pixel, hsi_pixel, lab_pixel, and any scalar type can be used for the grayscaled pixels' representation.
We can use the load_image() function to load an image from disk, as follows:
#include <Dlib/image_io.h>#include <Dlib/image_transforms.h>using namespace Dlib;...array2d<rgb_pixel> img; ...
Read now
Unlock full access