raw2dng - Generate virtual neutral reference frame with shot WB

Started by Andy600, March 26, 2014, 01:15:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy600

@a1ex - how easy would it be for raw2dng or raw_rec/mlv_rec to generate a virtual white balance frame?

Disclaimer: This may be nonsense because I'm half asleep and haven't properly thought this through  ???

This simple idea might help with adjusting WB in post (especially in apps like DaVinci Resolve) when something was shot without balancing to an 18% grey card.

If raw2dng can generate a simple neutral frame, but apply the white balance that was used in the image sequence currently being converted, it would give a perfect WB reference frame to balance to. I suspect it might be tougher to do in-camera with the raw/mlv module?

i.e. read DNG WB exif > generate virtual 18% grey card or even a virtual Macbeth chart > apply Exif WB and save along with the DNG sequence that is being converted. The generated image could be a simple white box or have WB and other meta data printed. Not sure about gamma but I guess 2.2 would be best if it was something simple like an 8bit Jpeg and linear 1.0 if it could be saved as a DNG file.

I have a virtual, Macbeth DNG image if it helps.

Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

a1ex

I'm not sure I understand it.

Raw files do not have any WB tags (they just use some default that doesn't look like alien colors), and for MLV, I'm not sure Canon tags are correctly converted to DNG (I don't remember seeing any Kelvin -> RGB code in mlv_dump, but maybe I missed it).

Filling a DNG with gray is very easy once you know the ratios.

Andy600

So the WB shown in Exif is derived from the matrix numbers? There is no point setting WB at all in camera then?

I need to wake up a bit to properly think this through but I'm sure there is something in this idea.
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

a1ex

WB in RAW EXIF is gibberish (hardcoded to whatever looked good to me on one of the first samples).

In mlv_dump, the call to dng_set_wbgain is commented out, so the WB info in these DNGs is just as gibberish as with RAW.

The MLV format does include WB data (Sunny, Cloudy, Kelvin or whatever), but we don't know how to convert it to DNG tags (RGB multipliers) properly. Canon knows :P

Andy600

Ah, Canon thwarting my ideas yet again  :'(

I'll keep on researching. We're doing things with ACES and CTL so might discover something in that.

Thanks for the info anyway
Colorist working with Davinci Resolve, Baselight, Nuke, After Effects & Premier Pro. Occasional Sunday afternoon DOP. Developer of Cinelog-C Colorspace Management and LUTs - www.cinelogdcp.com

Bassman2003

Andy, I don't think a generated white balance frame would be of much help.  You need the gray or white in the lighting environment of the scene to be proper.

Do you use something like a WhiBal card when you shoot?  If you use ACR you can just shoot a few frames of the gray card then use the color picker to set the white balance.

(Disregard if you already know this:) )

chmee

i coded something like that into raw2cdng (>= 1.3). do a cr2-picture, name it like the movie-file and the asShot-Value will be imported into dng's. The accuracy is depending on your picturecontent. its working quite good :)

regards chmee
[size=2]phreekz * blog * twitter[/size]