# Image warping - how to proceed

I'm studying image warping and I'm unsure how to warp a starting rectangular image into another image where the box corner points have been changed as I want: As far as I've understood, I need to:

1) Decide the four points (e.g. by using direct mapping on the border cases of the transformation)

2) Create a lattice of integer points on it (how?)

3) Do reverse mapping on those integer points to get the values in the original image

4) ??

I can't say I understood a lot of that, can somebody help me out please?

3. Apply a bilinear interpolation (backward mapping) using your matrix. That is to say, a homogeneous point $x_i$ is mapped to the corresponding point in the second image $x'_i$ as $x'_i=Hx_i$. Yet you have to de-homogenize the final coordinate as $x_i=\frac{x_i}{x^z_i}$, where $x^z_i$ is the $3^{rd}$ component of $x_i$. You can basically now, create your indices for the entire grid. Yet, as I said, you should interpolate by reverse lookup, so that you don't end up with black dots allover.