Computer Laboratory

Course pages 2016–17

Computer Vision


Lectures for this course are delivered in the Engineering Department:

See Department of Engineering web page for 4F12

Practical exercises

Practical exercises will be introduced and assessed by teaching and research staff in the Computer Laboratory. The total amount of self-study time devoted to the course should be approximately 64 hours. The first two practical exercises should be completed in about 8-12 hours (exercises 1 and exercise 2) and the mini-project in about 40-50 hours.

Exercise 1

Step 1: Install and set up OpenCV (see notes below). Read some tutorials to gain basic familiarity with OpenCV and its core methods and capabilities. (about 1.5 hours)

Step 2: Use OpenCV to carry out camera calibration following the steps described in (about 1.5 hours)

Step 3: Take a set of photos of the rubber stamp impressions in your ACS Research Skills logbook. Write code that makes use of OpenCV to load each image file in turn and detect the outer corners of the stamp. Then use the co-ordinates of those corners to produce (to a good approximation) a perspective corrected output image for each input image, i.e. the output should show a "top-down" view of stamp without major distortions (any "in-plane" rotation of the stamp image around the axis normal to the image plane may be ignored). (about 3 hours)

Step 4: Write the report. The report should have two sections of no more than two pages each:

a) Camera calibration: list the intrinsic and extrinsic camera parameters that were obtained during the camera calibration. Briefly describe, using the theory covered in the lecture course, the meaning of these parameters and how OpenCV determines their values.

b) Perspective correction: List the main OpenCV methods you employed and briefly describe their purpose and underlying algorithms. Under what conditions are 3, rather than 4 or more, points on the object sufficient to perform a perspective correction? How could knowledge of the intrinsic and extrinsic camera parameters lead to an improved solution?

As an example of writing style that is appropriate for straightforward reporting of a computer vision project, you may like to refer to the following paper by Chris Town:

Step 5: Submit the report as PDF, with an appendix containing your code written in any high level language with OpenCV bindings (C++, Python, Java or Matlab).


Exercises will be based on OpenCV (Open Source Computer Vision Library: Open CV is an open-source BSD-licensed library that includes some hundreds of computer vision algorithms. OpenCV has C++, C, Python and Java interfaces and supports Windows, Linux, Mac OS, iOS and Android.

Information on installation and setup of OpenCV for a variety of platforms is available at:

Information on the core functionality of OpenCV is available at:

Other resources include:

  • Robert Laganière, OpenCV 2 Computer Vision Application Programming Cookbook, PACKT publishing. (available online)
  • Daniel Lélis Baggio et al. Mastering OpenCV with practical computer vision projects. Packt Publishing Ltd.