Sign in to follow this  
yjnh2005

no idea about matrix interpolation

Recommended Posts

yjnh2005    122
Can anyone help me? Now I have a 64*64 matrix, I want to let it become a 1024*1024 matrix by linear interpolation through c++. I am trying to find the solution. Big problem for me now.

Share this post


Link to post
Share on other sites
Bob Janova    769
Linear interpolation is quite easy. For any location on your new 1024 matrix, you are in a 'minisquare' defined by four corners (points in the 64 matrix), and your location within this square can be thought of as (x, y) where 0<(x,y)<1. A simple interpolation would then be
value = vtlxy + vtr(1-x)y + vblx(1-y) + vbr(1-x)(1-y)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this