Innovative solutions for post production professionals

Patching a Video Background Using Photoshop

You just shot a really exciting seminar and can’t wait to get back to the studio to review the footage. The guest speaker looks great – the lighting, framing and focus are right on! Then to your dismay, you see it – the unwelcome item in the background. It could be a glaring red “Exit” sign, a restroom sign, or anything else that you find distracting or annoying, including a wayward bystander. Well, there is hope.

The technique discussed here works for video shots that are “locked down,” meaning the camera is on a tripod and doesn’t move. Movement includes zooms – the scene must be static! This would often be the case for an interview, a speaker at a podium, or an unmanned balcony camera at a wedding. The idea is that you don’t want the background to move – it must be totally stationary for this trick to work. Also, no part of the subject’s body can move in front of the item you wish to remove.

On a recent interview shoot, I set up some additional lighting off to the side of my subject. The light caused a bit of a reflection on the glass of a picture frame in the background, but I didn’t think much of it – until I got back to the studio and reviewed the clip on the HD big screen. My “little” issue was no longer so tiny. In fact, it was suddenly commanding a lot of attention, to the point at which I was considering a do-over! I then realized that in just a couple of minutes, I could easily “fix it in post,” as the saying goes.

In this example, I’m editing with Premiere CS3 and using Photoshop CS3 for the graphics work; however, any NLE should work, as well as other paint programs that work with layers and save to formats that include an alpha channel.

The first step in the “fix” is to use your NLE software to “grab” a frame of the video clip that clearly shows the offending item. In CS3, just position the play head on the desired frame on your timeline, and use File > Export > Frame to create a still image of the video frame. The file format shouldn’t matter – I used the default .bmp file type. CS4 (and other NLEs) will have different methods of exporting a still, but just access the HELP menu if unsure of how to export a still from the video.

In my example, the offending clip is 1080i HDV, so the frame size is 1440×1080 pixels. Note that 1080i HDV uses a PAR (Pixel Aspect Ratio) of 1.333, so when I import the still grab into Photoshop, it no longer looks like 16:9 widescreen video – it appears more square like a 4:3 image. The reason for this is that paint programs assume “square pixels” with a 1.0 PAR, so video grabs may appear distorted.

It’s important to realize that if you were to use the “Circle” tool in Premiere to create a perfect circle on this grabbed image, the circle would look oblong when viewed back in Premiere, since the 1.333 PAR of the video project would “stretch” the image horizontally. Not to worry – in Photoshop, just go to Image > Pixel Aspect Ratio and choose the correct PAR preset to match your video format. This tells Photoshop how to interpret your image shape and everything will then come out right.

I next use the Clone Tool to replace the area I want to remove with clean background from the surrounding area. If you don’t know how to use the Clone Tool, check the HELP menu or Google it and you’ll likely find many tutorials.

Cloning allows me to “paint” using other areas of the image as my “color,” so I can choose a clean area of wall for instance and paint that over an EXIT sign. In this example, I need to touch up the corner of the picture frame. It doesn’t have to be perfect, since I’ll be the only one that’s looking for it. The casual viewer is watching the subject and would probably never notice if the fix isn’t perfect.

Once the offending area is painted out of the picture, the next step is to isolate that area. I first create a New Layer, then turn off the Background Layer so it’s transparent. Working on the topmost image layer, I use the Rectangular Marquee tool to draw a box encompassing the repaired area of my image, then use Select > Inverse (Ctrl + I) to Invert the selection, thus choosing everything outside the selected area. Hitting the DELETE key removes everything but the repair area, leaving me a nice patch to overlay above my video clip in Premiere. For irregular shapes, you can define the selection with the Lasso tool and freehand a shape.

Next, SAVE the image using a file format that retains the alpha channel (the transparent area that was just cut out). I use the Photoshop .psd format since Premiere likes it. During Import into Premiere, be sure to choose the correct layer of the .psd file that you wish to display.

In Premier, just put the overlay on any video track above your original video clip and it should mask out the offending area. Note that if the lighting should change during the scene, your patch may become visible since the surrounding area can become lighter or darker. I made a patch to cover a stain on a church carpet in a wedding video, and it looked great…for a while! During the wedding, some clouds moved in to block the sun, changing the lighting in the church, and then “the patch didn’t match” the surrounding carpet (I decided to leave the stain).

If you have the Photoshop skills, adding some transparency to the edge of the patch may help it to blend in better, though with consistent lighting, even a hard-edged patch should be invisible. Having put my patch over the glaring photo frame, it looks perfect and I can again sleep at night. Since I edit with the Matrox RT.X2 realtime edit hardware, no rendering is required. Premiere software editors may get a red render bar.

There is another fix along these same lines that you may find useful. Say you have a great shot, then someone wanders into the frame in the background. Grab a still from a frame of the video clip that has a clean background, then another frame with the offender in the background. Open both frames in PS, then Copy and Paste the bad image over the clean image, each on its own layer. Using the Lasso tool, draw around the bad guy. Disable the bad layer and select the good layer. You should still see the “marching ants” of the Selection box (now over the good layer) – Invert using Ctrl + I and delete the background. There’s your good patch of background to hide the offending body.

Note that I would never remove the good Padre from a wedding video – this is simply an example video clip I had handy.

As discussed, this will not work if your camera moves at all, but in many situations it can provide quick and satisfying results. If you have decent Photoshop skills, you could even use this overlay method for product placement, company logos, or whatever else you might want to add in to the background. Change the Cola can to a Root Beer, or whatever you need to do. Have fun with it!

1 comments
Jeckyjen
Jeckyjen

Creative article. Indeed, I have strong experience on patching a video background using Photoshop. But I want to learn more about it. At this time, I have go through this full essay ups and down. Any way, Many many thanks for your great sharing.

http://www.clippingteam.com/

Share
Share with your networks.
Patching a Video Background Using Photoshop