Azzera filtri
Azzera filtri

How to get texture index from the local binary pattern histogram? I want to get a single value for an image and compare with multiple images.

3 visualizzazioni (ultimi 30 giorni)
I have tried 'extractLBPFeatures' function. However, it is providing 1x59 vector as output. I want to get a single value for an image as that can be easy to compare with the other images.
Can I use the standard deviation of the lbp histogram as a measure a texture?

Risposte (1)

Vaibhav
Vaibhav il 13 Ott 2023
Hi Nabanita,
I understand that you are looking for a method to compare texture indices among images.
The squared error between LBP features serves as a metric to gauge texture similarity, with a smaller value suggesting a closer resemblance between images.
Suppose "lbp1" contains the LBP features for image 1, and "lbp2" contains the LBP features for image 2, the squared error can be computed as follows:
Img1vsImg2 = (lbp1 - lbp2).^2
The code snippet below can be used to visualize the difference using a bar graph:
Img1vsImg2 = (lbp1 - lbp2).^2
figure
bar(Img1vsImg2)
title('Squared Error of LBP Histograms')
xlabel('LBP Histogram Bins')
legend('Img1 vs Img2')
While considering a single extracted LBP value, options like taking the mean or median can also be explored. However, using squared error provides a clearer indication of texture differences among the images.
You can refer to the following MathWorks documentation to know more about "extractLBPFeatures" and squared error calculation:
Hope this helps!

Prodotti


Release

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by