From: Todd N. <to...@gm...> - 2005-02-16 05:49:02
|
On Tue, 15 Feb 2005 23:58:04 -0500, Paul Kienzle <pki...@us...> wrote: > I replaced the old version of imrotate with what you sent. > > I would appreciate a few simple test cases which do not > rely on a human visual system to determine if the result > is correct. > > I tried the following: > > X = rand(30); > Y = imrotate(imrotate(X,30,'bicubic'),-30,'bicubic'); > norm(X(17+[1:5],17+[1:5])-Y(30+[1:5],30+[1:5])) > ans = 0.46103 > > Using a smoother function worked better: > > X = peaks(30); > Y = imrotate(imrotate(X,30,'bicubic'),-30,'bicubic'); > norm(X(17+[1:5],17+[1:5])-Y(30+[1:5],30+[1:5])) > ans = 0.0036647 > > Anyone have any better suggestions? > I was looking for a few good test cases and came across using this as a test case: imrotate(eye(20),45) The problem is displayed here (in a smaller case to fit in an email well): octave:18> imrotate(eye(13),45) ans = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Todd |