ImageDev

Classification

Algorithms partioning an image into a label image by assigning its pixels to a class.
Pixel classification techniques allow the segmentation of an image into different regions relative to a set of attributes.

The attributes used by the classifier to identify the regions can be: Pixel classification methods can be split into two categories:

Unsupervised classification

Unsupervised classification methods classify image pixels without performing a training step with labeled data.

The unsupervised classification methods proposed by ImageDev generate a label image by partioning the input image in a predefined number of classes. Each label of the output image identifies a region having common intensity characteristics.

Two algorithms are available for performing unsupervised intensity classification:

Supervised texture classification

The supervised texture classification tools aim to perform an image segmentation based on local textural features when classical intensity based segmentation tools are not appropriate.

A texture classification workflow is composed of three steps: During the training step, all selected features are computed on a local neighborhood of pixels belonging to labels defined in a training image. A subset of discriminant features is retained and only these features are computed during the segmentation step.

(a)
(a)
(b)
(b)
(c)
(c)
Figure 1. (a) Training image overlaying a grayscale synthetic input image, (b) tentative of a 4 phases segmentation by gray level k-means classification, (c) segmentation by texture classification

Texture features

Two categories of textural feature descriptors are available:

Co-occurrence based features

A co-occurrence matrix expresses the distribution of pairs of pixel values separated by a given offset vector over an image region.

From co-occurrence matrices, one can derive statistics called Haralick's indicators that are commonly used for describing texture features.
More information about co-occurrence matrices and Haralick's textural features is available in the Cooccurrence2d algorithm documentation.

Data Ranges: The minimum and maximum values of the co-occurrence matrix are extracted from the minimum and maximum intensities of the first image used during the training step. Consequently, for enriching a classification model or segmenting several images with a same model, all images must have a data range consistent with the first training image. If not, the data must be normalized before processing; for example, with the RescaleIntensity or MatchContrast algorithm. A quantization of this range is realized automatically to reduce the memory footprint and computational costs.

Texton: This term refers to a basic texture element whose size and shape can define a set of vectors used for determining a co-occurrence matrix. A texton expresses the orientation and spacing of a repeated texture pattern (for example, stripes).

Two groups of co-occurrence based features are available. Basically the 13 Haralick's texture features are computed for each co-occurrence vector defined by the input texton.
Then the features can be applied in two ways: Note that using directional features generally provides a better result for anisotropic material (fibers), but the acquisition process must ensure a constant orientation. If not, a rotation should be applied as preprocessing to make the input image match with the training image orientation.

Intensity statistics based features

This category mostly contains features that are described in the Intensity and Histogram categories of the measurement list of individual analysis.
Three groups of intensity based statistics are available: The second group first computes a local histogram from which the features are extracted. The histogram minimum and maximum values are extracted from the minimum and maximum intensities of the first image used during the training step. All intensity statistics based features are rotation invariant. Consequently, the extracted value does not change when an arbitrary rotation is applied to the input image.

The first group relies on a fast implementation of the first order statistics computation. These features are not extracted from the local histogram, as part of the second group, in order to reduce the computation time.

Classification model creation

The texture model creation step consists of initializing a classification object by defining: The radius defines the disk or sphere window centered on a target pixel where the textural features are computed. This parameter has a strong influence on the segmentation result and leads to indeterminate areas at the texture boundaries.
The radius of analysis must be sufficiently large to model the entire texture. If the radius is too small, the algorithms will fail to classify complex textures. If the value is too large, the algorithm will create strong artifacts at the region borders and will be computationally inefficient. Therefore, a radius range is evaluated by the training step in order to simplify the tuning of the algorithm. This range is defined by a minimum, a maximum, and a step.

Texture training

This step consists of enriching a classification model by learning on a gray level image that has been labeled. Each label value of the training image identifies a class. Consequently, the same label value can be used in different connected components.

Feature extraction

For each labeled pixel of the training image, the algorithm extracts all the texture features belonging to the groups selected in the texture model. These newly extracted features increase the training-set and enrich the model.

Training border management: Note that all the pixels within the analysis radius of a labeled pixel will be considered for the feature extraction, even if they do not have the same label value than the considered pixel. It means that the number of pixels used for training is greater than the number of the labeled pixels.

Feature Selection

Once the features are computed on the training image, the classification model is updated and all the features that are not enough discriminating or too much correlated with another feature are rejected.

For a given set of features, a separation power expressed in percent is computed. This value quantifies how this set of features discriminates the learned classes. A measure is rejected if its contribution does not increase the separation power of the classification model enough.

The minSeparationPercentage parameter is a rate, in percent, that indicates the minimum relative increase of the separation power brought by a feature to select it. A higher value will tend to reduce the number of features actually used for classification and thus to lower the computation time of the classification.

Classification application

This step classifies all the pixels of an image in accordance with a texture model and generates a new label image where each label corresponds to a texture class.

For every pixel of the input image, the algorithm extracts the texture features selected in the classification model and computes their Mahalanobis distance to each class center of the model.

Finally, the classification step outputs: Combining the uncertainty map and the classified label image can be useful to reject mis-classified pixels and apply post-processing in order to improve the classification result.