FixTheRobot Explore Robotics / Perception / P4 / P4-L2

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

Perception · Classical Feature Detection and Matching · P4-L2 · Intermediate

Match Features Between Images

Two photographs of the same scene were taken a moment apart, and the second one is darker. A robot has found corners in both and has to say which corner in the first is which corner in the second.

Many rectangle corners look alike. You will build a descriptor that ignores the lighting, a matcher that refuses ambiguous answers, and a filter that keeps only matches that agree in both directions.

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 patch size, normalisation and the ratio test. Stage 2 writes the matcher. Stage 3 filters candidate matches with the ratio test and the cross-check. Your code is graded on hidden image pairs; the simulator keeps the true transform between the images private.

    Theory for this lab

    Classical Feature Detection and Matching labs

    1. P4-L1: Detect Image Features
    2. P4-L2: Match Features Between Images: this lab.
    3. P4-L3: Reject Incorrect Correspondences and Measure the Improvement

    Educational simplification: simulated 64 by 48 grey images of overlapping rectangles from two viewpoints related by a small rotation and a shift, with a strong brightness and contrast change and Gaussian noise of 6 grey levels; corners come from a Harris detector. Real matching must also handle scale change, large rotation, blur and repeated structure. All images in this lab are simulated.

    Get the next lab

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