Grading
Background reading
- From World Points to Pixels, sections 39.7.1 to 39.7.4, for checkerboard calibration.
- Single View Metrology, for vanishing points and the horizon line.
- Sections 44.2 and 44.3 of the MIT book’s chapter on multiview geometry and structure from motion, for the last question.
How the tasks work
Most tasks ask for a function or a few lines of code, followed by a check cell. It printspassed when the code is right and explains the problem when it is not. Later parts call your earlier functions, so get each check to pass before you move on.
A few results depend on your camera and your room. When one of these looks unusual, its check prints a warning and you can keep going. The written questions ask you to explain such results with your own numbers. Until your captures are in place, the code runs on a sample recorded on the instructor’s laptop, so you can start on the tasks right away.
This is an individual exam, so you cannot collaborate with anyone. You may consult the course material, the textbooks and the documentation of the libraries you use. The code and the written answers must be your own.
What you need
- Your laptop’s built-in webcam, at the same resolution for every capture.
- A checkerboard, printed and flat or shown full screen on a phone or tablet. Count its inner corners (a board of 11 by 8 squares has 10 by 7) and measure one square’s side in millimeters.
- A phone app that reads tilt in degrees, for the angle of the laptop lid. On an iPhone, use the Level tab of the built-in Measure app. On Android, install Bubble Level. Only the changes between readings matter, so the app’s zero does not, but do not tap the screen between readings: in Measure, a tap resets the zero.
- The capture script. It runs on your laptop and needs Python with
opencv-pythonandnumpy. Colab cannot open a local camera. - A Google account for Colab and Google Drive. Use a GPU runtime: in Colab, open Runtime, choose Change runtime type, and select a T4 GPU.
What to capture
Runpython capture.py list to find the index of your color webcam. Then start the capture with your board’s inner-corner count and square size:
c saves a checkerboard view, s saves a scene, v starts and stops a video, and q quits. The first cells of the midterm describe each capture in detail. You need:
- About 20 checkerboard views that cover the whole image, with the board tilted in different directions.
- About 10 scenes without the checkerboard, each from a different view. Add four scenes of one view at four lid angles, and note the phone reading for each.
- A video of 30 to 60 seconds of you walking across the room. Keep the laptop still and your whole body in view, and note the phone reading on the lid.
captures folder to My Drive/cv-midterm/captures in Google Drive. The setup cell mounts your Drive and reads the captures from there. They survive the end of a Colab session and stay out of your repository.
What you hand in
- The notebook, with every cell output saved.
- A view-only link to your
capturesfolder in Google Drive, pasted in the notebook’s last cell.
Assignment notebook
Open Notebook in Colab
Calibrate Your Own Webcam Notebook
Submitting
Commit the notebook underassignments/midterm in your private clone of the class repo. Save every cell output first: a notebook without outputs is graded as if its cells never ran. Do not commit your captures.
Submit the full GitHub URL of that directory to Canvas.
Found an error on this page? Report an issue.

