how to calculate the shape factor?

35 次查看(过去 30 天)
Dear All,
Anyone can help me how to calculate the shape factor for each blob on my image as attached.
  2 个评论
Image Analyst
Image Analyst 2023-10-29
What is your definition of shape factor?
mohd akmal masud
mohd akmal masud 2023-10-30
What I understand is, the shape factor is we want to know the shape of volume that have we segment.
this is descrition about the shape factor.
Shape factors are dimensionless quantities used in image analysis and microscopy that numerically describe the shape of a particle, independent of its size. Shape factors are calculated from measured dimensions, such as diameter, chord lengths, area, perimeter, centroid, moments, etc. The dimensions of the particles are usually measured from two-dimensional cross-sections or projections, as in a microscope field, but shape factors also apply to three-dimensional objects. The particles could be the grains in a metallurgical or ceramic microstructure, or the microorganisms in a culture, for example. The dimensionless quantities often represent the degree of deviation from an ideal shape, such as a circle, sphere or equilateral polyhedron.[1] Shape factors are often normalized, that is, the value ranges from zero to one. A shape factor equal to one usually represents an ideal case or maximum symmetry, such as a circle, sphere, square or cube.
the common formula is below

请先登录,再进行评论。

回答(1 个)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023-10-30
Is this what you are trying to calculate?
% Read Image
IMG = imread('IMAGE_Blob.png');
% Convert from RGB to gray scale
IMG_gray = rgb2gray(IMG);
% AREA
AREA = bwarea(IMG_gray)
AREA = 326.5000
% Display the minimum Feret properties of the object.
[OUT,LM] = bwferet(rgb2gray(IMG),'MinFeretProperties');
OUT.MinDiameter(1)
ans = 21.7030
OUT.MinAngle(1)
ans = 105.9454
OUT.MinCoordinates{1}
ans = 2×2
181.5000 156.5000 187.4623 135.6321
BW = imfill(rgb2gray(IMG),'holes');
CC = bwconncomp(BW);
[out,LM] = bwferet(CC,'MaxFeretProperties');
maxLabel = max(LM(:));
h = imshow(BW);
axis = h.Parent;
for labelvalues = 1:maxLabel
xmax = [out.MaxCoordinates{labelvalues}(1,1) out.MaxCoordinates{labelvalues}(2,1)];
ymax = [out.MaxCoordinates{labelvalues}(1,2) out.MaxCoordinates{labelvalues}(2,2)];
imdistline(axis,xmax,ymax);
end
title(axis,'Maximum Feret Diameter of Objects');
colorbar('Ticks',1:maxLabel)
  3 个评论
mohd akmal masud
mohd akmal masud 2023-10-30
I think this is not calculate the shape factor. it just calculate the diameter segmentation itself.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Biomedical Imaging 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by