The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: sub-pixel shifting of a matrix
Replies: 14   Last Post: Feb 7, 2013 12:23 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Matt J

Posts: 4,997
Registered: 11/28/09
Re: sub-pixel shifting of a matrix
Posted: Feb 6, 2013 5:33 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <keubvt$fki$>...
> "Paulus Potter" wrote in message <keuaof$amu$>...
> > It should be:
> >
> > Image=conv2(Image,[sx, 1-sx],'same');
> > Result=conv2(Image,[sy; 1-sy],'same');
> >

> This is about twice faster
> Result=conv2(Image,[sy; 1-sy]*[sx, 1-sx],'same');

Maybe, but only because there are some funny sub-optimal things happening inside conv2 implementation-wise, and because the interpolation kernel here happens to be small. There's no way the 3rd version below should be the slowest.


Result=conv2(Image,[sy; 1-sy],'same');
%Elapsed time is 0.045940 seconds.

%Elapsed time is 0.090292 seconds.

Result=conv2(kx , ky, Image,'same');
%Elapsed time is 0.162708 seconds.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.