Interpolation using average of pixels

9 ビュー (過去 30 日間)
SnovG
SnovG 2015 年 6 月 8 日
回答済み: bazrafshan88@gmail.com 2016 年 9 月 5 日
I have ocean color remote sensing data in netcdf format that I want to interpolate. For example, I have the variables latitude, longitude and Z which is the SPM (Suspended material). I was using the function TriScatteredInterp to interpolate among different grid sizes. What I would like to know is if there is function that provides the option to change the interpolation methods, instead of using the nearest neighbor method for example, I would like to interpolate data using the average. So, if I want to resize the image to have one pixel created from two pixels, I would like to do it using the average of those two pixels. Is this possible? I hope it is clear. Thank you

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 6 月 8 日
http://www.mathworks.com/help/matlab/ref/triscatteredinterp.html defaults to using method 'linear' (which sounds like what you like) and method 'nearest' has to be specified as an option.
  1 件のコメント
SnovG
SnovG 2015 年 6 月 10 日
Thanks!

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


bazrafshan88@gmail.com
bazrafshan88@gmail.com 2016 年 9 月 5 日
Hi
I had the same problem of too large measurement size of 2048*2048 and I wanted to have 1024*1024, 512*512 and so on. I just wrote a simple code that might be useful for you too. The code downsample your original square matrix to lower sizes.

カテゴリ

Help Center および File ExchangeInterpolation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by