FixTheRobot Explore Robotics / Perception / P2 / P2-L3

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

Perception · Image Processing for Robotics · P2-L3 · Intermediate

Diagnose a Failing Image-Processing Pipeline

An inspection robot counts bright parts on a belt with a four-stage image pipeline. Today it reports dozens of tiny parts, or one part when there are two, or the floor instead of the parts.

The last picture is wrong in every case. You will look at the picture after each stage to find the first one that is wrong, and fix it.

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 trains the habit of looking at every intermediate image. Stage 2 gives you a pipeline with three faults and the debug images to find them. Stage 3 shows the cost of differentiating noisy data. Your code is graded on hidden images; the simulator keeps the true block positions private.

    Theory for this lab

    Image Processing for Robotics labs

    1. P2-L1: Detect Colored Objects in an Image
    2. P2-L2: Tune Thresholds Under Changing Lighting
    3. P2-L3: Diagnose a Failing Image-Processing Pipeline: this lab.

    Educational simplification: simulated 40 by 28 grey images of bright rectangles on a darker floor with Gaussian noise and 3% salt-and-pepper noise, processed with a median filter, a global threshold, connected regions and a Sobel gradient. Real pipelines add lens distortion, colour processing, exposure control and more faults than three. 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.