I have a pretty noisy Nx2 data, where N is time stamp and the two columns are x, y position in a 2D plane. The curve could look like this (upper-left panel)
http://www.pnas.org/content/103/18/7192/F1.large.jpg
or, here is a much less noisy example
http://live.ece.utexas.edu/research/doves/DovesImages/sub1.jpg
I wonder what's the algorithm that will find several line segments that best fit this kind of crazy curve, and is there a matlab code available to do it? thanks
|
|
0
|
|
|
|
Reply
|
Po
|
1/22/2011 2:17:05 AM |
|
On Jan 21, 9:17=A0pm, "Po-He" <pohe...@gmail.com> wrote:
> I have a pretty noisy Nx2 data, where N is time stamp and the two columns=
are x, y position in a 2D plane. =A0The curve could look like this (upper-=
left panel)http://www.pnas.org/content/103/18/7192/F1.large.jpg
> or, here is a much less noisy examplehttp://live.ece.utexas.edu/research/=
doves/DovesImages/sub1.jpg
>
> I wonder what's the algorithm that will find several line segments that b=
est fit this kind of crazy curve, and is there a matlab code available to d=
o it? =A0thanks
---------------------------------------------------------------------------=
------
Looks like you already have a curve - the blue line. Do you want to
fit a simpler, less wiggly curve? Let's say that you could do that.
Then what? What are you *really* after such that you think you need a
fitted curve? What will a fitted curve do for you, assuming you had
one? In other words, what's the larger picture - the context - here?
Can you share that, in case there's a way to get that without doing
some kind of curve fitting?
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
1/22/2011 5:13:05 AM
|
|
You might be interested in Douglas-Peucker line simplification algorithm. It is *not* a fit algorithm, just a method of selecting a subset of vertexes in the original curve such that the piecewise linear curve is well approximate the original data.
There are few such implementations on FEX.
Bruno
|
|
0
|
|
|
|
Reply
|
Bruno
|
1/22/2011 8:26:04 AM
|
|
Thanks for the reply. In the end, I'd like to know "when" and "how much" the line change its direction. Therefore, a curvy turn is hard to decide the exact angle and the timing. therefore, I'd like to fit these curves with a few straight line. therefore, it's easier to calculate the angular change and the timming of direction change. thank you
pohe
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <6e9e527d-d472-4d34-8646-98c94b51170d@c39g2000yqi.googlegroups.com>...
> On Jan 21, 9:17 pm, "Po-He" <pohe...@gmail.com> wrote:
> > I have a pretty noisy Nx2 data, where N is time stamp and the two columns are x, y position in a 2D plane. The curve could look like this (upper-left panel)http://www.pnas.org/content/103/18/7192/F1.large.jpg
> > or, here is a much less noisy examplehttp://live.ece.utexas.edu/research/doves/DovesImages/sub1.jpg
> >
> > I wonder what's the algorithm that will find several line segments that best fit this kind of crazy curve, and is there a matlab code available to do it? thanks
>
> ---------------------------------------------------------------------------------
> Looks like you already have a curve - the blue line. Do you want to
> fit a simpler, less wiggly curve? Let's say that you could do that.
> Then what? What are you *really* after such that you think you need a
> fitted curve? What will a fitted curve do for you, assuming you had
> one? In other words, what's the larger picture - the context - here?
> Can you share that, in case there's a way to get that without doing
> some kind of curve fitting?
|
|
0
|
|
|
|
Reply
|
Po
|
1/22/2011 9:23:03 PM
|
|
cool, that's exactly the thing I was looking for. thanks for the help!!
pohe
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ihe4as$sjq$1@fred.mathworks.com>...
> You might be interested in Douglas-Peucker line simplification algorithm. It is *not* a fit algorithm, just a method of selecting a subset of vertexes in the original curve such that the piecewise linear curve is well approximate the original data.
>
> There are few such implementations on FEX.
>
> Bruno
|
|
0
|
|
|
|
Reply
|
Po
|
1/22/2011 9:37:03 PM
|
|
On Jan 22, 4:23=A0pm, "Po-He" <pohe...@gmail.com> wrote:
> Thanks for the reply. =A0In the end, I'd like to know "when" and "how muc=
h" the line change its direction. =A0Therefore, a curvy turn is hard to dec=
ide the exact angle and the timing. =A0therefore, I'd like to fit these cur=
ves with a few straight line. =A0therefore, it's easier to calculate the an=
gular change and the timming of direction change. =A0thank you
>
> pohe
-------------------------------------------------------------------------
pohe:
Maybe you should look at the fractal dimension of the curve. That
should be a good metric for characterizing how tortuous the curve is
and how completely it fills the plane.
ImageAnalyst
|
|
0
|
|
|
|
Reply
|
ImageAnalyst
|
1/22/2011 9:38:10 PM
|
|
Thanks for the suggestion. I'll look into that.
pohe
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <5cf5be2b-27d4-450a-946a-9f6121f59953@k42g2000yqa.googlegroups.com>...
> On Jan 22, 4:23 pm, "Po-He" <pohe...@gmail.com> wrote:
> > Thanks for the reply. In the end, I'd like to know "when" and "how much" the line change its direction. Therefore, a curvy turn is hard to decide the exact angle and the timing. therefore, I'd like to fit these curves with a few straight line. therefore, it's easier to calculate the angular change and the timming of direction change. thank you
> >
> > pohe
> -------------------------------------------------------------------------
> pohe:
> Maybe you should look at the fractal dimension of the curve. That
> should be a good metric for characterizing how tortuous the curve is
> and how completely it fills the plane.
> ImageAnalyst
|
|
0
|
|
|
|
Reply
|
Po
|
1/25/2011 5:21:03 AM
|
|
|
6 Replies
742 Views
(page loaded in 0.157 seconds)
Similiar Articles: how to fit a curve with piecewise line segments - comp.soft-sys ...I have a pretty noisy Nx2 data, where N is time stamp and the two columns are x, y position in a 2D plane. The curve could look like this (upper-left... Turning experimental data into a piecewise function - comp.soft ...how to fit a curve with piecewise line segments - comp.soft-sys ... Turning experimental data into a piecewise function - comp.soft ..... for a tool that can fit a curve ... Convert a line to a spline? - comp.cad.solidworksYeah, kind of lame, you have to split the single segment arc or line. RMB, "Split Curve" ... ... and sometimes you can't fit a spline at all "Due to geometric ... How to fit Lorentzian curve in Matlab - comp.dsphow to fit a curve with piecewise line segments - comp.soft-sys ... How to fit Lorentzian curve in Matlab - comp.dsp how to fit a curve with piecewise line segments - comp ... piecewise regression - comp.soft-sys.matlabhow to fit a curve with piecewise line segments - comp.soft-sys ... SigmaPlot: Piecewise Nonlinear Regression... animation how the nonlinear curve fitter varies the line ... arc segment points? - comp.text.pdfOr are there any particular points that the arc itself is known to definitely pass ... Curve Fit to Data ... doesn't work, try drawing simple lines ... arc segment points ... Interpreting cubic spline coefficients and breaks - comp.soft-sys ...how to fit a curve with piecewise line segments - comp.soft-sys ... Interpreting cubic spline coefficients and breaks - comp.soft-sys ... how to fit a curve with piecewise ... Power law curve fit through a specific point - comp.soft-sys ...how to fit a curve with piecewise line segments - comp.soft-sys ... However if I draw a 2d line an make that into a composite curve it will ... point will > stick to the ... Curve fit to 3D data - comp.soft-sys.matlabhow to fit a curve with piecewise line segments - comp.soft-sys ... Given k, I have to divide the X area into k segments ... no permutation) Then for each subset I fit a ... Sine Curve Fit to Data - comp.soft-sys.matlabhow to fit a curve with piecewise line segments - comp.soft-sys ..... curve in Matlab - comp.dsp... provide more info, possibly a very MINIMAL set of code (try to keep ... how to fit a curve with piecewise line segments - comp.soft-sys ...I have a pretty noisy Nx2 data, where N is time stamp and the two columns are x, y position in a 2D plane. The curve could look like this (upper-left... SigmaPlot: Piecewise Nonlinear Regression... animation how the nonlinear curve fitter varies the line end point heights and inter-segment times to find the best fit line. Download the file piecewise_curve_fitting ... 7/26/2012 3:12:06 AM
|