I need to get rid of the background for a video.
A snapshot of the video I have is given on the following link:
www.moviecharts.com/dummy/dummyPicture.JPG
The character in the video has been cut out.
What I need to do is take out the background and just have the character.
OK... yes... I now know that I should have taken the video with a blue or green background... or failing that a pure white background.
Unfortunately, I've only got the video I have and we can't do a retake.
I've tried dabbling with After Effects and haven't really got anywhere.
ANY help/suggestions would be appreciated.
Thanks.
Omar
+ Reply to Thread
Results 1 to 18 of 18
-
-
I think we need a little more information about the source and the goal. Is this DV-AVI footage, film, mpg2, etc.? You say you want to remove the background from the character, do you intend to replace it with a different background video? How much action is involved with the character? Are you hoping to retain any shadowing? Is this for a home project or something that you are doing for someone else, (semi-pro)?
If it were me with my non-existant budget, and no high level tools, but plenty of time on my hands, I would probably extract all of the frames to individual stills and do one frame at a time in a photo editor, but obviously that will take a very long time and the reward would really have to be worth it."Shut up Wesley!" -- Captain Jean-Luc Picard
Buy My Books -
thanks for the reply.
much appreciated.
i have the original dv footage.
ideally i'd like to have a 'transparent' background.
(is that possible!?)
failing that, a pure white background would do.
there isn't much movement.
just the odd arm waiving, nothing else.
bo shadows required (in fact i wish they weren't there!)
it's for a project i'm doing for a client.
the project has dragged on and on and on.
i need to finish asap.
so... i would kinda say semi pro.
high level tools?
i have the use of lots of advanced software.
be it on mac or pc.
what tools would be best to use?
time...?
erm... don't really have it.
how much would it cost to hire someone to edit about 6-7 minutes video altogether? -
I'm still confused about your goal. Is your final output destined for DVD? or a Web display? or a computer graphic animation? Or are you hoping to mix this with some other footage? For example to have this character standing in front of your clients product.
what tools would be best to use?
how much would it cost to hire someone to edit about 6-7 minutes video altogether?Strictly amateur here, so I have no idea, but probably more than you'd get from your client
"Shut up Wesley!" -- Captain Jean-Luc Picard
Buy My Books -
sorry... misunderstood.
the video footage is for an interactive cd.
the end video display will be shown in full size.
hmmm... is there anywhere where there is a place for freelancers doing video work? -
It's going to take you a while but can be done. I use Ulead Mediastudio Pro which has a Video Paint module. This allows individual frames to be worked on in a workspace very similar to a photo editing package. You would need to do each frame at a time, but it wouldn't take too long as the bulk of the background can simply be erased, it's only close to the edges that will need a bit more care. There's a 30 day trial of Ulead MSP available from www.ulead.co.uk but I have a feeling that not all of the modules are there in the trial. It wouldn't be a lot of use if they don't give you the Video Paint module.
-
Do you have a shot of the background without the person? Or, did the person move away from the area you marked off at some point (so you could cut/paste to get a clear background image)? If so, there is some hope that you could make the background transparent, although it may not work perfectly.
The basic idea is to compare each frame to the background image. Where the picture is significantly different than the background will be the person, the rest transparent. I've used this technique with live webcam video (in software I've written). The background must be constant -- lights changing intensity or the person's shadow falling on the wall will mess up the effect. The camera must be perfectly still too.
This can probably be done with an Avisynth script though I don't know it well enough to write one for you... -
well... yes and no.
i have the background with the character in a different place.
but, the camera is moved to a slightly different location.
can i still use the footage to do as junkmalle suggests?
i've uploaded 7 seconds in the following link:
www.eregeneration.com/andresample/andreSample.avi
it's the raw dv footage, so it's 22MB in size.
have a look at that (if you can download!)...
and tell me what you think.
thanks.
om -
AVISynth doensn't have an EXE like you're expecting. You create text based script files that AVISynth uses to process and feed video to another program. You open the script file as if were a video file in the other program, AVISynth is automatically invoked to process the script.
-
so what might the other program be?
virtual dubmod?
and y can't u do what avisynth does in the other program by itself...? -
You can use After Effects to pull a Difference matte if you have the same scene without your subject matter. (i.e. a blank background) The plugin looks at what's different in the two scenes and keys out what is the same. It's not perfect, but you can use a matte choker plugin downstream to clean up the key a little. This might be the quickest way. The only other way I can see is to rotoscope a mask around her and adjust for every frame...eww!
-
I don't know AVISynth very well but with a little searching and experimenting I was able to come up with the following script:
Code:LoadPlugin("C:\Program Files\AVISynth 2.5\plugins\MaskTools.dll") # get the foreground to overlay src = AviSource("fg.avi") #make a YV12 copy of it for the mask src12 = ConvertToYV12(src) #load the clear background to be replaced bg = ImageSource("bg.bmp").ConvertToYV12() #load the new background image newbg = ImageSource("newbg.bmp") #make a mask and contrast stretch it mask = YV12Subtract(src12, bg, 10, false).ColorYUV(2560, -50, 0, 0) #alternate mask with edge smoothing #mask = YV12Subtract(src12, bg, 10, false).ColorYUV(2560, -50, 0, 0).SeparateFields.Blur(1.0).Weave Overlay(newbg, src, 0, 0, mask, 1)
I manually created a clear background image with Ulead PhotoImpact's Clone paintbrush tool. I just did a quick dirty job, you can do better if you want to take the time. JPG uploaded here, original was BMP.
I used some color bars as the new background. Here's a sample of the result:
As you can see there are a few defects. Her lower legs and feet are partly transparent. Her white shirt is transparent. You might be able to tweek the parameters to get a little better result. -
Here's my attempt. I can't say i'm really satisfied with it
Used script:
Code:c = AviSource("D:\Temp\andreSample.avi", fourCC="dvsd", pixel_type="yuy2") c2 = c.KernelDeint(order=0) # deinterlaced for simplicity im = ImageSource("D:\Temp\bg.jpg").ConvertToYUY2().Loop(c2.framecount-1) diff = subtract(c2,im) # the color $7d7d7d is taken from the clip "diff" # (between rgb = 100,100,100 and rgb = 150,150,150) # can be obtained by corel photopaint for example mask_clip = diff.ConvertToRGB32().ColorKeyMask($7d7d7d, 20) Overlay(ColorBars(), c2, mask=ShowAlpha(mask_clip), mode="blend", opacity=1) Trim(0,c.framecount-1)
Similar Threads
-
Cant get rid of aliasing
By killerteengohan in forum RestorationReplies: 7Last Post: 7th Feb 2012, 23:33 -
Can't Get Rid of Noise
By EmpireStrikesBack198 in forum RestorationReplies: 6Last Post: 9th Mar 2010, 06:21 -
getting rid of the letterbox
By jagsman in forum Video ConversionReplies: 4Last Post: 16th Oct 2009, 16:03 -
How to get rid of windowboxing?
By Levina in forum MacReplies: 8Last Post: 10th Jun 2008, 19:47 -
getting rid of vista
By sue1951 in forum ComputerReplies: 12Last Post: 6th Aug 2007, 21:53