UAT 205 Sensors and Instrumentation Systems

Worksheet 4 Camera calibration with OpenCV

Lab 6 hAssesses CLO2, CLO1

Objective

Find camera intrinsics and distortion, check quality with reprojection error and undistort a real image

Equipment and materials

  • Checkerboard on a flat rigid board
  • Calipers
  • Drone camera or a camera with locked focus
  • Python and OpenCV
  • One aerial image from the same camera

Safety

  • Desk and indoor photography only; no flying
  • Remove propellers if the camera is on a powered drone

Steps

  1. Print a checkerboard, measure squares with calipers, mount it flat
  2. Lock focus and take at least 20 images in many poses, covering the frame and edges
  3. Calibrate following the OpenCV tutorial or lab L11
  4. Record K, distortion coefficients and reprojection error with its definition
  5. Use Example 2 to find abnormal images, inspect the cause and recalibrate
  6. Undistort one aerial image and compare edge straight lines before and after

Record of results

Table 1 Camera intrinsics and distortion
ParameterValue obtainedUnitValue expected from the specification (if any)
Table 2 Per-image reprojection error
ImageRMS per point (px)Above twice the median?Cause found on inspectionKeep or drop
Note 1 Edge straight lines before and after undistortion

Questions

  1. Is your group's reprojection error RMS per point or per component? What is it in the other definition, and why must the report state the definition?

  2. What caused the flagged images when you inspected them, how much did the overall figure change after recalibrating, and why does a low reprojection error alone not prove the calibration is right?

  3. Use Example 1 to explain why the checkerboard must reach the edges and corners of the image, and describe how straight lines near the edges of your aerial image changed after undistortion.

  4. If the team changes the image resolution or zoom after calibration, which values in Table 1 can no longer be used, and what must be done?

Check before you hand in

What to hand in

  • K and distortion coefficients
  • Per-image reprojection error before and after pruning
  • Before/after undistorted images

CLO2 Calibrate sensors and evaluate measurement uncertainty. CLO1 Explain the operating principles of UAS sensors. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack