필터 지우기
필터 지우기

Image texture analysis: extractLBPfeatures MATLAB function

조회 수: 4 (최근 30일)
Towfeeq Fairooz
Towfeeq Fairooz 2022년 8월 24일
답변: Udit06 2023년 9월 7일
Hi,
I implemented the localBinaryPattern code. Thanks to @Image Analyst, I was able to understand how they were derived.
Now, I am trying to understand the extractLBPfeatures function in MATLAB. It is troubling me a lot. This function produces a feature vector of size '1 by 59 single '. I understood, why the size is 59 but I am not able to understand how they were derived and how the LBP values turned into decimal values. Somewhere I read histogram normalized. But how exactly? Can anyone help me please.
The code is attached with a few extra lines to show where I am having trouble.
  댓글 수: 1
Towfeeq Fairooz
Towfeeq Fairooz 2022년 8월 24일
Thank you for the code. It really helped. I would really appreciate if your or anyone else can help me with this please.

댓글을 달려면 로그인하십시오.

답변 (1개)

Udit06
Udit06 2023년 9월 7일
Hi Towfeeq,
I understand that you want to know how the LBP features are extracted and how they are converted to decimal values. Consider the following figure:
A 3*3 matrix for LBP illustration
To find the LBP feature value corresponding to any centre pixel, you compare the centre pixel value with the value of its 8 neighbours. If the intensity of the centre pixel is less than or equal to its neighbour, we set the value to 1, otherwise we set it to 0.
Hence, for the above figure we do the following:
(82>68=1)(57>68=0)(90>68=1)(53>68=0)(92>68=1)(56>68=0)(99>68=1)(78>68=1)
Thus, the LBP code obtained in binary:
Once we obtain the binary code as shown above, we can simple apply binary to decimal conversion to get the decimal value.
(10101011)2=(171)10
The decimal value obtained above work as a feature for the pixels in the patch and the frequencies of these features in a patch forms a histogram.
You can refer to the following research paper to understand more about Local binary pattern.
I hope this helps.

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by