Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5190

Camera board • Re: Preview.DRM not working Picamera2 and GS camera

$
0
0
...
one question, what is the added value of the "pre_callback" - "which allows you to draw on the camera image before it is rendered", is it faster? (I use only grayscale images which is why I use the Y values from the YUV420 format.
Hi again, not 100% I understand the question.... is it faster than what? Though if you want to use the built-in preview windows, then it is the only place you can get hold of the image before it goes to the preview, you couldn't "capture" the image and draw on it anywhere else in time to guarantee any change would be displayed.

Mostly I would use the pre_callback for drawing on an image if you want the change to appear on images or videos that you capture and save. If you don't, then it may be worth using the preview window's overlay instead. (Or of course you could draw on and display a stream other than the one you save.) But the pre_callback is mostly just an easy way to do "something" on every frame without having to find another thread to put the code in. Such as logging for statistics or debugging, I generally wouldn't recommend doing "much" in the callback because you are directly in the camera loop.

Statistics: Posted by therealdavidp — Thu Jun 27, 2024 4:54 am



Viewing all articles
Browse latest Browse all 5190

Trending Articles