[SciPy-User] Spline Fitting on Dense and Noisy Points
Jonathan Stickel
jjstickel at vcn.com
Fri Jul 22 21:49:46 EDT 2011
On 07/22/2011 04:29 PM, scipy-user-request at scipy.org wrote:
> On Thu, Jul 21, 2011 at 5:51 AM, Chong Yang<flyzzx at gmail.com> wrote:
>>
>> >> Hi,
>> >>
>> >> Recently I have been working with 1D curve fitting on dense GPS point
>> >> cloud representing road segments. For all I know, some roads may be highly
>> >> curved and their corresponding x value are not necessary monotonic order.
>> >>
>> >> I tried splrep. It works very well on simple arcs but fails to give
>> >> meaningful result on highly curved data - either because the polynomial
>> >> order 'k' is not sufficient to fit the data well enough or the curve is
>> >> vertically aligned. For now I get around vertical curves by flipping the
>> >> axes and doing splrep with (y, x), but maybe a better approach is possible.
>> >>
>> >> My guess is splprep. However I am not sure how to properly convert the
>> >> noisy data points into their parametric form. Does anyone have an idea on
>> >> this or faced a similar problem before? Thanks.
>> >>
I know I am replying to this thread a bit late, but you might also be
interested in smoothing by regularization:
http://packages.python.org/scikits.datasmooth/regularsmooth.html
Scattered data are OK. However, curves that are vertical or bend back
over themselves will present problems, as you have found with splines.
HTH,
Jonathan
More information about the SciPy-User
mailing list