extractLBPFeatures
extractLBPFeatures
Extract local binary pattern (LBP) features
Syntax
-
features = extractLBPFeatures(I)
-
features = extractLBPFeatures(I,Name,Value)
Description
uses additional options specified by one or more features
= extractLBPFeatures(I
,Name,Value
)Name,Value
pair arguments.
Code Generation Support:
Supports code generation: Yes
Generates platform-dependent library: No
Supports MATLAB® Function block: Yes
Code Generation Support, Usage Notes, and Limitations
Examples
figure
imshow(rotatedBrickWall)
title(‘Rotated Bricks’)
figure
imshow(carpet)
title(‘Carpet’)
Extract LBP features from the images to encode their texture information.
lbpBricks1 = extractLBPFeatures(brickWall,'Upright',false); lbpBricks2 = extractLBPFeatures(rotatedBrickWall,'Upright',false); lbpCarpet = extractLBPFeatures(carpet,'Upright',false);
Gauge(估计) the similarity between the LBP features by computing the squared error between them.
brickVsBrick = (lbpBricks1 - lbpBricks2).^2; brickVsCarpet = (lbpBricks1 - lbpCarpet).^2;
Visualize the squared error to compare bricks versus bricks and bricks versus carpet. The squared error is smaller when images have similar texture.
figure bar([brickVsBrick; brickVsCarpet]','grouped') title('Squared Error of LBP Histograms') xlabel('LBP Histogram Bins') legend('Bricks vs Rotated Bricks','Bricks vs Carpet')
Input Arguments
Output Arguments
More About
References
[1] Ojala, T., M. Pietikainen, and T. Maenpaa. "Multiresolution Gray Scale and Rotation Invariant Texture Classification With Local Binary Patterns." IEEE Transactions on Pattern Analysis and Machine Intelligence. Vol. 24, Issue 7, July 2002, pp. 971-987.
See Also
detectBRISKFeatures
| detectFASTFeatures
| detectHarrisFeatures
| detectMinEigenFeatures
|detectMSERFeatures
| detectSURFFeatures
| extractFeatures
| extractHOGFeatures
| matchFeatures
|MSERRegions
| SURFPoints