Can CHDK control White balance? - RAW Shooting and Processing - CHDK Forum

Can CHDK control White balance?

  • 3 Replies
  • 4896 Views
Can CHDK control White balance?
« on: 06 / February / 2011, 18:02:17 »
Advertisements
I know that CHDK can develop a RAW file, but that option seems to be not available for DNGs. I'm not sure about the reason, because CHDK can convert the DNG to a RAW. The problem with RAWs is that the resulting jpg is made with the camera's current white balance because RAW files lack that info... but DNGs have it! So, my question is about the possibility of controlling the white balance from CHDK. That is, if white balance were accessible from CHDK, then it could read the pixels and the white balance from a DNG, set the camera's white balance and develop to a jpg using a right white balance. Maybe the problem is no control over white balance?

*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: Can CHDK control White balance?
« Reply #1 on: 07 / February / 2011, 15:01:21 »
The direct reason for DNG develop not existing is because it would be slightly more complicated than RAW develop, because DNG would need to be converted to RAW first and AFAIK only code for the opposite currently exists. Probably not difficult, but since RAW develop probably isn't used all that much (especially not by developers), nobody's done that.

But this white balance thing... I always thought RAW develop was there mostly so you could quickly see whether your RAW average succeeded or not, and to experiment with fooling the camera's white balance deduction into doing things it doesn't normally do or to apply several camera white balances to the same exposure.

So getting the original JPEG white balance vector from the DNG file doesn't make much sense since it's already stored in the JPEG unless you deleted it (keeping in mind that most real work with color adjustment should really be done outside the camera).

Anyway, I'm not sure if anyone's ever tried coding a white balance override -- so that would require experimentation that could either work or fail. WB override might in fact be a nice idea for timelapses and similar photo series where you might want to use one of the white balance presets for convenience but don't wan't the automatic fine tuning to change your colors between shots or would like to store more than one custom manual white balance setting for years to come.

*

Offline SkyWalker9

  • ****
  • 301
  • SX20 IS (fw 1.02b)
Re: Can CHDK control White balance?
« Reply #2 on: 07 / February / 2011, 16:01:32 »
I know that CHDK can develop a RAW file, but that option seems to be not available for DNGs. I'm not sure about the reason, because CHDK can convert the DNG to a RAW. The problem with RAWs is that the resulting jpg is made with the camera's current white balance because RAW files lack that info... but DNGs have it! So, my question is about the possibility of controlling the white balance from CHDK. That is, if white balance were accessible from CHDK, then it could read the pixels and the white balance from a DNG, set the camera's white balance and develop to a jpg using a right white balance. Maybe the problem is no control over white balance?
If I'm understanding you correctly, it appears you need a capability to create JPGs with differnt White Balances using the original DNG. This capability does exist in CHDK indirectly using the CHDK "DNG -> RAW" and "RAW Develop" options to accomplish this...

First you need to create a RAW file (a non-destructive conversion) using the DNG to RAW option:
- CHDK>Miscellaneous stuff>File browser
- Navigate to the DNG folder.
- Highlite the DNG file to convert to RAW using "Right" button
- Press "Left" button for the "DNG -> RAW" option.

Using the new RAW file you can then apply any White Balance you can set on your camera to create different JPGs (with different WB) using the CHDK RAW Develop option (CHDK Main Menu>RAW parameters>Raw develop). For example, if you shot the DNG/CRW using a Tungsten setting and you want to have the JPG created for Daylight, be sure to have your WB set to Daylight before "developing". I've had to convert/re-develop a couple of JPG with the correct White Balance several times after I forgot to reset my White Balance after using Tungsten lighting. Here is an earlier posting on Raw Develop: http://chdk.setepontos.com/index.php?topic=6018.msg59771#msg59771

Re: Can CHDK control White balance?
« Reply #3 on: 07 / February / 2011, 17:25:25 »
I think that direct developing of a DNG is possible because the conversion from DNG to RAW is possible and a RAW can be developed.  And yes, the solution would be to develop the RAW with the nearest white balance (daylight, tungsten, etc.). I also know that I can develop with any WB in my computer, but the same I could say about averaging RAWs and this option exists in CHDK.

The problem is that I'm developing a HDR process (first in my computer, later in CHDK) that takes three DNGs and produces a final DNG with a non standard WB (although the original DNGs have been shoot with a preset WB). But at least I can store that special WB in the final DNG.  So developing with the present CHDK will always produce "bad" jpgs for those HDRs, and I was thinking on the users that will want to see the HDR in their cameras in situ (just a bonus). In conclusion, the same way we can fool the camera when developing a RAW file, maybe we could also fool the camera about the white balance it must use when developing a DNG, and not necessarily the classical WBs, but anything (three factors: red, green and blue).

That's the reason I posted originally this question in the Development section, because I knew the actual options for RAW, but I wasn't sure about the control over white balance with CHDK (well, posting in the RAW section was my second option). So, if that WB control doesn't exist, then this question would be a suggestion to study and include this WB control in CHDK.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal