# ECE 564 Computer Vision Assignment 3

This assignment uses images taken in class 6 Feb 2019. They may be downloaded from Isidore resources (`CV2019-02-06.zip`). The Bouguet toolbox can be obtained from `calib1_demo.zip` in Isidore resources

Submit HTML documentation and MATLAB files on Isidore.

1. Using images from 6 Feb 2019, run a camera calibration. Follow the steps in this example from the Camera Calibration Toolbox for Matlab® by Jean-Yves Bouguet. Compare the focal lengths to that obtained in Assignment 2. Submit the published MATLAB summary using `calib_publish.m`.

2. Use the MATLAB Computer Vision calibration toolkit with the same images from 6 Feb 2019. Follow the steps in this example. Compare the focal lengths to those obtained in the previous problems. Modify the MATLAB script you can generate from `cameraCalibrator` so you can nicely publish the results.

3. Document and compare the instrinsic calibration matrix and intrinsic parameters for the camera as obtained from both calibration toolboxes. Also compare the extrinsic rotation matrix and translation vector for one image.

4. Write and demonstrate a MATLAB function that superimposes the corner points on a checkerboard image, marks the origin of the world coordinate system, and draws the X and Y axes.

5. The MATLAB toolkit fails to find corners for two of the images. Use the MATLAB toolkit function `[impts, bsize] = detectCheckerboardPoints(filename);` and your code from the previous problem to show what happens.

6. Extract the top row of corner points from the calibration results for severai images (either toolkit). Find the angle θ for each of the lines minimizing the perpendicular distance to the lines. Transform the points to the (u, v) coordinate system for each line and plot v vs. u. If you see a quadratic deviation, fit a quadratic polynomial to the transformed points

7. Generate a photo montage showing various views of the cube from the last assignment. Include several views showing the effect of perspective projection with the camera angle varying from large (maybe 60-degrees to small 10-degrees).

Maintained by John Loomis, last updated 13 February 2019