我生成一个三次样条曲线,通过一组给定的数据点的获得三次样条公式: import matplotlib.pyplot as plt
import numpy as np
import scipy
x = np.array([1, 2, 4, 5]) # sort data points by increasing x value
y = np.array([2, 1, 4, 3])
ar
我正在做一些车道检测作为一个有趣的项目,我试图创建一个三次样条来表示车道。但是,当我使用scipy CubicSpline函数时,我得到了一些荒谬的大值。 这里是我的代码: from scipy import interpolate
from scipy.interpolate import CubicSpline
from scipy.interpolate import Interpola