martin53
20th December 2012, 08:29
For the users working with amateur footage, maybe this can be of use.
With a clip shot in full shadow, and the camera's white balance locking on some 'about grey' objects, the skin tones looked greyish and too blue.
The code amplifies the U and V components in a small band, to shift skin towards a more typical range, without affecting the scene's overall color balance much.
Visually, it works wonders.
Masktools plugin v2.0a48 is needed.
centerlimitU = 1
spreadU = 5
centerlimitV = 3
spreadV = 5
mt_lut(uexpr=mt_polish("x >= "+string(128-centerlimitU)+" ? x : ( x < "+string(spreadU)+" ? 0 : (x <= "+string(128-centerlimitU-spreadU)+" ? x-"+string(spreadU)+" : 2*x-"+string(128-centerlimitU)+"))"), vexpr=mt_polish("x <= "+string(128+centerlimitV)+" ? x : ( x < "+string(spreadU)+" ? 0 : (x >= "+string(128+centerlimitV+spreadV)+" ? x+"+string(spreadV)+" : 2*x-"+string(128+centerlimitV)+"))"), y=2, u=3, v=3)
With a clip shot in full shadow, and the camera's white balance locking on some 'about grey' objects, the skin tones looked greyish and too blue.
The code amplifies the U and V components in a small band, to shift skin towards a more typical range, without affecting the scene's overall color balance much.
Visually, it works wonders.
Masktools plugin v2.0a48 is needed.
centerlimitU = 1
spreadU = 5
centerlimitV = 3
spreadV = 5
mt_lut(uexpr=mt_polish("x >= "+string(128-centerlimitU)+" ? x : ( x < "+string(spreadU)+" ? 0 : (x <= "+string(128-centerlimitU-spreadU)+" ? x-"+string(spreadU)+" : 2*x-"+string(128-centerlimitU)+"))"), vexpr=mt_polish("x <= "+string(128+centerlimitV)+" ? x : ( x < "+string(spreadU)+" ? 0 : (x >= "+string(128+centerlimitV+spreadV)+" ? x+"+string(spreadV)+" : 2*x-"+string(128+centerlimitV)+"))"), y=2, u=3, v=3)