FixTheRobot Explore Robotics / Perception / P3 / P3-L2

This lab works on phones, but writing code is much easier on a laptop.

Perception · Geometry and Camera Perception · P3-L2 · Intermediate

Investigate the Effect of Camera Parameters

A new camera is mounted on a robot and the label gives its focal length and image centre. The robot projects a known target into the image, and the points land a few pixels from where the camera sees them.

You will learn to read how each wrong constant moves the points, estimate the right constants from the measurements, and tell from the residuals which one was wrong.

Your task

    Simulation
    solution.pyLoading Python…
    Ctrl+Enter runs
    What Python can I use?

    Plain Python with math (and slamkit for small matrix helpers: matmul, transpose, solve, inverse, identity). Images, point clouds and detections arrive as lists inside the dictionary D; an image is a list of rows, each row a list of pixels. There is no NumPy or OpenCV: you write the algorithm yourself, which is the point of the lab. Print with print().

    Hints

    What this lab teaches

    Stage 1 is a controlled experiment on three parameter errors. Stage 2 asks you to fit the constants to noisy observations. Stage 3 asks you to diagnose a camera from the residual pattern. Your code is graded on hidden cameras; the simulator keeps the true constants private.

    Theory for this lab

    Geometry and Camera Perception labs

    1. P3-L1: Project 3D Points into an Image
    2. P3-L2: Investigate the Effect of Camera Parameters: this lab.
    3. P3-L3: Recover Geometry from Depth Observations

    Educational simplification: an ideal pinhole camera (320 by 240, no distortion) whose constants differ from the nominal ones by a few percent or pixels; calibration points are known in the camera frame and pixel measurements carry 0.3 pixel Gaussian noise. A real calibration must also solve for the pose of the target and the lens distortion. All data in this lab are simulated.

    Get the next lab

    Get notified when new robotics labs are released. One email per new lab, nothing else.