In this assignment you need to implement
ONE of several stereo vision algorithms: locating and drawing
epipolar lines of an uncalibrated stereo pair, structure
reconstruction from an uncalibrated stereo pair, or
rectification of an uncalibrated stereo pair.

- The input image should always be converted to grayscale before processing it.
- The main parameters of each algorithm should be made available for interactive manipulation through keyboard/mouse/trackbar interaction.
- You may NOT use the OpenCV function which directly implements the algorithm you choose. You may, however, use it for verification purposes. You may use other OpenCV functions as necessary.
- Your program must include a help key describing its functionality.
- You need to evaluate the performance of the algorithm you choose using test data. The results of your evaluation should be included in your report. Try to determine the strengths and weaknesses of the algorithm.
- For submission instructions and the necessary format of the report please refer to assignment 1.

- Given a stereo pair as input to the program, load and the display the images next to each other.
- The user is then allowed to specify a set of corresponding points in the images using the mouse.
- Using the set of corresponding points specified by the user, estimate the fundamental matrix relating the two views and display the estimated matrix. Normalize the points before computing the fundamental matrix and make sure that the estimated fundamental matrix is a rank 2 matrix.
- Using the estimated fundamental matrix, let the user select a point in one image, and display the corresponding epipolar line in the second image. The user should be able to select points in both the left and right images.
- Using the estimated fundamental matrix, compute and display (numerically) the coordinates of the left and right epipoles.
- Test stereo images are available on the cs512 website. In addition, test the algorithm on images you take yourself.

- Given a set of two views in which the intrinsic camera parameters are KNOWN (the extrinsic camera parameters are assumed UNKNOWN), and a set of corresponding points in the two views, reconstruct 3D points on the surface of the unknown object.
- Using a subset of the provided corresponding points, estimate the fundamental matrix relating the two views and display the estimated matrix. Make sure that the estimated fundamental matrix has a rank of 2. Using the knowledge of the intrinsic parameters compute and display the essential matrix.
- Using the essential matrix, estimate up to an unknown sign the rotation and translation between the views and display them. Note that the true extrinsic parameters are provided so that you can verify your computations.
- Reconstruct the 3D points using the obtained rotation and translation and choose a consistent solution.
- The corresponding points are described in a text file. The
first line in this file contains the number of matched points.
Subsequent lines contain the description of pairs of
corresponding points. Each pair of corresponding points is
described by 4 coordinates:
*x*_{r},*y*_{r},*x*_{l},*y*_{l}, where (*x*_{r},*y*_{r}) and (*x*_{l},*y*_{l}) are corresponding points. - The reconstructed points should be saved in a VRML file as a 3D point cloud and rendered using an external VRML viewer (alternatively, write a simple OpenGl program to display the points which allows for rotating the points and zooming in/out). Generation surfaces between the points is not required.
- A calibrated image pair with a dense correspondence and known intrinsic/extrinsic parameters is available on the cs512 website. In addition, test the algorithm on images you take yourself.

- Given a stereo pair as the command line argument to the program, load and the display the images next to each other. The user is then allowed to specify a set of corresponding points in the images using the mouse.
- Using the set of corresponding points specified by the user, estimate the fundamental matrix relating the two views and display the estimated matrix. Make sure that the estimated fundamental matrix is a rank 2 matrix.
- Given the KNOWN intrinsic parameters of the camera, determine the essential matrix relating the views. Using the essential matrix, estimate up to an unknown sign the rotation and translation between the views and display them. Assume that the correct sign is given to you (the true extrinsic parameters are provided for verification purposes).
- Using the ESTIMATED extrinsic parameters and the KNOWN intrinsic parameters compute and the display the rectification transformation matrix that has to be applied to the left and right views.
- Apply the estimated transformations to warp the left and right views and display the resulting images next to each other.
- A calibrated image pair with known intrinsic/extrinsic parameters is available on the cs512 website. In addition, test the algorithm on images you take yourself.