RoboCup-SSL / ssl-vision

Shared Vision System For The RoboCup Small Size League
GNU General Public License v3.0
88 stars 109 forks source link

Implemented threaded nonstop recording and writing at limited FPS #195

Closed emielsteerneman closed 1 year ago

emielsteerneman commented 1 year ago

This PR adds a second recording mode to SSL-Vision. This mode records frames (.png) and accompanying detection frames (.json) nonstop, and immediately writes these to disk. An optional (and enabled by default) FPS limiter will prevent the PC from being flooded with write operations.

The collection of this data could help develop SSL-Vision. For example, the data could be used to train models for automatic color calibration, as well as adaptive color calibration when lighting conditions change.

While the previous version introduced a slight stutter in the robot detection thread, this version runs all writing in a separate thread (thanks to @mamiksik) and does not have any performance impact (as far as I have measured).

g3force commented 1 year ago

One of my teammates tested the change in our lab and everything seemed to work fine :+1: