How can i calculate the ( area ,... ) automatic for gray scale image using Matlab code ??
2 views (last 30 days)
Show older comments
How can i calculate the
( (i) area , (ii) centriod , (iii) bounding box , (iv) major axis , (v) minor axis , (vi) eccentricity , (vii) orientation ,(viii) convex area and (ix) extrema ) automatic
for gray scale galaxy image like that using Matlab code ??
to make feature extraction for galaxy images ?
Note >>this image after makeing galaxy oriantation horizontal and cropping it >>

0 Comments
Answers (1)
Daniel Vieira
on 21 Feb 2020
you don't calculate areas in grayscale directly, you need to binarize to indicate which pixels count in the area and which dont.
For that:
bw=imbinarize(I);
R=struct2table(regionprops(bw,{'Area','Centroid','BoundingBox',...
'MajoraxisLength','MinoraxisLength','Eccentricity',...
'Orientation','ConvexArea','Extrema'}))
Note that imbinarize hardly ever yields good results at the default properties, without exploring parameters.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!