android/camera-samples

Incorrect colors - greenish image

laheller opened this issue · 1 comments

On my Samsung Galaxy A54 5G device when I try to convert from YUV420 to RGBA, the result image is however correct, but it has a kind of green tint. The way how I do the convert is inspired by the HDRViewFinder demo application's renderscript kernel code.
The HDRViewFinder demo app itself gives correct image & correct colors without green tint, but in my case on Xamarin.Android platform I unfortunately cannot use custom renderscipt, because it is not supported.

More info & my sample code in the following stackoverflow post:
https://stackoverflow.com/questions/78374905/android-camera2-yuv-420-888-image-to-rgba-bitmap-conversion-produces-a-greenish

@alexcohn
I saw your comments and example codes at many many similar questions, you maybe know the reason or just give me some hints, what I am doing wrong.

Problem solved, however not sure, why this helped:
Before taking the YUV420 format picture I had to change camera2 WhiteBalance settings from Auto to Fluorescent.