White balance fix for dual ISO

#453 Merged at 64f1d91
Repository
Magic Lantern 50D
Branch
cr2hdr-wb
Repository
Magic Lantern
Branch
unified
Author
  1. Albert Shih
Reviewers
Description

Previously, DNGs created by cr2hdr for dual ISO shots would all have the same white balance. That's because AsShotNeutral would always be set to a default "0.473635 1 0.624" in the DNG, regardless of the shot. On some cameras, these multipliers would not look too unreasonable for typical pictures, but on other cameras (50D), the temperature and tint would be very unrealistic.

In this PR, the DNG incorporates the white balance information recorded in the CR2.

  • For all white balance modes aside from Auto White Balance (AWB), the DNG has the assigned white balance. Switching between regular shots and dual ISO shots should be seamless.
  • For AWB, the DNG will use the white balance measured by the camera. This measurement will be affected by the saturation of pixels, so having one ISO significantly overexposed will bias the white balance. Also, this approach may bypass Canon's logic for determining what is a reasonable temperature. In some situations, this can be a good thing: the 50D may white balance tungsten lighting better without Canon's logic.

This needs testing by others across the range of models!

Forum discussion: http://www.magiclantern.fm/forum/index.php?topic=10265.0

Comments (1)