当前位置:网站首页>[texture feature extraction] LBP image texture feature extraction based on MATLAB local binary mode [including Matlab source code 1931]

[texture feature extraction] LBP image texture feature extraction based on MATLAB local binary mode [including Matlab source code 1931]

2022-07-07 11:46:00 Poseidon light

One 、 How to get the code

How to get the code 1:
The complete code has been uploaded to my resources :【 Texture feature extraction 】 be based on matlab Local binary mode LBP Image texture feature extraction 【 contain Matlab Source code 1931 period 】

How to get the code 2:
By subscribing to Ziji Shenguang blog Paid column , With proof of payment , Private Blogger , This code is available .

remarks :
Subscribe to Ziji Shenguang blog Paid column , Free access to 1 Copy code ( The period of validity From the Subscription Date , Valid for three days );

Two 、 Local binary mode LBP Introduction to image texture feature extraction

1 Local binary mode
LBP It is an algorithm used to describe the local texture features of an image , It has remarkable advantages such as rotation invariance and gray invariance . The original LBP Is in 3×3 In the window of , Take the pixel value of the central pixel as the threshold , The neighborhood 8 Compare the value of pixels with the threshold , If the pixel value of the neighborhood point is greater than the central pixel , Remember as 1, Otherwise the record for 0, Then follow the specified coding direction , Give different weights to different neighborhood points , Convert a binary sequence into an unsigned decimal number , And use this value as the LBP The eigenvalue , The process is shown in the figure 1 Shown .Ojala Originally proposed LBP The operator has the disadvantage of being unable to extract large-scale structure texture , To solve this problem ,Ojala Make improvements , take 3×3 Neighborhood extended to any neighborhood , And use circular neighborhood instead of square neighborhood , Improved LBP The operator is allowed to have a radius of R There are any number of pixels in the circular neighborhood of . Sum up , For an image S Any pixel on S(i,j), Will be with S(i,j) Centered , The radius is R Contains P The region of sampling points is called its local neighborhood (P,R), Then pixels S(i,j) Of LBP The value can be defined as :
 Insert picture description here
In style :gc Represents the center pixel S(i,j) Gray value ,gp Represents the gray value of the sampling point . Obtained by this method LBP Value has linear grayscale invariance , But when the image rotates , Corresponding LBP The value will also change . In order to solve the problem of rotation invariance ,Ojala etc. [11] Based on rotation invariance LBP Algorithm . For the same central point , Binary coding with different neighborhood pixels as the starting point , Thus, a series of binary codes are obtained , Select the smallest value as the LBP value .
 Insert picture description here
chart 1 Local binary pattern extraction process

3、 ... and 、 Partial source code

clc;close all;clear;

img=imread('lena512color.tiff');
img=imresize(img,[256,256]);
figure, imshow(img);

Four 、 Running results

 Insert picture description here
 Insert picture description here

5、 ... and 、matlab Edition and references

1 matlab edition
2014a

2 reference
[1] Cai Limei .MATLAB The image processing —— theory 、 Algorithm and example analysis [M]. tsinghua university press ,2020.
[2] Yang Dan , Zhao Haibin , Long Zhe .MATLAB Detailed explanation of image processing examples [M]. tsinghua university press ,2013.
[3] Zhou pin .MATLAB Image processing and graphical user interface design [M]. tsinghua university press ,2013.
[4] Li Song , Cai hang , Yu Meng . Texture feature extraction method based on adaptive local binary pattern [J]. Computer applications and software . 2019,36(09)

3 remarks
This part of the introduction is taken from the Internet , For reference only , If infringement , Contact deletion

原网站

版权声明
本文为[Poseidon light]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207070945519204.html