-
Notifications
You must be signed in to change notification settings - Fork 7
Refactoring Roadmap.
I'm not a professional programmer, but I'm learning something new every day. The camera currently consumes significant resources, and the use of OpenCV could substantially reduce these resources by creating a new image. Refactoring aims to make the code more readable and efficient.
-
Shared Variables: Share commonly used variables such as
json_data
or camera parameters between modules, enabling the use of a single object for data exchange among the camera, image handler, and MQTT routines. -
Function Simplification: Break down functions to perform a single task, resulting in more functions but making the code more readable. This approach also ensures better distribution of work.
-
Multiprocessing Implementation: Introduce multiprocessing to ensure optimal workload distribution, enhancing overall performance.
-
Integration into Add-on: Once the code is more readable and performs better, will consider transforming this integration into an add-on. Using Docker could facilitate the transition from the current implementation to an OpenCV-based solution.
By following these steps, we aim to enhance code readability, efficiency, and pave the way for future improvements, including a potential transition to an OpenCV-based implementation.