Log in

View Full Version : Problem with "Overlay"


krieger2005
4th May 2004, 13:44
Hi,

i use a simple Filter to remove MPEG-Artifacts. The Source has a bad quality and the filter does a good job but there a problem.
The Filter search for "extreme white Pixel" or "extreme black Pixel" and generate an mask, where these "extreme Pixels" are white and the rest black. Now i blur the image and try to overlay it on th "extreme pixels".
Here the code:


mask3=Unfilter(120,120).coloryuv(autogain=true).GreyScale.Levels(170,1,171,0,255)
Overlay(last, sauber, 0, 0, mask3)


"last" is the source-movie
"sauber" is the blured movie
"mask3" the mask, which i make above

Now the Problem:
When i use:

# sauber is white
sauber=BlankClip(length=framecount, width=width, height=height,
\ pixel_type="YV12",fps=25,color=$FFFFFF)


the hole frame became littlebit white (hope you understand what i mean). Can someone give me a tip how i can blend "sauber" into "last" with a mask only some points (and not the hole frame).

Didée
4th May 2004, 14:02
Simple answer, krieger2005.


mask3=Unfilter(120,120).coloryuv(autogain=true).GreyScale.Levels(170,1,171,0,255,coring=false)
Overlay(last, sauber, 0, 0, mask3)


By default, levels() will clip the in/output to 16~235 range. Therefore your mask has no true blacks or true whites, and you don't get the intended effect.
With "coring=false", no clipping will be performed, and that's just how you need it in this case.

- Didée

krieger2005
4th May 2004, 14:10
It works ;)

Thanks Didée