Image analysis of surface texture

The attached image shows different surface pattern types. I've labelled tiger stripes as "1", leopard spots as "3" and amorphous noise as 2. I want to find filters that will enable me to automatically plot a heat map of the type attached, which is drawn by me by hand.
I have experimented with imgaborfilt, imgaussfilt and fibermetric. These can provide very localised metrics of surface pattern. But I really want to get a more coarse mapping of the type hand drawn by me. I realise that the borders will not be sharp like I've drawn. Any thoughts on how to do this?
Here's a code snippet that I've experimented with. It helps to identify patterns but I haven't been able to produce a map of texture types.
Ridge Detection & Metrics
%% =======================
bestThickness = 7;
bestSensitivity = 10;
ridgePercentile = 85;
densitySigma = 15; % size of area-based smoothing (~30–50 px)
gaborWavelength = 8; % matches center-to-center spacing
orientations = 0:10:170;
% 7a. Ridge (Hessian)
feat = fibermetric(img_adj, bestThickness, 'StructureSensitivity', bestSensitivity);
feat = mat2gray(feat);
% 7b. Ridge threshold
ridgeMask = feat > prctile(feat(binaryMask & specimenMask), ridgePercentile);
% 7c. Spatial density map
area_density = imgaussfilt(double(ridgeMask), densitySigma);
area_density = mat2gray(area_density);
% 7d. Gabor anisotropy
g = gabor(gaborWavelength, orientations);
gMag = imgaborfilt(img_adj, g);
aniso = std(gMag,0,3) ./ (mean(gMag,3)+eps);
aniso = mat2gray(aniso);
% 7e. Combined metric
combined_metric = area_density .* aniso;
combined_metric = mat2gray(combined_metric);

답변 (0개)

제품

릴리스

R2023b

태그

질문:

2026년 2월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by