libcamerasrc and formats?

Florian Echtler floe at butterbrot.org
Wed Mar 15 16:24:31 UTC 2023


Hello everyone,

I'm experimenting with a Raspberry Pi camera and would like to process the 
frames with OpenCV. Apparently, the "modern" way of doing so is through 
libcamera, and for OpenCV, this means using a GStreamer pipeline with libcamerasrc.

For efficiency reasons, I'd like to get a grayscale image directly from the 
camera to avoid unneeded conversions; so I used the following pipeline:

libcamerasrc ! 
video/x-raw,width=(int)640,height=(int)480,framerate=(fraction)30/1,format=GRAY 
! appsink

"GRAY" is listed as a supported format for the camera in the Video4Linux device, 
but I don't get a working pipeline when I try that. If I leave out the format 
parameter, then I'm getting NV12 (or I can pick something generic like RGB). How 
can I see which formats I can actually get out of libcamerasrc and the sensor?

Best, Florian
-- 
SENT FROM MY DEC VT50 TERMINAL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230315/cb0adab9/attachment.sig>


More information about the gstreamer-devel mailing list