how to create 2D polynomial regression?

26 ビュー (過去 30 日間)
chien-feng Huang
chien-feng Huang 2015 年 12 月 30 日
コメント済み: chien-feng Huang 2016 年 1 月 5 日
hi I have a 22x34 image. how to create a function just like ax^2+by^2+cxy+dx+ey+f to fit this image

採用された回答

dpb
dpb 2015 年 12 月 30 日
If have CurveFitting Toolbox,
sf = fit([x, y], z, 'poly22'); % doc fit for details...
If not, write the specific model matrix and use \ to solve.
doc mldivide % illustrates
Oh, or if have Statistics Toolbox, there's the regress linear regression method.
  1 件のコメント
chien-feng Huang
chien-feng Huang 2016 年 1 月 5 日
thank you

サインインしてコメントする。

その他の回答 (1 件)

Image Analyst
Image Analyst 2015 年 12 月 30 日
You can use John D'Errico's polyfitn in the File Exchange: http://www.mathworks.com/matlabcentral/fileexchange/34765-polyfitn.
Attached is an example of how I used it to correct (flatten) a background.

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by