Height of circular shape
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Walaa
am 30 Sep. 2022
Kommentiert: Walaa
am 30 Sep. 2022
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1140705/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1140710/image.jpeg)
I have these two images and I want a code that can be used to determine the height of these nearly circular region can anyone help?
0 Kommentare
Akzeptierte Antwort
Kevin Holly
am 30 Sep. 2022
You could use regionprops to find the major axis length. Or did you need the length of the object in the y-direction? What do you mean by height?
Img = imread('segemented cup 1.jpg');
imshow(Img)
size(Img)
rp = regionprops(imbinarize(Img),"MajorAxisLength")
Weitere Antworten (1)
Image Analyst
am 30 Sep. 2022
props = regionprops(mask, 'BoundingBox');
bb = vertcat(props.BoundingBox); % In case there is more than one blob in the image.
heights = bb(:, 4); % Height along the y direction.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!