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 24, 2010 10:12 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Shalin Mehta" <> wrote in message <h8svoe$rkb$>...
> Just found a useful solution: Use interp2 with '*linear' option. Works factor of 2.5 faster than imtransform. Any other ideas?

Yes, interp2 will still be quite slow because of all the different functionality it has to support, for example, interpolation on non-uniform grids. It is much faster to express the interpolation as a separable convolution and use

Namely if your shift in x and y are 0<sx<1 and 0<sy<1 respectively, then you can do

Image=conv2(Image,[sx, 1-sx],'same');
Result=conv2(Image,[sy, 1-sy],'same');

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.