Image Processing¶
This module contains utilities for image processing.
Functions
block((object)src, (object)dst, …) |
Performs a block decomposition of a 2D array/image. |
crop((object)src, (object)dst, (int)crop_y, …) |
Crop a 2D or 3D array/image. |
draw_box((object)image, (int)x, (int)y, …) |
Draws a box at the image using the draw_line() primitive. |
draw_cross((object)image, (int)x, (int)y, …) |
Draws a cross with a given radius and color at the image. |
draw_cross_plus((object)image, (int)x, …) |
Draws a cross with a given radius and color at the image. |
draw_line((object)image, (int)x1, (int)y1, …) |
Draws a line between two points p1(x1,y1) and p2(x2,y2). |
draw_point((object)image, (int)x, (int)y, …) |
Draws a point in the given image. |
draw_point_((object)image, (int)x, (int)y, …) |
Draws a point in an image. |
extrapolate_mask((object)src_mask, (object)img) |
Extrapolate a 2D array/image, taking a boolean mask into account. |
flip((object)src, (object)dst) |
Flip a 2D or 3D array/image upside-down. |
flop((object)src, (object)dst) |
Flop a 2D or 3D array/image left-right. |
flow_error((object)i1, (object)i2, …) |
Computes the generalized flow error: E = i2(x-u,y-v) - i1(x,y)) |
gamma_correction((object)src, (object)dst, …) |
Performs a power-law gamma correction on a 2D blitz array/image. |
get_angle_to_horizontal((float)left_y, …) |
Get the angle needed to level out (horizontally) two points. |
get_block_3d_output_shape((object)src, …) |
Returns the shape of the output 2D blitz array/image, when calling bob.ip.block() which performs a block decomposition of a 2D array/image, and saving the results in a 3D array (block_index, y, x). |
get_block_4d_output_shape((object)src, …) |
Returns the shape of the output 2D blitz array/image, when calling bob.ip.block() which performs a block decomposition of a 2D array/image, and saving the results in a 4D array (block_index_y, block_index_x, y, x). |
get_rotated_output_shape((object)input, …) |
Returns the shape of the output image when rotating the given input image with the desired angle. |
get_shear_x_shape((object)src, (float)shear) |
Returns the shape of the output 2D array/image, when calling shear_x. |
get_shear_y_shape((object)src, (float)shear) |
Returns the shape of the output 2D array/image, when calling shear_y. |
gray_to_rgb((object)y, (object)dtype) |
Converts a grayscale pixel to RGB by copying the gray value to all 3 bands. Returns a tuple with (r,g,b) values. This method is just here for convenience. |
histogram((object)src) |
Compute an histogram of a 2D array |
histogram_((object)src, (object)histo [, …) |
Compute an histogram of a 2D array. |
histogram_equalization((object)src, (object)dst) |
Computes the histogram equalization of the given src image and fills the dst image. |
hog_compute_histogram((object)mag, …) |
Computes an Histogram of Gradients for a given ‘cell’. |
hog_compute_histogram_((object)mag, …) |
Computes an Histogram of Gradients for a given ‘cell’. |
hsl_to_rgb((object)hue, (object)saturation, …) |
Converts a HSL color-pixel to RGB as defined in http://en.wikipedia.org/wiki/HSL_and_HSV. Returns a tuple with (r,g,b) values. |
hsv_to_rgb((object)hue, (object)saturation, …) |
Converts a HSV color-pixel to RGB as defined in http://en.wikipedia.org/wiki/HSL_and_HSV. Returns a tuple with (r,g,b) values. |
integral((object)src, (object)dst [, …) |
Compute the integral image of a 2D blitz array (image). |
laplacian_avg_hs((object)input) |
An approximation to the Laplacian operator. |
laplacian_avg_hs_opencv((object)input) |
An approximation to the Laplacian (averaging) operator. |
max_rect_in_mask((object)arg1) |
src |
normalize_block((object)hist, …) |
normalizes a set of cells (Histogram of Gradients), and returns the corresponding block descriptor. |
normalize_block_((object)hist, …) |
normalizes a set of cells (Histogram of Gradients), and returns the corresponding block descriptor. |
normalize_gabor_jet((object)gabor_jet) |
Normalizes the Gabor jet (with or without phase) to unit Euclidean length. |
rgb_to_gray((object)red, (object)green, …) |
Converts a RGB color-coded pixel to Grayscale using the CCIR 601 (Kb = 0.114, Kr = 0.299) norm as discussed here: http://www.fourcc.org/fccyvrgb.php. |
rgb_to_hsl((object)red, (object)green, …) |
Converts a RGB color-pixel to HSL as defined in http://en.wikipedia.org/wiki/HSL_and_HSV. Returns a tuple with (h,s,l) values. |
rgb_to_hsv((object)red, (object)green, …) |
Converts a RGB color-pixel to HSV as defined in http://en.wikipedia.org/wiki/HSL_and_HSV. Returns a tuple with (h,s,v) values. |
rgb_to_yuv((object)red, (object)green, …) |
Converts a RGB color-coded pixel to YUV (Y’CbCr) using the CCIR 601 (Kb = 0.114, Kr = 0.299) norm as discussed here: http://en.wikipedia.org/wiki/YCbCr and here: http://www.fourcc.org/fccyvrgb.php. |
rotate((object)input, (object)output, …) |
Rotates the given input image into the given output image. |
scale((object)src, (object)dst [, …) |
Scales an image to the dimensions given by the allocated destination image. |
scale_as((object)src, (float)scaling_factor) |
Scales an image according to the provided scaling factor. |
shear_x((object)src, (object)dst, …) |
Shears a 2D array/image with the given shear parameter along the X-dimension. |
shear_y((object)src, (object)dst, …) |
Shears a 2D array/image with the given shear parameter along the Y-dimension. |
shift((object)src, (object)dst, …) |
Shift a 2D or 3D array/image. |
try_draw_point((object)image, (int)x, …) |
Tries to draw a point at the given image. |
yuv_to_rgb((object)y, (object)u, (object)v, …) |
Converts a YUV (Y’CbCr) color-coded pixel to RGB using the CCIR 601 (Kb = 0.114, Kr = 0.299) norm as discussed here: http://en.wikipedia.org/wiki/YCbCr and here: http://www.fourcc.org/fccyvrgb.php. |
zigzag((object)src, (object)obj [, …) |
Extracts a 1D NumPy array using a zigzag pattern from a 2D array/image. |
Classes
BlockNorm |
|
CentralGradient((object)self, …) |
This class computes the spatio-temporal gradient using a 3-term approximation composed of 2 separable kernels (one for the diference term and another one for the averaging term). |
DCTFeatures((object)self, (int)block_h, …) |
Objects of this class, after configuration, can extract DCT features as described in the following reference. |
ELBPType |
Different types of LBP codes |
FaceEyesNorm((object)self, …) |
Objects of this class, after configuration, can extract and normalize faces, given their eye center coordinates. |
ForwardGradient((object)self, …) |
This class computes the spatio-temporal gradient using a 2-term approximation composed of 2 separable kernels (one for the diference term and another one for the averaging term). |
GLCM(dtype[, num_levels, min_level, …]) |
Objects of this class, after configuration, can calculate GLCM matrix on a given input image. |
GLCMProp((object)self) |
Objects of this class, after configuration, can compute a number of texture properties on a Grey-Level Co-occurence Matrix (GLCM). |
GSSKeypoint((object)self, (float)scale, …) |
Structure to describe a keypoint on the Gaussian Scale Space. |
GSSKeypointInfo((object)self [, …) |
This is a companion structure to the bob.ip.GSSKeypoin. |
GaborKernel((object)self, …) |
This class can be used to filter an image with a single Gabor wavelet. |
GaborWaveletTransform((object)self [, …) |
This class can be used to perform a Gabor wavelet transform from one image to an image of (normalized) Gabor jets or to a complex-valued multi-layer trafo image. |
Gaussian((object)self [, (int)radius_y=1 [, …) |
This class allows after configuration to perform gaussian smoothing. |
GaussianScaleSpace((object)arg1, …) |
This class allows after configuration the generation of Gaussian Pyramids that can be used to extract SIFT features. |
GeomNorm((object)self, …) |
Objects of this class, after configuration, can perform a geometric normalization. |
GradientMagnitudeType |
|
GradientMaps((object)self, (int)height, …) |
Objects of this class, after configuration, can extract gradient magnitude and orientation maps. |
HOG((object)self, (int)height, (int)width [, …) |
Objects of this class, after configuration, can extract Histogram of Gradients (HOG) descriptors. |
HornAndSchunckFlow((object)self, (object)shape) |
This is a clone of the Vanilla HornAndSchunck method that uses a Sobel gradient estimator instead of the forward estimator used by the classical method. |
HornAndSchunckGradient((object)self, …) |
This class computes the spatio-temporal gradient using the same approximation as the one described by Horn & Schunck in the paper titled ‘Determining Optical Flow’, published in 1981, Artificial Intelligence, * Vol. |
IsotropicGradient((object)self, (object)shape) |
This class computes the spatio-temporal gradient using a isotropic filter. |
LBP((object)self, (int)neighbors, …) |
A class for the LBP operators |
LBPHSFeatures((object)self, (int)block_h, …) |
Constructs a new LBPHSFeatures object to extract histogram of LBP over 2D blitz arrays/images. |
LBPTop((object)self, (LBP)xy, (LBP)xt, (LBP)yt) |
Constructs a new LBPTop object starting from the algorithm configuration. |
Median_float64((object)self, (int)radius_y, …) |
Objects of this class, after configuration, can perform a median filtering operation. |
Median_uint16((object)self, (int)radius_y, …) |
Objects of this class, after configuration, can perform a median filtering operation. |
Median_uint8((object)self, (int)radius_y, …) |
Objects of this class, after configuration, can perform a median filtering operation. |
MultiscaleRetinex((object)self [, …) |
This class allows after configuration to apply the Self Quotient Image algorithm to images. |
PrewittGradient((object)self, (object)shape) |
This class computes the spatio-temporal gradient using a 3-D sobel filter. |
RescaleAlgorithm |
|
RotateAlgorithm |
|
SIFT((object)self, (int)height, (int)width, …) |
This class allows after configuration the extraction of SIFT descriptors. |
SelfQuotientImage((object)self [, …) |
This class allows after configuration to apply the Self Quotient Image algorithm to images. |
Sobel((object)self [, …) |
This class allows after configuration to perform Sobel filtering. |
SobelGradient((object)self, (object)shape) |
This class computes the spatio-temporal gradient using a 3-D sobel filter. |
TanTriggs((object)self [, …) |
Objects of this class, after configuration, can preprocess images. |
VLDSIFT((object)self, (int)height, …) |
Computes dense SIFT features using the VLFeat library |
VLSIFT((object)self, (int)height, …) |
Computes SIFT features using the VLFeat library |
VanillaHornAndSchunckFlow((object)self, …) |
Calculates the Optical Flow between two sequences of images (i1, the starting image and i2, the final image). |
WeightedGaussian((object)self [, …) |
This class performs weighted gaussian smoothing (anisotropic filtering). |