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

Camera board • Re: Obtaining ROI of YUV420p image stream during post-processing

$
0
0
Hi, yes I think most of your problems come from the fact that you have YUV420 images, and OpenCV's support for this format is limited. You can convert to RGB, treat it as a single channel greyscale image, and I think that's about it. It doesn't understand that you have YUV420, and it doesn't know how to crop a region from it.

I wrote some code once that does something a bit like what you want, in that it crops out a YUV420 region, converts to RGB, writes some text on it, and then puts it all back again. It's in Python, so it's not directly what you want, but it may help you to see what you're up against. You can find it here.

Depending on your exact scenario, there may be other solutions. For example, the video encoders should accept RGB input, and YUV420 is principally used because it's more efficient in terms of memory size and bandwidth. So anyway, depending on what you're prepared to tinker with, you might have some luck using an RGB stream instead.

Statistics: Posted by therealdavidp — Mon Aug 19, 2024 3:13 pm



Viewing all articles
Browse latest Browse all 5974

Latest Images

Trending Articles



Latest Images