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

C/C++ • Re: Modify the rpicam-apps, use OpenCV function, fail to show RED color

$
0
0
I wonder if the conversion back to YUV is creating a new buffer, but I don't really know. My instinct would be to simplify what you've got so that you can figure out what's happening. I would forget about drawing boxes for the moment, and alter your code to do this:

1. Convert YUV image to RGB.
2. memset the entire RGB image to zero.
3. Convert the RGB image back to YUV.

This should make it easy to check whether the first few bytes of the YUV image (taking care to go back to the original buffer pointer) have changed. It will also be extremely obvious once you've got the conversion going back into the correct bit of memory, because the images will be all black. Only once that's working, try again with bounding boxes.

Statistics: Posted by therealdavidp — Tue Jan 28, 2025 10:27 am



Viewing all articles
Browse latest Browse all 5039

Trending Articles