How to measure distance between two streak lines around a body with image processing

조회 수: 3 (최근 30일)
Hi. I need to measure the distance between the streak lines around the body (with varyng theta, it being the angle of curvature of the circle). I have created a mask with the image segmentor and I got some data with regionprops but I do not understand what the output is. How could I solve this problem?
  댓글 수: 2
Image Analyst
Image Analyst 2023년 3월 29일
Easy enough around the bottom (using thresholding) but what do you want to do when the stripes all merge together near the middle and top?
laura callegari
laura callegari 2023년 3월 29일
I was thinking of using only the right side and just the distance between the first two lines. I don't need to go that much high up.

댓글을 달려면 로그인하십시오.

답변 (1개)

Moksh
Moksh 2023년 8월 22일
Hi Laura,
As per my understanding you are trying to calculate the distance between the first 2 lines on the right of the sphere.
You can use the “imdistline” function of MATLAB, which gives an interactive tool to measure the distance between any 2 points on the image. This gives you complete control to measure the distance between the lines in any region of interest.
This can be implemented as follows:
% Assuming the image shown above is saved as "image.png"
imshow("image.png");
% Add the imdistline object on the figure (Donot close the above figure)
h = imdistline;
This will insert an interactive tool on the figure as demonstrated below, which can be adjusted to show any 2D distance.
Please use the following documentation for a better understanding of the "imdistline" function.
Thank you

카테고리

Help CenterFile Exchange에서 Build Interactive Tools에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by