【发布时间】:2012-10-19 00:34:42
【问题描述】:
我想平滑一条曲线,但不知道要遵循什么方法,图案存储在向量中。
class Point2D
{
public:
double x, y;
Point2D()
{
this->x=0;
this->y=0;
}
Point2D(double x, double y)
{
this->x = x;
this->y = y;
}
}
vector<Point2D> vec1;
vec1:
*
* *
. .
. .
. .
. .
. . .
.
平滑后的预期模式:
*
* *
. .
. .
. .
. .
. . .
.
【问题讨论】:
-
en.wikipedia.org/wiki/Smoothing,Savitzky-Golay 可能就是您要找的东西
-
很笼统的问题,很多方法都适合你的一般问题,比如你也可以采用贝塞尔曲线en.wikipedia.org/wiki/B%C3%A9zier_curve