資源簡介
雙立方線性插值算法算法C++實現說明,根據維基百科介紹翻譯而來,值得學習參考
代碼片段和文件信息
//?Bicubic?interpolation.cpp?:?定義控制臺應用程序的入口點。
//
#include?“stdafx.h“
#include?
#include?
double?cubicInterpolate(double?p[4]?double?x)
{
return?p[1]?+?0.5?*?x*(p[2]?-?p[0]?+?x*(2.0*p[0]?-?5.0*p[1]?+?4.0*p[2]?-?p[3]?+?x*(3.0*(p[1]?-?p[2])?+?p[3]?-?p[0])));
}
double?bicubicInterpolate(double?p[4][4]?double?x?double?y)
{
double?arr[4];
arr[0]?=?cubicInterpolate(p[0]?y);
arr[1]?=?cubicInterpolate(p[1]?y);
arr[2]?=?cubicInterpolate(p[2]?y);
arr[3]?=?cubicInterpolate(p[3]?y);
return?cubicInterpolate(arr?x);
}
double?tricubicInterpolate(double?p[4][4][4]?double?x?double?y?double?z)
{
double?arr[4];
arr[0]?=?bicubicInterpolate(p[0]?y?z);
arr[1]?=?bicubicInterpolate(p[1]?y?z);
arr[2]?=?bicubicInterpolate(p[2]?y?z);
arr
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????372474??2017-06-09?14:03??Bicubic?interpolation學習總結.pdf
?????文件????????1780??2017-06-08?14:09??Bicubic?interpolation.cpp
- 上一篇:aes加解密算法C語言實現
- 下一篇:車牌定位系統VC++ 源程序
評論
共有 條評論