Filter löschen
Filter löschen

Compute texture for small parts of the image

1 Ansicht (letzte 30 Tage)
MatlabUser
MatlabUser am 21 Dez. 2020
Kommentiert: MatlabUser am 23 Dez. 2020
Hello,
I would like to ask about how to computing the texture of a part of the image efficiently, i.e., I applied superpixel segmentation (SLIC) on an image to get smaller homogenous regions, how to compute the texture for each superpixel efficiently (e.g., fast execution)?
any help will be appreciated,
best regards,

Akzeptierte Antwort

Image Analyst
Image Analyst am 21 Dez. 2020
Depends on how you define texture. One way is to use the labeled image from superpixels() to get the mean intensity of the StDev image
windowSize = 9; % Whatever...
stDevImage = stdfilt(grayImage, ones(windowSize)); % A local standard deviation.
% Get the standard deviation averaged over each superpixel region.
props = regionprops(labeledImage, stDevImage, 'MeanIntensity');
for k = 1 : length(props)
fprintf('The mean standard deviation in superpixel #%d of %d is %f.\n', ...
k, length(props), props(k).MeanIntensity)
end
  5 Kommentare
Image Analyst
Image Analyst am 23 Dez. 2020
No, I don't believe so, unless the help says superpizel() returns a texture. It returns a labeled image which you can then use with a texture image and regionprops() to determine texture in each superpixel region.
MatlabUser
MatlabUser am 23 Dez. 2020
Got it, thank you so much for explaining,

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by