Putting it all together
Given a an image of size width X height and four
corners of a quadrilateral a, b,c,d in homogeneous coordinates
- compute the matrix M using intersections of sides h1, h2 and intersection of diagonals h3
- compute the inverse of M
- scan convert the quadrilateral; for each pixel to be painted, determine the pixel of the imagecorresponding to it; use its color to paint the pixel