Removing Tracking Markers from Video.

Tracking on grass or asphalt can be difficult because there often aren’t any good objects to use as markers, so you need to place your own. In this video, Laustinart shows one way to remove markers, but it only works well if the camera isn’t moving too much. If the camera is walking through the scene you’ll need something else. I came up with the following technique that seems to work pretty well.

For markers, I used golf balls propped up on tees for shooting in the grass, and poker chips on the asphalt. (You can get hollow plastic golf balls at Wallmart pretty cheap. Get white ones. Yellow is too similar to green.) Avoid placing markers near shadows or anything else that might get Copy/Pasted into a wrong spot.

Start by using Laustinart’s technique for creating masks around each tracking marker. Don’t forget to parent each mask to its marker.
In the node editor, the Movie output splits in two, one going to an Alpha Over, the other going to a Translate node which then leads to the Alpha Over.

Create a Mask node for the mask that you made in the Movie Clip Editor. Give it some blur to make the edges less obvious. Plug the Mask into the Fac socket of the Alpha Over.

Now you’ll need to offset the second image a bit using the Translate node. How much and which direction may depend on your scene. If none of the markers leaves the frame you can probably get by with just using the “X” value. Use just enough that you’re sampling an area near the marker, but not getting the marker itself.
If markers are disappearing off the bottom of your movie, you’ll need to add some negative “Y” displacement.

Here’s the node setup for the grass scene…

And here’s the asphalt scene. The only difference is the asphalt scene only Translates in the X direction, while the grass scene uses both X and Y.

Here’s a video. I don’t have a decent video camera. I use my still camera which takes crummy video, and then Youtube makes it look even worse.:stuck_out_tongue:

I’d love to see what someone can do with an HD video.

This technique should help improve your camera solutions. You can place the markers in an orderly grid which should help when selecting the Origin, X, and Y axes. After you’ve got your solution, go into the 3D viewport, go to the Top view and see if these markers are in still in a grid. If not, it probably means your Camera Data is off.
If you bring a tape measure and measure the distance between markers, you can use that with the Set Scale feature.

Steve S

I noticed a little glitch in my initial test. When a marker went off the edge of the frame, the mask just sat there for the rest of the video.

This can be corrected in the Movie Clip editor by manually extending the tracks far enough off the edge of the frame so that the masks won’t be visible. But since you’re basically guessing where the marker is, this could affect your camera solution. So just end the tracks at the edge of the frame like normal, do your camera solution, then extend the tracks a few more frames past the edge to make the masks disappear.

Steve S

Do you think you can take markers off a human face? That would be great. Ill try but Im not good with nodes

The problem with this is that you get an absolute translation going on as in… if you look closely, the tracking mark locations swivel / change what is actually there… it probably would be more noticeable at HD resolution.

What i would do is pretty much the same, except doing it in a 3D scene… so once you have a 3D track, at the locator points, putting a plane which covers up the markers… Then, creating an image sequence of a stabilized footage, one center point, one for rotation… then make a loopable 12 or so frame sequence and then assigning this to the plane. this way it will respect what the camera is actually doing, and still looks decent.

Little bit more complex but for shots which rotate around a lot, its nessessary. If the camera doesnt have this sort of rotation translation then your method works fine

Yes, this will work for human faces.

It might be doable. I think you’d have to offset in the Y direction because the X distance between markers would change as the head turns from side to side. Even then I think it would be difficult as the markers start to disappear from view as the head moves.

I went and bought a halfway decent camera (1080p, woohoo!) I went out to film a quick test and I’m working on it now. One mistake I made is that I laid out the golf balls in 2 parallel lines (like runway lights.) The ones off in the distance are so close together that it’s difficult to track one without it trying to track the one next to it. Lesson learned. I’ll post a vid when I get it finished.

ETA: Here’s a before/after still from the test. I think this will work pretty well in most cases. The golf balls work really well as markers. They only times it lost track was when I need to resize the Pattern setting because the golf ball had gotten larger as it approached the camera.

Also keep in mind that any 3D elements added to the scene should help distract the viewer away from any minor problems with the marker removal.

Steve S

I just have a point and shoot. nikon coolpix L 610 point and shoot but it shoots high res.
This is my first attempt on a head with the blender camera tracking I wanted to do a transform head gear. It was to grow from a small device to a big( like in Stargate movie) but did not know how to track without painted dots. I almost got it with voodoo tracker.
I do see the tracking is not good in my video most track point are on a little wire thing with dots on it taped to her head.
Edit also shadows seem to be a pain in cycles. That’s why there are none I could not get them on a transparent object.

I’m working on that scene and I’m getting some strange behavior from the masks. When the marker makes a change in direction, the mask lags behind and doesn’t remained centered on the marker. Can it be made to remain centered?

Also, if two masks overlap they result in a Boolean Intersection. Can they be made to Add to each other?

ETA: Okay, you can ignore the first part of this post. Apparently my computer was just getting a little groggy. I shut it down to have lunch and now it seems to be working fine. I should probably be doing this on my desktop instead of my laptop. It’s better at handling stuff like this.

But does anyone know about the intersecting masks? That’s still a problem. Ideally I should refilm and make sure the markers aren’t so close together.

Steve S

I went back and reshot with the markers placed farther apart. It works really well. I thought you might be able to see where it’s been cloned over, but even knowing where the balls are I can’t see it.
And those bright white dots are soooo much easier to track. I used to get frustrated constantly having to reset after the software lost track of a marker. The only time it lost track on this video is when the marker got near the left edge.

Steve S

I decided to add Suzanne to the clip.

Steve S

Blender Cookie has an excellent tut on this (have to be citizen). It uses the ‘inpaint’ node to paint in where the trackers are.

Why is there nothing in the Blender Wiki about using this node? I don’t know if it would work in this situation since I can’t figure out how to use it. The only input socket is for the image.

On a side note, I came up with a way to avoid using the Bezier curves to make the masks. Do the camera solution and set up the scene in the 3D viewer.

Select one of the markers in the 3D scene, hit Shift-S and select Cursor to selected. Add a sphere and scale it down to the size you want for the mask. Paint it white and select Shadeless.

Duplicate the sphere. Select another marker, hit Shift-S, select Cursor to Selected, then select the duplicate Sphere, hit shift-S and select Selected to Cursor.

Repeat this process for all the markers. You’ll need to prerender the mask.

Steve S

The paper grew steadily for years. Then growth exploded in 2010 when The Contributor went from selling fewer than 10,puma ???,000 papers in January to nearly 120,000 that December. Average sales in 2011 stayed high at more than 110,000 papers a month and dropped only slightly in 2012,??? ?? ??, when The Contributor increased publication to every two to three weeks… Srinivasan folks wanted their relatives back in Chennai,Louboutin Sale, India,Timberland Outlet, to see the wedding ceremony at the Taj Boston in real time, but the bride herself had concerns. Friend got married in January and it was a mess,???(puma), she said. Sound cut in and out and no one could see. Good quality mac n cheese. I go a little light on the butter and cream and add a little more cheese. I TMll even shred my own. It’s so hazy and unformed that you can’t even be sure what it was trying to be about. At its most simple level, it’s about a father and step mother to two teenage misfits. The son hides in his room all day working on a video game program he insists will get him a scholarship to a great college. I graduated as an MBBS doctor and at present works as a Lecturer in Medical Education at the University of Colombo. My interests are mainly in the field of Medical Education,prada ???, Education Technology and Bio Medical Informatics. I am also a PhD Research Fellow at the University of Oslo and focuses my research towards using Online Learning for Health Professional Education. Is no drug that is the best,???, said Dr. Laurence Levine,prada ??, a professor in the department of Urology at Rush University Medical Center in Chicago,??? ??? 1, who was not a part of the Stendra study. Patient own chemistry may make one drug better than another. I prefer to some bright colors in this 2012 summer and coming fall season so much. So, i collected some stunning yellow prom dresses here. Friends can help me make the right decision. Who is this guy? That was the question I asked after dinner of my British tablemates and others in attendance. To my surprise, a reply that I heard more than once was,??? ??, “He’ll be Prime Minister someday.” I was floored. A thirtysomething being touted as a future prime minister by some fairly astute observers of the political scene? I then decided to look further into this new political phenom… 3. Email far away friends regularly to share your triumphs, failures, life’s beauty and simple stories of your daily life. Sometime we miss out on the details of the lives we care about the most, so try to reach out and let these people glimpse in to your life so they feel connected to you and what you’ve got going on. ???: Kerry declared at an opening news conference curiosity Scott Sternberg at ease with himself. I used to pick up many

Regarding face dot removal. inpaint would be good but I made a tracking distort effect recently, that stabilises a face then alters it. After which you un stabilise the result. I wonder if the clone would be easier to apply in this stabilised area?

Hope I’m jumping in here at the right place. I agree that if the camera is moving including rotating, especially around the lens axis, a simple offset of the fill copy of the video would be obvious. I have been looking for a way to use several masks but each one independent in settings and with multiple fill copies each with a different offset and/or rotation, perhaps even animated to better match the front copy.

Can multiple independent masks be used? Can anything be done with mask layers? I’m not finding answers (yet) to these questions. Thanks. Dale