help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Curve Fitting and Plotting


From: Carlo de Falco
Subject: Re: Curve Fitting and Plotting
Date: Mon, 29 Sep 2008 12:39:42 +0100


On 29/set/08, at 09:46, Kearan Mc Pherson wrote:

HI

i am capturing two video streams of a moving cricket ball. one view from the side and the other from above. after image processing i obtain the two data.dat files. from here i want to do curve fitting in order to achieve the data points/coordinates of the moving ball in 3D. after this i want to plot the graph in 3D

Citing from wikipedia [1]

"In computer graphics, Catmull–Rom splines are frequently used to get smooth interpolated motion between key frames. For example, most camera path animations generated from discrete key-frames are handled using Catmull–Rom splines. They are popular mainly for being relatively easy to compute, guaranteeing that each key frame position will be hit exactly, and also guaranteeing that the tangents of the generated curve are continuous over multiple segments."

There is a catmullrom function in the "splines" pcakage on octave-forge:

>> pkg load splines
>> help catmullrom
 -- Function File: PP = catmullrom( X, F, V)
     Returns the piecewise polynomial form of the Catmull-Rom cubic
     spline interpolating F at the points X.  If the input V is
     supplied it will be interpreted as the values of the tangents at
     the extremals, if it is missing, the values will be computed from
     the data via one-sided finite difference formulas. See the
     wikipedia page for "Cubic Hermite spline" for a description of the
     algorithm.


     See also: ppval.

HTH,
c.

[1] http://en.wikipedia.org/wiki/Catmull-Rom_spline#Catmull.E2.80.93Rom_spline


reply via email to

[Prev in Thread] Current Thread [Next in Thread]