Length of a thin curved object in an image

Technical Source
1 min readFeb 19, 2022

--

I’d like to use image analysis to calculate the length of a thread.

Because the thread is not entirely straight, I can’t just use regionprops, so I think the best option is to use the function bwdistgeodesic

In the bwdistgeodesic function, what is it expecting for the variable “mask”? How could I use image analysis to generate said mask? I’ve looked into using regionprops ‘Extrema’ property, but since I’m not sure what the “mask” variable is in bwdistgeodesic, I’m not sure how I would use the x,y dimensions from ‘Extrema’ in a mask.

NOTE:-

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Because the thread is not entirely straight, I can’t just use regionprops,

Why not? Couldn’t you just do

S=regionprops(  bwareafilt(BW,1,'smallest') ,'Perimeter');    length=S.Perimeter/2

--

--

Technical Source
Technical Source

Written by Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

No responses yet