Height of circular shape
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Kevin Holly
2022년 9월 30일
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")
추가 답변 (1개)
Image Analyst
2022년 9월 30일
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.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!