フィルターのクリア

HOW TO INTERPOLATE MAT 185X250X3 MATRIX USING CUBIC SPLINE

2 ビュー (過去 30 日間)
Amit Kadam
Amit Kadam 2012 年 11 月 20 日
Map provides a 185 x 250 x 3 matrix Map representing an image and “image coordinates” xi and yi. interpolation coordinates 5 < x < 180 and 5 < y < 245, both evenly spaced with spacing 0.1. Interpolate each of the 3 blocks of size 185 x 250 of the matrix Map first in one direction, then the other, to produce a 1751 x 2401 x 3 matrix InterpolatedMap. Set any values larger than 1 to 1, and any less than 0 to 0. Use the image command to compare the original image Map to the image in InterpolatedMap.
I have generated code MyCubicInterpolation which works in following way, xi = linspace(-1,1,150); zi = sin((pi.*xi)/2);
x = linspace(-1,1,200);
y = MyCubicSpline(xi,zi,x);
Now I dont understand my which one will be my 1st direction and which one my second direction, should I select entire block Map(:,:,1) out of three. In short I can not understand next steps.

採用された回答

Matt J
Matt J 2012 年 11 月 20 日
編集済み: Matt J 2012 年 11 月 20 日
It sounds like you're to first interpolate along x to produce an array of size 1751 x 250 x 3 and then interpolate that intermediate result along y to obtain an array of size 1751 x 2401 x 3. Or you can interpolate first along y and then along x. The order won't affect the result.
If you're not sure how to interpret the homework question though, the most reliable person to ask is the one who assigned it to you.

その他の回答 (1 件)

Matt J
Matt J 2012 年 11 月 20 日
編集済み: Matt J 2012 年 11 月 20 日
F=griddedInterpolant(MAP,'cubic');
out=F({X,Y,1:3});
  1 件のコメント
Amit Kadam
Amit Kadam 2012 年 12 月 8 日
thanks Matt It was image processing problem where i was asked to interpolate the intermediate pixels in map.
I learn a lot.

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

カテゴリ

Help Center および File ExchangeGeometric Transformation and Image Registration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by