Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Image rotation and NaNs...
Date: Sat, 6 Jun 2009 18:45:04 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 9
Message-ID: <h0edfg$ld0$1@fred.mathworks.com>
References: <gvivk5$q0m$1@fred.mathworks.com> <h0dehc$8ui$1@fred.mathworks.com> <h0dgsc$5jr$1@fred.mathworks.com> <h0e94l$h1a$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1244313904 21920 172.30.248.38 (6 Jun 2009 18:45:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 6 Jun 2009 18:45:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:545236


"Matman86 Di" <pasqui.squall@email.it> wrote in message <h0e94l$h1a$1@fred.mathworks.com>...

> I know how interp2 works,but I can't explain why if I make a 360? rotation I can't return with the original values...

Because when you rotate pi 2*pi, the points (after rotation) do not fall exactly where it is due to numerical error (try to see the value of sin(2*pi), it is not zero), and if it's outside the box, interp2 puts the value to NaN.

And btw, why your point of rotation is not centered in the image? It's off by 1/2 pixel.

Bruno