matlab code for entropy based local binary pattern

1 visualización (últimos 30 días)
Annie micheal
Annie micheal el 5 de Ag. de 2019
Respondida: TED MOSBY el 27 de Mzo. de 2025
can anyone send me the link for entropy based local binary pattern(ELBP) .. thanks in advance
  1 comentario
Imran Riaz
Imran Riaz el 10 de Mayo de 2024
You found the code for ELBP? If yes plz share with me also.

Iniciar sesión para comentar.

Respuestas (1)

TED MOSBY
TED MOSBY el 27 de Mzo. de 2025
Hi Annie,
To get started you can follow the below steps:
  • Preprocess your image by converting to grayscale and then perforn normalization.
  • Use MATLAB’s built-in 'entropyfilt' function to compute the entropy for each pixel within a local window (of a specified size). This filter computes the entropy within a neighborhood around each pixel.
  • After computing the entropy, normalize the result to the range [0,1]. This standardization helps when comparing the center pixel’s entropy with that of its neighbors.
  • For every pixel (except for the borders, to avoid boundary issues), sample the neighbor pixels in a circular pattern around the center pixel. The number of neighbors and the radius of the circle can be adjusted.
  • Since neighbor coordinates may not fall exactly on pixel locations, bilinear interpolation ('interp2') can be used to estimate the entropy value at these points.
  • For each neighbor, if the neighbor’s entropy is greater than or equal to the center pixel’s entropy, assign a binary value of 1; otherwise, it is 0. This forms a binary pattern for each pixel.
  • The binary pattern can be converted into a decimal number. This number represents the LBP code for that pixel.
  • Then a histogram can be created by counting the frequency of each LBP code over the valid (non-border) region of the image.
  • Finally, you can calculate the entropy of the LBP histogram. This overall histogram entropy will serve as a global texture descriptor for the image.
Here is the documentation link for 'entropyfilt' :
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by