Grading
Background reading
- From World Points to Pixels, sections 39.7.1 to 39.7.4 on checkerboard calibration.
- Single View Metrology, on vanishing points and the horizon line.
- For the last question: sections 44.2 and 44.3 of the MIT book’s chapter on multiview geometry and structure from motion.
How the tasks work
Each task asks for one function or a few lines. Most tasks are followed by a check cell. It printspassed when your code is right and explains what is wrong otherwise. Later parts use your earlier functions, so do not move on until a check passes.
Some results depend on your camera and your room, not only on your code. Those checks print a warning instead of failing. The questions ask you to explain what you did and observed, in your own words, with your own numbers.
Until your own captures are in place, the code runs on a sample captured on another laptop, so you can start the tasks right away. The results you hand in must come from your own webcam. Any part answered with the sample data is penalized.
This is an individual exam. You may consult the course material, the textbooks and the documentation of the libraries the code uses, but the code and the written answers must be your own.
What you will need
- Your laptop’s built-in webcam. Use the same camera, at the same resolution, for every capture.
- A checkerboard, printed flat or shown full screen on a phone or tablet. Count its inner corners (a board with 11 by 8 squares has 10 by 7) and measure the side of one square in millimeters.
- A phone inclinometer app, to read the angle of your laptop lid. Only changes between readings are used, so the app’s zero does not matter.
- The capture script, which runs on your laptop with Python,
opencv-pythonandnumpy. Colab cannot open a local camera. - A Google account for Colab and Google Drive, and a GPU runtime: in Colab, open Runtime, select Change runtime type, and choose a T4 GPU.
What to capture
Runpython capture.py list to find your color webcam, then python capture.py capture --device <index> --pattern <columns> <rows> --square-mm <size> with your board’s inner-corner count and square size. In the preview window, c saves a checkerboard view, s saves an ordinary scene, v starts and stops a video, and q quits. The first cells of the midterm describe each capture in detail.
- About 20 checkerboard views, covering the whole image, with the board tilted in different directions.
- About 10 ordinary scenes with no checkerboard, each a different view, plus four scenes of one view at four lid angles, with the phone reading for each.
- A 30 to 60 second video of yourself walking across the room, with the laptop still, your whole body in view, and the phone reading on the lid noted.
captures folder to My Drive/cv-midterm/captures in your Google Drive. The setup cell mounts your Drive and reads it from there, so your data survives the end of a Colab session and never goes into your repository.
What you hand in
- The notebook, with every cell output saved.
- In the notebook’s last cell, a view-only link to your
capturesfolder in Google Drive.
Assignment notebook
Open Notebook in Colab
Calibrate Your Own Webcam Notebook
Submitting
Commit the notebook to your private clone of the class repo underassignments/midterm. Save every cell output before committing. A notebook without outputs is graded as though its cells never ran. Do not commit your captures.
Submit the complete GitHub URL for that directory to Canvas or Brightspace. Do not submit the repository root.
The assignment submission guide explains the remaining requirements, including how to set up your clone, add the TAs as collaborators, and create the README required in each assignment folder.
Found an error on this page? Report an issue.

