如何确保样条曲线通过积分 [英] How to insure spline goes through points

查看:198
本文介绍了如何确保样条曲线通过积分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用样条来计算轮廓。问题是,我似乎不知道如何使样条曲线经过某一点。我正在使用带有UnivariateSpline方法的scipy.interpolate库。

I am trying to make a spline to compute the derivative of a contour of a part of an image. The catch is that I don't seem to know how to make the spline go through a certain point. I am using the scipy.interpolate library with the UnivariateSpline method.

推荐答案

对于 UnivariateSpline 使用 s = 0 强制插值: UnivariateSpline(x,y,s = 0)。或者使用 InterpolatedUnivariateSpline ,这完全相同。

For UnivariateSpline use s=0 to force interpolation: UnivariateSpline(x, y, s=0). Or use InterpolatedUnivariateSpline, which is exactly equivalent.

这篇关于如何确保样条曲线通过积分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆