superqix
11th June 2007, 10:34
I search a fast and precise mode to calc the variance of single frame.
I write this function
Function var(clip c)
{
global c1=c
global c2=c1.levels(0,0.5,255,0,255,coring=false)
scriptclip(c,"subtitle( string( AverageLuma(c2)*255-Pow(AverageLuma(c1),2) ) )" )
}
but the error is +-128
Could you help me
:thanks:
I write this function
Function var(clip c)
{
global c1=c
global c2=c1.levels(0,0.5,255,0,255,coring=false)
scriptclip(c,"subtitle( string( AverageLuma(c2)*255-Pow(AverageLuma(c1),2) ) )" )
}
but the error is +-128
Could you help me
:thanks: