I’m trying to generate a HDR bayer photo from 3 12bit-bayer photos with -2EV, 0EV and 2EV exposure settings.
The problem is the overexposed one will always bring pinkish color to the merged photo.
(The left one is merged with the overexposed image, the right one is without the overexposed image)
The exposure time of these three are:
1/131
s for -2EV1/121
s for 0EV1/60
s for +2EV
Let’s take three pixels for example, they are in the same position in the bayer photos:
> a = [372 * 131, 926 * 131, 543 * 131] // 3 pixels R,G1,B from frame -2EV / exposure_time
[ 48732, 121306, 71133 ]
> b = [1494 * 121, 3515 * 121, 2019 * 121] // 3 pixels R,G1,B from frame 0EV / exposure_time
[ 180774, 425315, 244299 ]
> c = [3567 * 60, 3514 * 60, 3492 * 60] // 3 pixels R,G1,B from frame +2EV / exposure_time
[ 214020, 210840, 209520 ]
I’ve tried a lot of different types of weight functions, none of them can avoid the pinkish effect in highlight. No matter which kind of weight function I use, as long as I bring pixels from c
into the HDR, I will get a pinkish result.
If I only use a + b
, then everything is good except I cannot get the better dark area pixels from c
.
So how to merge them properly?