多项式最小二乘的图像曲线拟合 [英] Polynomial Least Squares for Image Curve Fitting
问题描述
我想用曲线多项像素的图像中,所以我可以做关于它的形状进一步处理。有谁知道如何实现C / + $ P $最小二乘法pferably使用以下参数:一个x数组,数组唉,和一个答案阵列(答案数组的长度应该告诉多少系数需计算)?
I am trying to fit a curve to a number of pixels in an image so I can do further processing regarding it's shape. Does anyone know how to implement a least squares method in C/++ preferably using the following parameters: an x array, a y array, and an answers array (the length of the answers array should tell how many coefficients need to be calculated)?
推荐答案
如果这是不是有些运动在执行这一自己,我会建议你使用类似的 GNU GSL 。看看他们的名字开始与 gsl_multifit _
,例如见的功能第二个例子这里。
If this is not some exercise in implementing this yourself, I would suggest you use a ready-made library like GNU gsl. Have a look at the functions whose names start with gsl_multifit_
, see e.g. the second example here.
这篇关于多项式最小二乘的图像曲线拟合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!