Asg 6: OpenCV camera calibration

Assignment

Implement camera cliabration in OpenCV using
ret, corners = cv2.findChessboardCorners(...)
which will return a list of chessboard corners. You can refine them via
corners2 = cv2.cornerSubPix(...)
and then use them as input to
ret, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(...)
to recover the intrinsic and extrinsic matrices.

In this assignment, try printing out a known chessboard (e.g., 9x6) and pasting it to a stiff piece of cardobard.

See if you can use the returned values to undistort whatever camera you are using.

Suggestions (e.g., for Python implementation)

  1. There are probably many suggestions out on the web, e.g.,

Example Program Input

None. Find a short video that you like.

Example Program Output

Ideally an .mp4 video could be made, although that may need to be encoded post-facto by ffmpeg as OpenCV might only output raw video.

Turn in

Turn in all of your code, in one tar.gz archive of your asg##/ directory, including:
  1. A README file containing
    1. Course id--section no
    2. Name
    3. Brief solution description (e.g., program design, description of algorithm, etc., however appropriate).
    4. Lessons learned, identified interesting features of your program
    5. Any special usage instructions
  2. Makefile
  3. source code
  4. short video

How to hand in

See handin notes

Grading scheme