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.
1 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Vaibhav
2023-10-13
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!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!