The Library
Help/Info
Current Release









Last Modified:
Apr 23, 2012

Image Processing



This page documents the functionality present in this library that deals with the management and manipulation of images. One thing to note is that there is no explicit image object. Instead, everything deals with array2d objects that contain various kinds of pixels.

Pixel Types

Most image handling routines in dlib will accept images containing any pixel type. This is made possible by defining a traits class, pixel_traits, for each possible pixel type. This traits class enables image processing routines to determine how to handle each kind of pixel and therefore only pixels which have a pixel_traits definition may be used. The following list defines all the pixel types which come with pixel_traits definitions.
  • RGB
      There are two RGB pixel types in dlib, rgb_pixel and bgr_pixel. Each defines a 24bit RGB pixel type. The bgr_pixel is identical to rgb_pixel except that it lays the color channels down in memory in BGR order rather than RGB order and is therefore useful for interfacing with other image processing tools which expect this format (e.g. OpenCV).
  • RGB Alpha
      The rgb_alpha_pixel is an 8bit per channel RGB pixel with an 8bit alpha channel.
  • HSI
      The hsi_pixel is a 24bit pixel which represents a point in the Hue Saturation Intensity (HSI) color space.
  • Grayscale
      Any built in scalar type may be used as a grayscale pixel type. For example, unsigned char, int, double, etc.


Pixels
Image I/O
Object Detection
Feature Extraction
Edges and Thresholds
Morphology
Filtering
Scaling and Rotating
Colormaps
Miscellaneous
[top]

assign_all_pixels



This global function assigns all the pixels in an image a specific value.

Specification: dlib/image_transforms/assign_image_abstract.h
File to include: dlib/image_transforms.h

[top]

assign_border_pixels



This global function assigns all the pixels in the border of an image to a specific value.

Specification: dlib/image_transforms/assign_image_abstract.h
File to include: dlib/image_transforms.h

[top]

assign_image



This global function copies one image into another and performs any necessary color space conversions to make it work right.

Specification: dlib/image_transforms/assign_image_abstract.h
File to include: dlib/image_transforms.h

[top]

assign_image_scaled



This global function copies one image into another and performs any necessary color space conversions to make it work right. Additionally, if the dynamic range of the source image is too big to fit into the destination image then it will attempt to perform the appropriate scaling.

Specification: dlib/image_transforms/assign_image_abstract.h
File to include: dlib/image_transforms.h

[top]

assign_pixel



assign_pixel() is a templated function that can assign any pixel type to another pixel type. It will perform whatever conversion is necessary to make the assignment work. (E.g. color to grayscale conversion)

Specification: dlib/pixel.h
File to include: dlib/pixel.h

[top]

assign_pixel_intensity



assign_pixel_intensity() is a templated function that can change the intensity of a pixel. So if the pixel in question is a grayscale pixel then it simply assigns that pixel the given value. However, if the pixel is not a grayscale pixel then it converts the pixel to the HSI color space and sets the I channel to the given intensity and then converts this HSI value back to the original pixel's color space.

Specification: dlib/pixel.h
File to include: dlib/pixel.h

[top]

auto_threshold_image



This global function performs a simple binary thresholding on an image. Instead of taking a user supplied threshold it computes one from the image using k-means clustering.

Specification: dlib/image_transforms/thresholding_abstract.h
File to include: dlib/image_transforms.h

[top]

bgr_pixel



This is a simple struct that represents a BGR colored graphical pixel.

The difference between this object and the rgb_pixel is just that this struct lays its pixels down in memory in BGR order rather than RGB order. You only care about this if you are doing something like using the cv_image object to map an OpenCV image into a more object oriented form.



Specification: dlib/pixel.h
File to include: dlib/pixel.h

[top]

binary_close



This global function performs a morphological closing on an image.

Specification: dlib/image_transforms/morphological_operations_abstract.h
File to include: dlib/image_transforms.h

[top]

binary_complement



This global function computes the complement of a binary image.

Specification: dlib/image_transforms/morphological_operations_abstract.h
File to include: dlib/image_transforms.h

[top]

binary_difference



This global function computes the difference of two binary images.

Specification: dlib/image_transforms/morphological_operations_abstract.h
File to include: dlib/image_transforms.h

[top]

binary_dilation



This global function performs the morphological operation of dilation on an image.

Specification: dlib/image_transforms/morphological_operations_abstract.h
File to include: dlib/image_transforms.h

[top]

binary_erosion



This global function performs the morphological operation of erosion on an image.

Specification: dlib/image_transforms/morphological_operations_abstract.h
File to include: dlib/image_transforms.h

[top]

binary_intersection



This global function computes the intersection of two binary images.

Specification: dlib/image_transforms/morphological_operations_abstract.h
File to include: dlib/image_transforms.h

[top]

binary_open



This global function performs a morphological opening on an image.

Specification: dlib/image_transforms/morphological_operations_abstract.h
File to include: dlib/image_transforms.h

[top]

binary_union



This global function computes the union of two binary images.

Specification: dlib/image_transforms/morphological_operations_abstract.h
File to include: dlib/image_transforms.h

[top]

compute_box_dimensions



This function is a tool for computing a rectangle with a particular width/height ratio and area.

Specification: dlib/image_processing/detection_template_tools_abstract.h
File to include: dlib/image_processing.h

[top]

compute_dominant_angle



Computes and returns the dominant angle (i.e. the angle of the dominant gradient) at a given point and scale in an image. This function is part of the main processing of the SURF algorithm.

Specification: dlib/image_keypoint/surf_abstract.h
File to include: dlib/image_keypoint.h

[top]

compute_surf_descriptor



Computes the 64 dimensional SURF descriptor vector of a box centered at a given center point, tilted at a given angle, and sized according to a given scale.

Specification: dlib/image_keypoint/surf_abstract.h
File to include: dlib/image_keypoint.h

[top]

create_grid_detection_template



This function is a tool for creating a detection template usable by the scan_image_pyramid object. This particular function creates a detection template with a grid of feature extraction regions.

Specification: dlib/image_processing/detection_template_tools_abstract.h
File to include: dlib/image_processing.h

[top]

create_overlapped_2x2_detection_template



This function is a tool for creating a detection template usable by the scan_image_pyramid object. This particular function creates a detection template with four overlapping feature extraction regions.

Specification: dlib/image_processing/detection_template_tools_abstract.h
File to include: dlib/image_processing.h

[top]

create_single_box_detection_template



This function is a tool for creating a detection template usable by the scan_image_pyramid object. This particular function creates a detection template with exactly one feature extraction region.

Specification: dlib/image_processing/detection_template_tools_abstract.h
File to include: dlib/image_processing.h

[top]

cv_image



This object is meant to be used as a simple wrapper around the OpenCV IplImage struct or Mat object. Using this class template you can turn an OpenCV image into something that looks like a normal dlib style image object.

So you should be able to use cv_image objects with many of the image processing functions in dlib as well as the GUI tools for displaying images on the screen.

Note that you can do the reverse conversion, from dlib to OpenCV, using the toMat routine. Also note that you have to #include OpenCV's header before you #include dlib/opencv.h.



Specification: dlib/opencv/cv_image_abstract.h
File to include: dlib/opencv.h

[top]

determine_object_boxes



The scan_image_pyramid object represents a sliding window classifier system. For it to work correctly it needs to be given a set of object boxes which define the size and shape of each sliding window and these windows need to be able to match the sizes and shapes of targets the user wishes to detect. Therefore, the determine_object_boxes() routine is a tool for computing a set of object boxes which can meet this requirement.

Specification: dlib/image_processing/scan_image_pyramid_tools_abstract.h
File to include: dlib/image_processing.h

[top]

draw_line



This global function draws a line on an image.

Specification: dlib/image_transforms/draw_abstract.h
File to include: dlib/image_transforms.h

[top]

edge_orientation



This global function takes horizontal and vertical gradient magnitude values and returns the orientation of the gradient.

Specification: dlib/image_transforms/edge_detector_abstract.h
File to include: dlib/image_transforms.h

[top]

equalize_histogram



This global function performs histogram equalization on an image.

Specification: dlib/image_transforms/equalize_histogram_abstract.h
File to include: dlib/image_transforms.h

[top]

fill_rect



This global function draws a solid rectangle on an image.

Specification: dlib/image_transforms/draw_abstract.h
File to include: dlib/image_transforms.h

[top]

fine_hog_image



This object is a version of the hog_image that allows you to extract HOG features at a finer resolution.

Specification: dlib/image_keypoint/fine_hog_image_abstract.h
File to include: dlib/image_keypoint.h

[top]

flip_image_left_right



This is a routine which can flip an image from left to right. (e.g. as if viewed through a mirror).

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

flip_image_up_down



This routine flips an image upside down.

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

gaussian_blur



This global function blurs an image by convolving it with a Gaussian filter.

Specification: dlib/image_transforms/spatial_filtering_abstract.h
File to include: dlib/image_transforms.h

[top]

get_histogram



This global function computes an image's histogram and returns it in the form of a column or row matrix object.

Specification: dlib/image_transforms/equalize_histogram_abstract.h
File to include: dlib/image_transforms.h

[top]

get_interest_points



This function extracts interest points from a hessian_pyramid.

Specification: dlib/image_keypoint/hessian_pyramid_abstract.h
File to include: dlib/image_keypoint.h

[top]

get_pixel_intensity



get_pixel_intensity() is a templated function that returns the grayscale intensity of a pixel. If the pixel isn't a grayscale pixel then it converts the pixel to grayscale and returns that value.

Specification: dlib/pixel.h
File to include: dlib/pixel.h

[top]

get_surf_points



This function runs the complete SURF algorithm on an input image and returns the points it found. For a description of what exactly the SURF algorithm does you should read the following paper:
SURF: Speeded Up Robust Features By Herbert Bay, Tinne Tuytelaars, and Luc Van Gool

Also note that there are numerous flavors of the SURF algorithm you can put together using the functions in dlib. The get_surf_points() function is just an example of one way you might do so.



Specification: dlib/image_keypoint/surf_abstract.h
File to include: dlib/image_keypoint.h
Code Examples: 1

[top]

haar_x



This is a function that operates on an integral_image and allows you to compute the response of a Haar wavelet oriented along the X axis.

Specification: dlib/image_transforms/integral_image_abstract.h
File to include: dlib/image_transforms.h

[top]

haar_y



This is a function that operates on an integral_image and allows you to compute the response of a Haar wavelet oriented along the Y axis.

Specification: dlib/image_transforms/integral_image_abstract.h
File to include: dlib/image_transforms.h

[top]

hashed_feature_image



This object is a tool for performing image feature extraction. In particular, it wraps another image feature extractor and converts the wrapped image feature vectors into sparse indicator vectors. It does this by hashing each feature vector and then returns a new vector which is zero everywhere except for the position determined by the hash.

The following feature extractors can be wrapped by the hashed_feature_image:

Specification: dlib/image_keypoint/hashed_feature_image_abstract.h
File to include: dlib/image_keypoint.h
Code Examples: 1, 2

[top]

heatmap



Converts a grayscale image into a heatmap. This is useful if you want to display a grayscale image with more than 256 values.

Specification: dlib/image_transforms/colormaps_abstract.h
File to include: dlib/image_transforms.h
Code Examples: 1

[top]

hessian_pyramid



This object represents an image pyramid where each level in the pyramid holds determinants of Hessian matrices for the original input image. This object can be used to find stable interest points in an image.

This object is an implementation of the fast Hessian pyramid as described in the paper:
SURF: Speeded Up Robust Features By Herbert Bay, Tinne Tuytelaars, and Luc Van Gool
This implementation was also influenced by the very well documented OpenSURF library and its corresponding description of how the fast Hessian algorithm functions:
Notes on the OpenSURF Library by Christopher Evans


Specification: dlib/image_keypoint/hessian_pyramid_abstract.h
File to include: dlib/image_keypoint.h

[top]

hog_image



This object is a tool for performing the image feature extraction algorithm described in the following paper:
Histograms of Oriented Gradients for Human Detection by Navneet Dalal and Bill Triggs


Specification: dlib/image_keypoint/hog_abstract.h
File to include: dlib/image_keypoint.h
Code Examples: 1, 2

[top]

hsi_pixel



This is a simple struct that represents an HSI colored graphical pixel.

Specification: dlib/pixel.h
File to include: dlib/pixel.h

[top]

hysteresis_threshold



This global function performs hysteresis thresholding on an image.

Specification: dlib/image_transforms/thresholding_abstract.h
File to include: dlib/image_transforms.h

[top]

integral_image



This is a specialization of the integral_image_generic template for the case where sums of pixel values should be represented with longs. E.g. if you use 8bit pixels in your original images then this is the appropriate kind of integral image to use with them.

Specification: dlib/image_transforms/integral_image_abstract.h
File to include: dlib/image_transforms.h

[top]

integral_image_generic



This object is an alternate way of representing image data that allows for very fast computations of sums of pixels in rectangular regions. To use this object you load it with a normal image and then you can use the get_sum_of_area() member function to compute sums of pixels in a given area in constant time.

Specification: dlib/image_transforms/integral_image_abstract.h
File to include: dlib/image_transforms.h

[top]

interest_point



This is a simple struct used to represent the interest points returned by the get_interest_points function.

Specification: dlib/image_keypoint/hessian_pyramid_abstract.h
File to include: dlib/image_keypoint.h

[top]

interpolate_bilinear



This object is a tool for performing bilinear interpolation on an image.

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

interpolate_nearest_neighbor



This object is a tool for performing nearest neighbor interpolation on an image.

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

interpolate_quadratic



This object is a tool for performing quadratic interpolation on an image.

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

jpeg_loader



This object loads a JPEG image file into an array2d of pixels.

Note that you must define DLIB_JPEG_SUPPORT if you want to use this object. You must also set your build environment to link to the libjpeg library. However, if you use CMake and dlib's default CMakeLists.txt file then it will get setup automatically (assuming libjpeg is properly installed in your system).



Specification: dlib/image_loader/jpeg_loader_abstract.h
File to include: dlib/image_io.h

[top]

label_connected_blobs



This function labels each of the connected blobs in an image with a unique integer label.

Specification: dlib/image_transforms/label_connected_blobs_abstract.h
File to include: dlib/image_transforms.h

[top]

load_bmp



This global function loads a MS Windows BMP file into an array2d of pixels.

Specification: dlib/image_loader/image_loader_abstract.h
File to include: dlib/image_io.h

[top]

load_dng



This global function loads a dlib DNG file (a lossless compressed image format) into an array2d of pixels.

Specification: dlib/image_loader/image_loader_abstract.h
File to include: dlib/image_io.h

[top]

load_image



This global function takes a file name, looks at its extension, and then loads it into an array2d of pixels using the appropriate image loading routine. The supported types are BMP, PNG, JPEG, and the dlib DNG file format.

Note that you can only load PNG and JPEG files if you link against libpng and libjpeg respectively.



Specification: dlib/image_loader/load_image_abstract.h
File to include: dlib/image_io.h
Code Examples: 1

[top]

load_jpeg



This function loads a JPEG image file into an array2d of pixels.

Note that you must define DLIB_JPEG_SUPPORT if you want to use this object. You must also set your build environment to link to the libjpeg library. However, if you use CMake and dlib's default CMakeLists.txt file then it will get setup automatically (assuming libjpeg is properly installed in your system).



Specification: dlib/image_loader/jpeg_loader_abstract.h
File to include: dlib/image_io.h

[top]

load_png



This function loads a Portable Network Graphics (PNG) image file into an array2d of pixels.

Note that you must define DLIB_PNG_SUPPORT if you want to use this object. You must also set your build environment to link to the libpng library. However, if you use CMake and dlib's default CMakeLists.txt file then it will get setup automatically (assuming libpng is properly installed on your system).



Specification: dlib/image_loader/png_loader_abstract.h
File to include: dlib/image_io.h

[top]

nearest_neighbor_feature_image



This object is a tool for performing image feature extraction. In particular, it wraps another image feature extractor and converts the wrapped image feature vectors into sparse indicator vectors. It does this by finding the nearest neighbor for each feature vector and returning an indicator vector that is zero everywhere except for the position indicated by the nearest neighbor.

The following feature extractors can be wrapped by the nearest_neighbor_feature_image:

Specification: dlib/image_keypoint/nearest_neighbor_feature_image_abstract.h
File to include: dlib/image_keypoint.h

[top]

object_detector



This object is a tool for detecting the positions of objects in an image. In particular, it is a simple container to aggregate an instance of the scan_image_pyramid class, the weight vector needed by scan_image_pyramid, and an instance of test_box_overlap. The test_box_overlap object is used to perform non-max suppression on the output of the scan_image_pyramid object.

Note that you can use the structural_object_detection_trainer to learn the parameters of an object_detector. See the example programs for an introduction.



Specification: dlib/image_processing/object_detector_abstract.h
File to include: dlib/image_processing.h
Code Examples: 1, 2, 3

[top]

pixel_traits



As the name implies, this is a traits class for pixel types. It allows you to determine what sort of pixel type you are dealing with.

Specification: dlib/pixel.h
File to include: dlib/pixel.h

[top]

png_loader



This object loads a Portable Network Graphics (PNG) image file into an array2d of pixels.

Note that you must define DLIB_PNG_SUPPORT if you want to use this object. You must also set your build environment to link to the libpng library. However, if you use CMake and dlib's default CMakeLists.txt file then it will get setup automatically (assuming libpng is properly installed on your system).



Specification: dlib/image_loader/png_loader_abstract.h
File to include: dlib/image_io.h

[top]

poly_image



This object is a tool for extracting local feature descriptors from an image. In particular, it fits polynomials to local pixel patches and allows you to query the coefficients of these polynomials.

Specification: dlib/image_keypoint/poly_image_abstract.h
File to include: dlib/image_keypoint.h

[top]

pyramid_disable



This object downsamples an image at a ratio of infinity to 1. That means it always outputs an image of size zero. This is useful because it can be supplied to routines which take a pyramid_down function object and it will essentially disable pyramid processing. This way, a pyramid oriented function can be turned into a regular routine which processes just the original undownsampled image.

Specification: dlib/image_transforms/image_pyramid_abstract.h
File to include: dlib/image_transforms.h

[top]

pyramid_down



This is a simple function object to help create image pyramids. It downsamples an image by half.

Specification: dlib/image_transforms/image_pyramid_abstract.h
File to include: dlib/image_transforms.h

[top]

pyramid_down_3_2



This is a simple function object to help create image pyramids. It downsamples an image by a ratio of 3 to 2.

Specification: dlib/image_transforms/image_pyramid_abstract.h
File to include: dlib/image_transforms.h

[top]

pyramid_down_4_3



This is a simple function object to help create image pyramids. It downsamples an image by a ratio of 4 to 3.

Specification: dlib/image_transforms/image_pyramid_abstract.h
File to include: dlib/image_transforms.h

[top]

pyramid_down_5_4



This is a simple function object to help create image pyramids. It downsamples an image by a ratio of 5 to 4.

Specification: dlib/image_transforms/image_pyramid_abstract.h
File to include: dlib/image_transforms.h

[top]

pyramid_up



This routine upsamples an image. In particular, it takes one of the pyramid_down objects as an argument and performs an upsampling which is the inverse of the supplied pyramid_down object.

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

randomly_color_image



Randomly generates a mapping from gray level pixel values to the RGB pixel space and then uses this mapping to create a colored version an image.

This function is useful for displaying the results of some image segmentation. For example, the output of label_connected_blobs or segment_image.



Specification: dlib/image_transforms/colormaps_abstract.h
File to include: dlib/image_transforms.h

[top]

resize_image



This is a routine capable of resizing or stretching an image.

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

rgb_alpha_pixel



This is a simple struct that represents an RGB colored graphical pixel with an alpha channel.

Specification: dlib/pixel.h
File to include: dlib/pixel.h

[top]

rgb_pixel



This is a simple struct that represents an RGB colored graphical pixel.

Specification: dlib/pixel.h
File to include: dlib/pixel.h

[top]

rotate_image



This is a routine for rotating an image.

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

save_bmp



This global function saves an image as a MS Windows BMP file.

This routine can save images containing any type of pixel. However, it will convert all color pixels into rgb_pixel and grayscale pixels into uint8 type before saving to disk.



Specification: dlib/image_saver/image_saver_abstract.h
File to include: dlib/image_io.h

[top]

save_dng



This global function saves an image as a dlib DNG file (a lossless compressed image format).

This routine can save images containing any type of pixel. However, the DNG format can natively store only the following pixel types: rgb_pixel, hsi_pixel, rgb_alpha_pixel, uint8, and uint16. All other pixel types will be converted into one of these types as appropriate before being saved to disk.



Specification: dlib/image_saver/image_saver_abstract.h
File to include: dlib/image_io.h

[top]

save_png



This global function writes an image to disk as a PNG (Portable Network Graphics) file.

Note that you must define DLIB_PNG_SUPPORT if you want to use this function. You must also set your build environment to link to the libpng library. However, if you use CMake and dlib's default CMakeLists.txt file then it will get setup automatically (assuming libpng is properly installed in your system).

This routine can save images containing any type of pixel. However, save_png() can only natively store the following pixel types: rgb_pixel, rgb_alpha_pixel, uint8, and uint16. All other pixel types will be converted into one of these types as appropriate before being saved to disk.



Specification: dlib/image_saver/save_png_abstract.h
File to include: dlib/image_io.h

[top]

scan_image



This global function is a tool for sliding a set of rectangles over an image space and finding the locations where the sum of pixels in the rectangles exceeds a threshold. It is useful for implementing certain kinds of sliding window classifiers.

Specification: dlib/image_processing/scan_image_abstract.h
File to include: dlib/image_processing.h

[top]

scan_image_pyramid



This object is a tool for running a sliding window classifier over an image pyramid. This object can also be understood as a general tool for implementing the spatial pyramid models described in the paper:
Beyond Bags of Features: Spatial Pyramid Matching for Recognizing Natural Scene Categories by Svetlana Lazebnik, Cordelia Schmid, and Jean Ponce


The following feature extractors can be used with the scan_image_pyramid object:

Specification: dlib/image_processing/scan_image_pyramid_abstract.h
File to include: dlib/image_processing.h
Code Examples: 1, 2

[top]

segment_image



Attempts to segment an image into regions which have some visual consistency to them. In particular, this function implements the algorithm described in the paper:
Efficient Graph-Based Image Segmentation by Felzenszwalb and Huttenlocher.


Specification: dlib/image_transforms/segment_image_abstract.h
File to include: dlib/image_transforms.h

[top]

separable_3x3_filter_block_grayscale



This routine filters part of an image with a user supplied 3x3 separable filter. The output is a grayscale sub-image.

Specification: dlib/image_transforms/spatial_filtering_abstract.h
File to include: dlib/image_transforms.h

[top]

separable_3x3_filter_block_rgb



This routine filters part of an image with a user supplied 3x3 separable filter. The output is a RGB sub-image.

Specification: dlib/image_transforms/spatial_filtering_abstract.h
File to include: dlib/image_transforms.h

[top]

setup_grid_detection_templates



This routine uses determine_object_boxes to obtain a set of object boxes and then adds them to a scan_image_pyramid object as detection templates. It also uses create_grid_detection_template to create each feature extraction region. Therefore, the detection templates will extract features from a regular grid inside each object box.

Specification: dlib/image_processing/scan_image_pyramid_tools_abstract.h
File to include: dlib/image_processing.h

[top]

setup_grid_detection_templates_verbose



This function is identical to setup_grid_detection_templates except that it also outputs information regarding the selected detection templates to standard out.

Specification: dlib/image_processing/scan_image_pyramid_tools_abstract.h
File to include: dlib/image_processing.h
Code Examples: 1, 2

[top]

setup_hashed_features



This is a tool for configuring the hashed_feature_image object with a random projection hash.

Specification: dlib/image_processing/scan_image_pyramid_tools_abstract.h
File to include: dlib/image_processing.h
Code Examples: 1, 2

[top]

sobel_edge_detector



This global function performs spatial filtering on an image using the sobel edge detection filters.

Specification: dlib/image_transforms/edge_detector_abstract.h
File to include: dlib/image_transforms.h
Code Examples: 1

[top]

spatially_filter_image



This global function performs spatial filtering on an image with a user supplied filter.

Specification: dlib/image_transforms/spatial_filtering_abstract.h
File to include: dlib/image_transforms.h

[top]

spatially_filter_image_separable



This global function performs spatial filtering on an image with a user supplied separable filter.

Specification: dlib/image_transforms/spatial_filtering_abstract.h
File to include: dlib/image_transforms.h

[top]

spatially_filter_image_separable_down



This global function performs spatial filtering on an image with a user supplied separable filter. Additionally, it produces a downsampled output.

Specification: dlib/image_transforms/spatial_filtering_abstract.h
File to include: dlib/image_transforms.h

[top]

sum_filter



This function slides a rectangle over an input image and outputs a new image which contains the sum of pixels inside the rectangle at each position in the input image.

Specification: dlib/image_transforms/spatial_filtering_abstract.h
File to include: dlib/image_transforms.h

[top]

suppress_non_maximum_edges



This global function performs non-maximum suppression on a gradient image.

Specification: dlib/image_transforms/edge_detector_abstract.h
File to include: dlib/image_transforms.h
Code Examples: 1

[top]

surf_point



This is a simple struct used to represent the SURF points returned by the get_surf_points function.

Specification: dlib/image_keypoint/surf_abstract.h
File to include: dlib/image_keypoint.h
Code Examples: 1

[top]

test_box_overlap



This object is a simple function object for determining if two rectangles overlap.

Specification: dlib/image_processing/box_overlap_testing_abstract.h
File to include: dlib/image_processing.h

[top]

threshold_image



This global function performs a simple binary thresholding on an image with a user supplied threshold.

Specification: dlib/image_transforms/thresholding_abstract.h
File to include: dlib/image_transforms.h

[top]

toMat



This routine converts a dlib style image into an instance of OpenCV's cv::Mat object. This is done by setting up the Mat object to point to the same memory as the dlib image.

Note that you can do the reverse conversion, from OpenCV to dlib, using the cv_image object. Also note that you have to #include OpenCV's header before you #include dlib/opencv.h.



Specification: dlib/opencv/to_open_cv_abstract.h
File to include: dlib/opencv.h

[top]

transform_image



This routine is a tool for transforming images using some kind of point mapping function (e.g. point_transform_affine) and pixel interpolation tool (e.g. interpolate_quadratic). An example application of this routine is for image rotation. Indeed, it is how rotate_image is implemented.

Specification: dlib/image_transforms/interpolation_abstract.h
File to include: dlib/image_transforms.h

[top]

zero_border_pixels



This global function zeros the pixels on the border of an image.

Specification: dlib/image_transforms/assign_image_abstract.h
File to include: dlib/image_transforms.h