## ECE 564 Computer Vision Assignment 6

Submit the usual HTML documentation and source code on Isidore.
Download files `CV2016-03-06.zip`

from Isidore.

- Use the first three images from CV2017-03-06 to find their vanishing points and determine
how well they define a horizon line. You may use the corner data from
`corners1.mat`

.
- Use the photograph 2017-03-06_0007.JPG and camera intrinsics obtained earlier to find the
target board extrinsics. Determine the location of the camera and checkerboard
relative to the hallway. You can use the
corner data in
`corners2.mat`

. Calculate the “look-down” of the camera and compare
to the photographs taken of the camera.
- Construct a
`tform`

to show a top-view of the hallway from 2017-03-06_0007.JPG.
Use the same `tform`

to warp 2017-03-06_0010.JPG and 2017-03-06_0011.JPG.
- Construct a layout drawing similar to the one shown below,
showing the geometry of the hallway, the position and orientation of the camera and the bottom of the
camera field of view.

- Given a triangle represented by three principal vanishing points, write a MATLAB code to determine
the orthocenter and distances
*d*_{1} and *d*_{2} for each vertex. Check
that the focal length formula gives the same result for each case.

- Write a MATLAB function to determine the Euler line of a triangle. Demonstrate that
the three centers do in fact lie on the Euler line (see references)
- Use CV2017_0206subset.zip to construct an “ortho triangle”
to determine the orthocenter
(principal point) and focal length of the camera. Compare to the MATLAB camera calibration you
performed in asgn 5.
Construct a diagram similar to the example below.

#### References

Orthocenter of a triangle (Wikipedia)

Orthocenter (with animation)
(Math Open Reference)

Euler line (Wikipedia)

Euler line (Math Open Reference)