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

Camera board • Re: object_detect_draw_cv Color Options?

$
0
0
Indeed, I think the images in that function are YUV420 format, but OpenCV generally has fairly limited support for that meaning it has to get treated as a "CV_8U" image which boils down to greyscale.

If you were able to code up a custom application then you could possibly use some kind of RGB image instead of YUV which would spare you these kinds of headaches. Though obviously whether that makes sense depends on your application.

Another thought, as I think you tried, would be to convert the YUV20 image to RGB and add the text there. The catch is that you'd have to convert it back and overwrite the original source image, otherwise you won't see the results. I wrote some code to do this once - it's in Python unfortunately but it might still be a useful reference: https://github.com/raspberrypi/picamera ... 1929381403

Statistics: Posted by therealdavidp — Mon Mar 11, 2024 10:03 am



Viewing all articles
Browse latest Browse all 8013

Trending Articles