When possible, use a clear and readable format, such as HowardStark's:
Proposed
The Pi should be running a socket server in the same code as the OpenCV vision (which is written in C++) to reduce the latency of using the filesystem. Additionally, the OpenCV will be able to push updates instead of waiting for a request, ensuring that anything listening will get the most up-to-date data.
Why
There is no reason for the current architecture to follow a request -> response style when we always want the most recent data as fast as possible. The added complexity of the request is uesless.
To-do
(AT)Shaheenthebean, @oshlern, and (AT)HowardStark (that's me :D) will factor out the python server and implement a C++ socket server which writes the data as soon as it gets it, then returns to calculating new data thus repeating the process.
When possible, use a clear and readable format, such as HowardStark's:
Proposed
The Pi should be running a socket server in the same code as the OpenCV vision (which is written in C++) to reduce the latency of using the filesystem. Additionally, the OpenCV will be able to push updates instead of waiting for a request, ensuring that anything listening will get the most up-to-date data.
Why
There is no reason for the current architecture to follow a request -> response style when we always want the most recent data as fast as possible. The added complexity of the request is uesless.
To-do
(AT)Shaheenthebean, @oshlern, and (AT)HowardStark (that's me :D) will factor out the python server and implement a C++ socket server which writes the data as soon as it gets it, then returns to calculating new data thus repeating the process.