Image processing and feature extraction
The Image
class is a core component of this Toolbox. It encapsulates a
NumPy array that contains the pixel values of a greyscale or color image as
a 2D or 3D array respectively.
An Image
instance has a very large number of methods that perform useful
operations on an image and wrap low-level operations performed using NumPy or
OpenCV.
Image object
Basic info
Image width |
|
Image height |
|
Image size |
|
Number of pixels in image plane |
|
Set/get image name |
|
Coordinate of centre pixel |
|
Coordinate of centre pixel as integer |
|
Coordinate of center pixel |
|
Coordinate of centre pixel as integer |
|
Single line summary of image parameters |
|
Single line summary of image parameters |
Predicates
Image has floating point pixel values? |
|
Image has integer values? |
|
Image has bolean values? |
|
Image has color pixels? |
|
Image has BGR color order? |
|
Image has RGB color order? |
Image coordinates
Image maximum u-coordinate |
|
Image maximum v-coordinate |
|
Linear span of image horizontally |
|
Linear span of image vertically |
|
Coordinate arrays for image |
|
Test if coordinate lies within image |
NumPy pixel data
Set/get the NumPy array containing pixel values |
|
Image as NumPy array in RGB color order |
|
Image as NumPy array in BGR color order |
|
Image as NumPy array |
|
Image as integer NumPy array |
|
Image as float NumPy array |
|
Convert image to a column view |
|
Image shape |
|
Number of image array dimensions |
Image datatype
Image has floating point pixel values? |
|
Image has integer values? |
|
Image has bolean values? |
|
Datatype of image |
|
Convert image datatype |
|
Cast image datatype |
|
Image as integer NumPy array |
|
Image as float NumPy array |
|
Cast value to same type as image |
|
Convert value to the same type as image |
|
Minimum value of image datatype |
|
Maximum value of image datatype |
|
True value for logical image |
|
False value for logical image |
Image processing
Sub images
Extract region of interest |
|
Extract plane(s) from color image |
|
Extract the red plane of a color image |
|
Extract the green plane of a color image |
|
Extract the blue plane of a color image |
|
Extract slice of image |
Color info
Image has color pixels? |
|
Image has BGR color order? |
|
Image has RGB color order? |
|
Set/get color order of image |
|
Image color order as a string |
|
Parse a color order specification |
|
Number of color planes |
|
Extract plane(s) from color image |
Color
Convert color image to monochrome |
|
Colorize a greyscale image |
|
Create chromaticity image |
|
Transform a color image between color representations |
|
Gamma encoding |
|
Gamma decoding |
|
k-means color clustering |
Composition
Horizontal concatenation of images |
|
Vertical concatenation of images |
|
Tile images into a grid |
|
Overlay two greyscale images in different colors |
Monadic functions
Absolute value of image |
|
Square root of image |
|
Apply lookup table |
|
Apply a function to an image |
|
Clip pixel values |
|
Roll image by row or column |
|
Histogram normalisaton |
|
Image normalisation |
|
Image threshold |
|
Interactive thresholding |
|
Adaptive threshold |
|
Invert image |
Dyadic functions
Apply a function to two images |
|
Image blending |
|
Pixel-wise image merge |
|
Paste an image into an image |
|
Gradient direction |
Linear filtering
Image convolution |
|
Smooth image |
|
Compute horizontal and vertical gradients |
|
Gradient direction |
|
Harris corner strength image |
|
Compute image scalespace sequence |
|
Pyramidal image decomposition |
|
Canny edge detection |
Non-linear filtering
Generalized spatial operator |
|
Compute zero crossing |
|
Rank filter |
|
Median filter |
|
Distance transform |
|
Morphological erosion |
|
Morphological dilation |
|
Morphological closing |
|
Morphological opening |
|
Morphological neighbourhood processing |
|
Hit or miss transform |
|
Morphological skeletonization |
|
Morphological skeletonization with animation |
|
Find end points on a binary skeleton image |
|
Find triple points |
Image labeling
Blob labelling |
|
Blob labelling using MSER |
|
Blob labelling using graph-based segmentation |
|
k-means color clustering |
Image similarity
Sum of absolute differences |
|
Sum of squared differences |
|
Normalised cross correlation |
|
Zero-mean sum of absolute differences |
|
Zero-mean sum of squared differences |
|
Zero-mean normalized cross correlation |
|
Locate template in image |
Shape changing
Trim pixels from the edges of the image |
|
Pad the edges of the image |
|
Decimate an image |
|
Replicate image pixels |
|
Extract region of interest |
|
Automatic image trimming |
|
Scale an image |
|
Rotate an image |
|
Rotate a spherical image |
|
Image warping |
|
Affine warp of image |
|
Perspective warp |
|
Image warping |
|
Undistort image |
|
Convert image to a column view |
Multiview operations
Interactive display of stereo image pair |
|
Simple stereo matching |
|
Refine disparity from disparity space image |
|
Stereo block matching |
|
Stereo semi-global block matching |
|
Create rectification homographies |
Binary operators
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
|
Overloaded |
Unary operators
Overloaded unary |
|
Overloaded |
Image feature extraction
Whole image features
Image histogram |
|
Sum of all pixels |
|
Minimum value of all pixels |
|
Maximum value of all pixels |
|
Find non-zero pixel values as 2D coordinates |
Find non-zero pixel values as 1D indices |
|
|
Find local maxima in image |
|
Otsu threshold selection |
|
Mean value of all pixels |
|
Standard deviation of all pixels |
|
Variance of all pixels |
|
Median value of all pixels |
|
Display pixel value statistics |
Image moments |
|
Normalized central image moments |
|
Central image moments |
|
Image moments |
|
Hu image moment invariants |
Region features
Find and describe blobs in image |
|
Find MSER features in image |
|
Optical character recognition |
|
Find fiducial markers in image |
Line features
Canny edge detection |
|
Find Hough line features |
Point/corner features
Find SIFT features in image |
|
Find ORB features in image |
|
Find BRISK features in image |
|
Find AKAZE features in image |
|
Find Harris features in image |
|
Combination feature detector and descriptor |
Image i/o
Read image from file |
|
Display image |
|
Write image to file |
|
Get image EXIF metadata |
|
Display image with pixel values |
|
Convert stereo images to an anaglyph image |
|
Interactive display of stereo image pair |
Constant images
Create image with zero value pixels |
|
Create image with all pixels having same value |
|
Create a small image from text string |
|
Create image with random pixel values |
|
Create image containing grid of squares |
|
Create image containing grid of circles |
|
Create image of linear ramps |
|
Create image of sinusoidal intensity pattern |
Graphics
Draw line into image |
|
Draw circle into image |
|
Draw box into image |
Small example images
Create a small image from text string |
|
Print image pixels in compact format |
|
Display image with pixel values |