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

Camera board • Re: MJPEG streaming sample code, blue looks green but photo comes out correct

$
0
0
It's almost a fundamental axiom of image processing that there's a 50-50 chance you've got red and blue the wrong way round. In this case, the problem may be that OpenCV and PIL take a different view on which way round red and blue are. As an alternative to the (relatively slow) software conversion that swaps them, you might might do better to avoid PIL completely and stick within the OpenCV world. I assume you're using PIL to decode a JPEG buffer? cv2.imdecode should do the job too.

Statistics: Posted by therealdavidp — Mon Feb 16, 2026 8:34 am



Viewing all articles
Browse latest Browse all 8609

Trending Articles