View Full Version : Erase background
bigplac
6th April 2004, 17:15
Hello,
I would like to know how can I erase a background in a 8 seconds video. In the video appears a baby in a cradle, and I want to change the background, leaving the baby as it is now.
Does anybody know how to do it?
It is a kink of delogo filter but invert.
Thanks.
Zarxrax
6th April 2004, 20:15
Doing something like that requires rotoscoping (frame by frame editing) of the image. You need a program like Adobe After Effects or Premiere+Photoshop to do this.
scharfis_brain
7th April 2004, 01:38
I think, that motionmaksing could help here.
emdiem
7th April 2004, 02:40
Motionmasking might be the way to do it, painting over every frame by hand is alot of work
Zarxrax
7th April 2004, 02:57
I don't see how motion could help anything... unless the cradle is rolling across the floor, lol.
esby
7th April 2004, 03:21
he could do frame by frame editing
with avs...
He needs to calculate the appropriate mask to apply for each frames...
There are three cases:
* the craddle is static on the picture:
In this case he needs to do a mask and apply it to the frames.
(quite easy)
* the craddle is moving on the picture, but moving.
In this case, he needs to adjust the coordinate of the mask for each series of frames where the craddle move.
* the craddle changes form and or move... in this case,
recalculating (redrawing) the mask at each frame will be needed.
In all cases,
have a look on Layer...
first case should look like that :
src = avisource("...")
mask = imagereader(".tga")
mask = mask.resetmask()
mask = mask.ColorKeyMask( XX , YY )
XX should be set according to the color used for alpha, YY is the tolerance eg XX = $00FFFFFF YY = 205 for 'white background'
dest = layer(src,mask,"add")
return dest
the mask should contain here the background you want to add, and white parts for what you want to keep.
If you want to alter the mask position , use x & y parameters of Layer()
Of course using after effects might be easier...
but you might do a somewhat correct job with that.
You just need to capture the picture, edit them correctly
and apply it to a script if you want to go without after effects like solution...
esby
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.