Assignment 3
Instructions:
1) Implement your codes in Python3. Packages can be used in each step.
2) Provide documentation for compiling and running the programs in a README file.
3) Place your “.py” files along with all the generated outputs and README file in a
folder. Submit the zipped folder on Moodle.
Consider the image “Sheephard_Iasi.jpg”. Develop an interactive tool performing following image and
graphics operations. The tool should have the following features. Please note that eachof them may be
performed through manual user interaction, semiautomated or automatedalgorithms as you choose.
1. Compute the pixel coordinate of a point in the image (the point will be selected by a mouse
click). [5]
2. Compute the line (in 2D projective space) and the length in pixels between two image points
(the points will be selected by a mouse click). [5]
3. Consider the image of a painting. Identify minimum five different pairs of lines, which are
supposed to be perpendicular in the original painting. Compute the transformed dual conic at
infinity using them. [10]
4. Compute Homography matrices for mapping the painting to a target rectangle of the aspect
ratio 2:3 and 3:4, respectively., and also display the transformed images. [20]
5. Perform affine rectification on the painting by providing its transformation matrix and also
displaying the rectified image. [20]
6. Perform metric rectification on the image using homography and also display the rectified
image. Compute the true aspect ratio from the transformed image. [20]
7. Visualization and GUI. [10]
8. Write a detailed report explaining the results you have got. [10]