How to measure distance between two streak lines around a body with image processing
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1339379/image.png)
2 Commenti
Image Analyst
il 29 Mar 2023
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?
Risposte (1)
Moksh
il 22 Ago 2023
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1462302/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1462307/image.png)
Please use the following documentation for a better understanding of the "imdistline" function.
Thank you
0 Commenti
Vedere anche
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!