So I've done a bit of work trying to figure out how to invert the white balance of my image, but I'm seeing some counterintuitive behavior from the white balance process, and I'm hoping you can provide me some insight into what's going on. I compiled libRaw with DCRAW_VERBOSE enabled to get some transparency into what white balance coefficients were actually getting used, and this is what I'm observing.
If I make no change to any white balance settings, I get: multipliers 2.858569 1.000000 1.338857 1.000000
If I run this loop, which inverts the white balance value for each channel:
for(int i = 0;i < 3; i++) {
if (ImageProcessor.imgdata.color.cam_mul[i] != 0) {
ImageProcessor.imgdata.params.user_mul[i] = 1 / ImageProcessor.imgdata.color.cam_mul[i];
}
}
I can see that my user_mul values are set correctly, but the draw_process uses different values for some reason.
I even tried manually setting the user_mul values, but got the same result. I'm sort of at a loss for where the multipliers that get used are coming from.
So I've done a bit of work trying to figure out how to invert the white balance of my image, but I'm seeing some counterintuitive behavior from the white balance process, and I'm hoping you can provide me some insight into what's going on. I compiled libRaw with DCRAW_VERBOSE enabled to get some transparency into what white balance coefficients were actually getting used, and this is what I'm observing.
If I make no change to any white balance settings, I get: multipliers 2.858569 1.000000 1.338857 1.000000
If I run this loop, which inverts the white balance value for each channel:
I can see that my user_mul values are set correctly, but the draw_process uses different values for some reason.
user_mul: 0.418985 1.000000 0.599532 0.000000
multipliers 1.000000 2.386720 1.430915 2.386720
I even tried manually setting the user_mul values, but got the same result. I'm sort of at a loss for where the multipliers that get used are coming from.