You are here: Start » AVL.NET » Function Reference » Computer Vision » Texture Analysis » AVL.LinearBinaryPattern

AVL.LinearBinaryPattern

Creates histogram and map of Linear Binary Patterns (with radius 1 and size 8) of provided image.

Namespace:AvlNet
Assembly:AVL.NET.dll

Syntax

C++
C#
 
public static void LinearBinaryPattern
(
	AvlNet.Image inImage,
	NullableRef<AvlNet.Region> inRoi,
	AvlNet.LinearBinaryPatternType inPatternType,
	AvlNet.Histogram outPatternHistogram,
	AvlNet.Image outTextureImage
)

Parameters

Name Type Range Default Description
inImageAvlNet.ImageMono-channel image.
inRoiAvlNet.NullableRef<AvlNet.Region>Region of Interest. Default value: atl::NIL.
inPatternTypeAvlNet.LinearBinaryPatternTypeType of LBP to produce.
outPatternHistogramAvlNet.HistogramHistogram of LBP codes found in inImage.
outTextureImageAvlNet.ImageLBP map of input image.

Description

The LPB histogram (treated as a 256 dimensional feature vector) is a texture visual descriptor useful for texture classification. It is obtained by calculating a pattern for each pixel, and then producing a histogram from all these numbers. The pattern is a 8-bit array (coded in uint8) with results of comparisons of the center pixel value to all its neighbours.
Following types of LPB can be calculated:

  • Plain
  • RotationInvariant - all patterns (and thus histogram bins) that can be obtained by binary shifts from each other are merged into one
  • Uniform - non-uniform patterns (these containing more than two 01 or 10 transitions - e.g. 00110010 has 4) are merged into one bin
  • UniformRotationInvariant - apply both RotationInvariant and Uniform operations

More information can be found at https://en.wikipedia.org/wiki/Local_binary_patterns

Examples

Source image with following ROIs defined:
top-left fur (reference), top-right fur, and bottom nose.

LBP histograms calculated for top-left and top-right regions (different parts of fur)
The mean-squared distance between these feature vectors (histograms) is 264,6.

LBP histograms calculated for top-left region and bottom region (nose)
The mean-squared distance between these feature vectors is 1472,3.

Errors

List of possible exceptions:

Error type Description
DomainError Not supported inImage pixel format in LinearBinaryPattern. Supported formats: 1xUInt8.

Function Overrides

See also