Skip to content

Conversation

bioimedpellegrino
Copy link
Contributor

Description:

In this pull request, I have implemented scripts compatible with Picamera2, utilizing the updated library for camera management. These scripts simplify the interaction with the camera, making the process of capturing images and videos more efficient and intuitive.

Additionally, I included a dependency installation script that allows for easy setup of the development environment. The script automatically handles the installation of necessary libraries, such as libopencv-dev, libatlas-base-dev, and Python libraries via pip, including virtualenv, Pillow, numpy, scipy, matplotlib, opencv-python, and opencv-contrib-python.

Benefits:

  • Compatibility: The scripts are specifically designed to work with Picamera2.
  • Ease of installation: The installation script reduces setup time, allowing developers to focus on writing code.
  • Performance improvements: By utilizing optimized libraries, the performance of image capture and processing is enhanced.

Next Steps:

  • Test the scripts on various hardware configurations.
  • Update the documentation to include instructions on using Picamera2 and running the installation script.

Thank you for your review!

@automaticdai
Copy link
Owner

Dear bioimedpellegrino,

Thank you so much for your pull request.

I have looked at your commits in details and they look good to me.

Hardware support through duplicating scripts will increase the difficulty of maintainence in the future. Try to merge the code into one script would reduce the inconsistency. Using preprocessor directives, like #ifdef, #ifndef, #else, and #endif, can help manage such dependencies in a more centralized way. For example, use #define RPI_CAM and if defined(RPI_CAM).

  1. Reducing Duplication: By using conditional compilation directives (#ifdef and friends), you avoid copying
    identical blocks of code for different hardware configurations.
  2. Simplifying Maintenance: When modifications or bug fixes are needed, having all relevant code in one place
    makes the process much easier. You don't have to search multiple files for updates that should be applied across
    different hardware variants.
  3. Improving Code Readability and Understandability: With everything related to a specific hardware setup in one
    script, it's clearer what code is responsible for handling which hardware, making it more understandable.

Best wishes,
Steven D.

@bioimedpellegrino
Copy link
Contributor Author

Ok got it! Sorry for the late response I was quite busy. I will merge all in one script

@automaticdai automaticdai merged commit 15f01bf into automaticdai:master Nov 7, 2024
@automaticdai
Copy link
Owner

I have reviewed the code and merged it into the mainstream. I may make some minor changes in the future.
Thank you so much for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants