Texture Feature Extraction using Local Binary Pattern (MATLAB)

Опубликовано: 01 Октябрь 2024
на канале: Knowledge Amplifier
8,140
73

Prerequisite:
---------------------
Local Binary Pattern (Theory)
   • Local Binary Pattern (Theory)  
Here is one complete project where this feature is used----
Facial expression recognition based on Local Binary Patterns & SVM
   • Facial expression recognition based o...  
And if you are python user , then you can explore this function--
https://scikit-image.org/docs/dev/aut...
This is very important feature if you want to play with texture part (in ML usecases) of the image.

Code:
---------

clc
clear all
warning off
brickWall=imread('bricks.jpg');
rotatedBrickWall=imread('bricksRotated.jpg');
lbpBricks1=extractLBPFeatures(brickWall,'Upright',false);
lbpBricks2=extractLBPFeatures(rotatedBrickWall,'Upright',false);
brickVsBrick=(lbpBricks1-lbpBricks2).^2;
figure;
bar(brickVsBrick);
title('Rotation Independent');
grid on;

clc
clear all
warning off
brickWall=imread('bricks.jpg');
carpet=imread('carpet.jpg');
lbpBricks1=extractLBPFeatures(brickWall,'Upright',false);
lbpBricks2=extractLBPFeatures(carpet,'Upright',false);
brickVsBrick=(lbpBricks1-lbpBricks2).^2;
figure;
bar(brickVsBrick);
title('Rotation Independent');
grid on;

Learn Digital Image Processing using MATLAB:
   • Digital Image Processing using MATLAB  
Learn Data Science & Machine Learning using MATLAB:
   • Data Science & Machine Learning using...  

#DigitalImageProcessing #MATLAB #ComputerVision