|
template<typename T , int RS> |
void * | image_data (rs_frame_image< T, RS > &img) |
|
template<typename T , int RS> |
const void * | image_data (const rs_frame_image< T, RS > &img) |
|
template<typename T , int RS> |
long | num_columns (const rs_frame_image< T, RS > &img) |
|
template<typename T , int RS> |
long | num_rows (const rs_frame_image< T, RS > &img) |
|
template<typename T , int RS> |
long | width_step (rs_frame_image< T, RS > const &img) |
|
In dlib, an "image" is any object that implements the generic image interface. In particular, this simply means that an image type (let's refer to it as image_type from here on) has the following seven global functions defined for it:
- long num_rows (const image_type& img)
- long num_columns (const image_type& img)
- void set_image_size( image_type& img, long rows, long cols)
- void* image_data ( image_type& img)
- const void* image_data (const image_type& img)
- long width_step (const image_type& img)
- void swap ( image_type& a, image_type& b) And also provides a specialization of the image_traits template that looks like: namespace dlib { template <> struct image_traits<image_type> { typedef the_type_of_pixel_used_in_image_type pixel_type; }; }
Additionally, an image object must be default constructable. This means that expressions of the form: image_type img; Must be legal.
Finally, the type of pixel in image_type must have a pixel_traits specialization. That is, pixel_traits<typename image_traits<image_type>::pixel_type> must be one of the specializations of pixel_traits.
(see http://dlib.net/dlib/image_processing/generic_image.h.html)