Picamera2 Python camera library for Raspberry Pi leverages libcamera open-source framework – CNX Software

CNX Software – Embedded Systems News
Reviews, tutorials and the latest news about embedded systems, IoT, open-source hardware, SBC's, microcontrollers, processors, and more
Raspberry Pi Trading released a new version of Raspberry Pi OS last week with the highlight being the Picamera2 Python library for Raspberry Pi cameras, along with small changes such as the ability to search menu items, a new audio input control,
The new Picamera2 library was first announced in mid February 2022 with a preview release, and it’s the first time the Python library is included by default in Raspberry Pi OS. It is now based on the libcamera open-source framework instead of the proprietary and closed camera APIs from Broadcom found in the original Picamera library.
Some of the key features of the Picamera2 library include:
The source code and documentation (65-page PDF file) can be found on GitHub. The library should be installed in the latest Raspberry Pi OS image, but if somehow it’s not there, or you’d like to install it on an older Bullseye image, it can be installed as follows:

Capturing an image is just the lines of code:

If you want to show a preview window before the capture, it’s not overly complicated either.

The sample code above is valid with X-Windows, but if you’re not using X-Windows, Preview.QTGL by Preview.DRM instead:

You can also capture videos, adjust camera parameters (exposure, gain, etc..), display overlays, stream video to the network, and more.
Future plans include fixing bugs that may show up in the beta version, working on better documentation, improving the frame-by-frame control of exposure and gain, etc…
Via Raspberry Pi website
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via PayPal or cryptocurrencies, become a Patron on Patreon, or buy review samples

Related posts:











source

Note that any programming tips and code writing requires some knowledge of computer programming. Please, be careful if you do not know what you are doing…

Leave a Reply

Next Post

Developers to begin creating on PraSaga blockchain, SagaChain - PR Newswire UK

Thu Sep 15 , 2022
Searching for your content…Phone +44 (0)20 7454 5110 from 8 AM – 5:30 PM GMT Contact Us +44 (0)20 7454 5110 from 8 AM – 5:30 PM GMT News provided by13 Sep, 2022, 13:00 BSTShare this articlePraSaga announces partial code release for patented blockchain operating system application frameworkZUG, Switzerland, Sept. […]
%d bloggers like this: