I'm running a Realsense camera, and have a flask server streaming images from /video_feed for humans to check out what's going on.
But it's for a robot application, and the robot doesn't need the video feed. It just needs the latest distance data, which is collected while running /video_feed.
So, just a JSON string, maybe a list of: -object name, distance, bounding box coordinates
What's my best option here?
Ideally I'd just have /video_feed saving the latest string to a global, application scope variable, and have /get_distance_data return that string.
A database seems overkill. But I'm not familiar enough with flask, to understand how application scope variables can be done simply.