how to measure the length of curve with Matlab?
how to measure the length of curve with Matlab?
(OP)
Hi,
I have a picture with a curved body. Now I need to get the length of some curves on the body. How to do that with Matlab? One thing to do is to determine the mask of the curve and thus the coordinate on this curve. Anybody knows how to do it?
Thanks,
mapi
I have a picture with a curved body. Now I need to get the length of some curves on the body. How to do that with Matlab? One thing to do is to determine the mask of the curve and thus the coordinate on this curve. Anybody knows how to do it?
Thanks,
mapi





RE: how to measure the length of curve with Matlab?
RE: how to measure the length of curve with Matlab?
But CSCVN can work only if I have the coordinates on the curve I want. Now I have to first find the coordinate on the curve. Now if I have a picture, first we need to find/determine the curve, and then find the coordinates on these curve.
RE: how to measure the length of curve with Matlab?
Then, you can simply brute force the arc length using pairwise segment lengths.
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: how to measure the length of curve with Matlab?
Suppose that I have got the coordinates of points along the curve from one end to the other. And I use spline to fit the coordinate data. So now I need to obtain the length of the spline curve. How to do that?
Mapi
----------
Matlab code:
figure(2)
x1=[1 0.7 0.4 0.7 1.1 1.5 1.9 2.2 2.1 1.9];
y1=[1 1.15 1.4 1.6 1.7 1.8 1.75 1.5 1.3 1.1];
plot(x1,y1,'o')
figure(3)
xy(1,:)=x1;
xy(2,:)=y1;
fnplt(cscvn(xy))
RE: how to measure the length of curve with Matlab?
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: how to measure the length of curve with Matlab?
In this problem, I also need to break the curve into three parts and calculate their lengths individually. The reason is that y-x curve is not one-to-one curve (one x can have two y values and vice versa).
Mapi
RE: how to measure the length of curve with Matlab?
TTFN
FAQ731-376: Eng-Tips.com Forum Policies