New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Proposal]: Support Picamera2
#342
Comments
Thanks for opening this issue, a maintainer will get back to you shortly! In the meantime:
|
Hi, we're eagerly waiting on PiCamera2 support. Any progress updates on this/is there any development code we can look at or contribute to? |
@dante-biase I just got time to work on this project again. I'll start shortly after pending commits are pushed. |
Fantastic! |
I hope this is still in scope, the new pi camera modules are really nice (autofocus, wideangle etc), so it would be great to see picamera2 integrated here... |
It would also be a major selling point, as they are still not supported in OpenCV natively yet (opencv/opencv#21653). |
@iandol yeah its on priority, I'm right now busy with my studies and job. But I've planned this for upcoming weeks and looking at Picamera2 documentation its not that hard to implement. Stay tuned. |
Waiting for Picamera2 update |
@sourabmaity Yeah I'm swamped with a ton of work right now and my schedule's pretty tight. However, I'm committed to work on this, so as soon as I get a breather, I'll definitely circle back and address this. |
Okay I've finally started working on this. Expect a update in few days. |
Any update on this? |
✨ This update brings official support for the new Picamera2 API, unlocking powerful features for Raspberry Pi Camera Modules and limited USB camera support. Key improvements: - 🚸 Seamless Python wrapper: A robust wrapper around Picamera2 API library simplifies integration with minimal code changes for existing PiGear users. - ⚡️ Enhanced camera control: Leverages libcamera API under the hood for Raspberry Pi Camera Modules. - ⚡️ Existing compatibility: Maintains compatibility with PiGear's existing super-charged multi-threaded and colorspace manipulation framework. - ⚡️ Resource management: Ensures proper resource release during PiGear termination. - ✨ USB camera support (limited): Provides basic functionality for USB webcams. PiGear could accurately differentiates between USB and Raspberry Pi cameras using metadata. - 🧑💻 Backward compatibility: Seamlessly switches to the legacy PiCamera library if Picamera2 is unavailable. - 🧑💻 Standalone functionalities: Separates functionalities for both legacy and newer APIs for clarity. - ⚡️ Automatic configuration management: Handles common configuration parameters and non-standard settings for various camera types. - New internal parameters: - 🚩 auto_align_output_config: Optimizes output frame configuration for the camera sensor. - 🚩 enable_verbose_logs: Enables more detailed logging through Picamera2. - Unified `format` parameter: - 🥅 Defaults to RGB888 (24-bit BGR) for Raspberry Pi cameras. - 🦺 Validates formats for USB cameras before handling. - 🥅 Requires explicit `colorspace` definition if `format` is not MPEG (USB cameras) or for specific formats in Raspberry Pi cameras. - Raspberry Pi camera exclusive parameters: - 🚩 Currently Supports `"controls," "queue," "transform," "bit_depth," "buffer_count," "sensor," and "stride"` with type checks. - ⚡️ Framerate handling: Tailored framerate handling based on camera type. - 🦺 Logging optimization: Added a warning advising users to disable common libcamera messages when logging is disabled. Additional Changes: - 💥 Dropped legacy `picamera` dependency in `Setup.py`. - 💡 Improved code efficiency with short-circuiting and formatting. - 🔊 Updated logging practices. CI: - 🏗️ Temporarily removed PiGear API from code coverage due to hardware limitations.
@dante-biase It's here finally. :) |
Alright! |
Awesome to hear!🚀 |
Issue guidelines
Issue Checklist
Describe your Idea
With Bullseye, Raspberry Pi moved away from the legacy camera support to their own
libcamera
-fuelledpicamera2
. It aims at being a slot-in replacement forpicamera
. It is still possible to use the legacypicamera
, but it's being deprecated and is slowly starting to break things.Although
picamera2
is still in beta, I'd propose beginning to implement it.Use Cases
Anyone using Raspberry Pi cameras, especially newer custom cameras (e.g. from Arducam).
Any other Relevant Information?
The
picamera2
repo: https://github.com/raspberrypi/picamera2Documentation: https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf
I can begin slowly and create a pull request, hoping that it really is mostly a slot-in replacement. Would you prefer having an additional
PiGear2
class insidepigear.py
, or a newpigear2.py
?The text was updated successfully, but these errors were encountered: