In the first step, image corners are transformed with forward transformation to find the canvas size with their minimun and maximum. Then by using the corners and poly2mask function, we can have a mask of the image on the canvas. As a result we have the coordinates of all the pixels after transformation. At last, we should do inverse transformation and use interp2 to get the color of each pixel.
Corresponding points are selected manually with ginput() command.
Homography can be calculated by applying SVD on matrix A on the linear equation system of form Ah=0 (h is a column vector containing nine parameters in the 3x3 homography matrix) .
Using the homography computed from the corresponding points and the applyTransformation function from part 0, we can warp input images.