View Single Post
Old 16th July 2010, 08:54   #55  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,544
You will easily find out where you land if you just add

#ConvertToYV12(interlaced=true)#Histogram needs YV12 !
histogram(mode="classic")
histogram(mode="levels")

before and after SmoothTweak/Curve/Levels.

Here is a small piece of my recent script to pre-compensate
a dead, overexposed and purple-sick film transfer.
First I had to shift the U and V planes using SmoothTweak,
leaving Y untouched
then I had to use SmoothCurve to
remap Y nicely and spread the U and V planes
to smoothly extend to saturated colours where they once belonged.
SmoothLevels were not needed in this case.

Code:
#/*#-------------------------------------------------------------LaTo's Smooth Adjust Set----------------------------------------------------------------
#ConvertToYV12(interlaced=true)#LaTo's Smooth set needs YV12 !
#Smooth means: internal results will be dithered, a smooth histogram will be achieved, banding avoided.
#It won't dither a source that came in banding !
SmoothTweak(Smode=4, strength=100, brightness=0.0, contrast=1.0, saturation=1.0, hue1=+2, hue2=-10, limiter=true)#Bright/Cont/Sat/Hue1(G->B)/Hue2(G->R)-Adjustments
SmoothCurve(Smode=4, strength=100, interp=100, limiter=true, \
Ycurve="0-15;16-16;127-120;200-180;220-195;230-202;240-210;248-218;255-230", \
Ucurve="0-16;100-40;127-127;140-180;255-240", \
Vcurve="0-16;100-80;135-127;140-135;150-160;255-240")
#SmoothCurve(Smode=4, strength=100, interp=100, limiter=true, \
#Ycurve="0-15;16-16;127-120;200-180;220-195;230-202;240-210;248-218;255-230", \
#Ucurve="0-16;100-40;127-127;140-180;255-240", \
#Vcurve="0-16;100-30;135-127;140-140;255-240")
#SmoothLevels(gamma=0.78, Lmode=2, Ecenter=128)#Gamma-Adjustments,Lmode=1: dark and bright stay unaffected,=2: dark stays unaffected, =3: bright stays unaffected
#SmoothLevels(0,1.2,255,32,235,Lmode=1,Ecenter=64,protect=16)
#*/#----------------------------------------------------------End of LaTo's Smooth Adjust Set-----------------------------------------------------------
P.S. While using splines, be aware of the intricacy of spline points.
If you specify these too close and too differing these may force steep curves
with negative slopes which you might not intend...
A print of the resulting transfer function would come in handy.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 16th July 2010 at 09:05.
Emulgator is offline   Reply With Quote