Agent imaging and tracking

The Raspberry Pi Camera was used for all imaging, operating at a resolution of 1920 × 1088 pixels. In all cases, exposure mode was set to ‘spotlight’ and camera ISO was set to 100, with a shutter speed of 200 ms. The camera was operated using the capture continuous method in which images are captured in an infinite loop, iterating over frames. A neutral density filter (NE510B-A, Thor Labs) was also used to minimise optical interference artifacts. All image processing and projection algorithms were developed using Python and executed through the Raspberry Pi OS. Volvox agents were detected in the camera FOV by finding image contours using OpenCV and filtering for size and compactness. ID based tracking was implemented by matching the locations of contours in a given frame to those in the previous frame. Agents were matched to their most likely ID by checking their current location against agents in the previous frame. The closest match was assumed to be the same agent, provided that the distance between the two locations was smaller than 35 pixels (420 µm). This method was largely effective in locating and matching agents. However, we found it did not always reliably distinguish agents where two or more collided. This issue was, for the most part, minimised by the relatively low density of Volvox in the FOV at any one time. Where this issue did occur, the tracking system is designed to assign new IDs to the agents once separated to avoid data becoming biased by these events.