~martijnbraam/Megapixels#43: 
Rewrite the raw data to the correct whitebalance for ov5640

The "raw" pixels from the ov5640 are 8 bit raw and the whitebalance is done by adjusting the R/G/B gains in the analog part of the chip.

DNG raw expects the raw data to not be whitebalanced and have the R/G/B gains for what the camera decided was "camera neutral" stored in metadata. The way to fix this would be to scale up the 8 bit data to 16 bit channels and then multiply the color channels with the inverse of the analog gain in the sensor and then write the gains as metadata in the DNG file.

This way photo processing apps can show the right white balance, but more importantly: without the correct whitebalance the second set of colormatrices in the dng can't be used since they are interpolated based on the whitebalance metadata. The current DNGS are single-illuminant calibrated for D65 light and look way worse when photos are made indoor.

Status
REPORTED
Submitter
~martijnbraam
Assigned to
No-one
Submitted
3 years ago
Updated
2 years ago
Labels
No labels applied.

~benjamin-schaaf 2 years ago

Register here or Log in to comment, or comment via email.