ArticleslgStudy

science

Video matting

Video matting is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Video matting rather than just read about it. In short: Video matting is a technique for separating the video into two or more layers, usually foreground and background, and generating alpha mattes which determine blending of the layers. The technique is very popular in video editing because it allows to substitute the background, or process the layers individually.

Video matting — main illustration
Video matting — illustration

Key takeaways

  • Video matting belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Video matting to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Video matting from memory before moving on to harder problems.

Reference excerpt

Video matting is a technique for separating the video into two or more layers, usually foreground and background, and generating alpha mattes which determine blending of the layers. The technique is very popular in video editing because it allows to substitute the background, or process the layers individually.

Video matting methods

Problem definition When combining two images the alpha matte is utilized, also known as the transparency map. In the case of digital video, the alpha matte is a sequence of images. The matte can serve as a binary mask, defining which of the image parts are visible. In a more complicated case it enables smooth blending of the images, the alpha matte is used as the transparency map of the top image. Film production has known alpha matting since the very creation of filmmaking. The mattes were drawn by hand. Nowadays, the process can be automatized with computer algorithms.

The basic matting problem is defined as following: given an image I {\displaystyle I} , compute the foreground F {\displaystyle F} , background B {\displaystyle B} and alpha matte A {\displaystyle A} , such that the equation I = A F + ( 1 − A ) B {\displaystyle I=AF+(1-A)B} holds true. This equation has trivial solution A = 1 {\displaystyle A=1} , F = I {\displaystyle F=I} , B {\displaystyle B} is any image. Thus, usually an additional trimap must be provided as input. The trimap specifies background, foreground, and uncertain pixels, which will be decomposed into foreground and background by the matting method. The main criteria for video matting methods from a user perspective are following:

Accurate edge processing Time stability Minimal user intervention

Learning-based Methods Deep learning methods are based on learning distribution of visual content from data, and use that knowledge for video editing. An early deep learning method was developed for image matting in 2017, which improved over most traditional methods. OmniMatte extended the video matting problem to associate objects that appear in a video with their artefacts: Shadows, reflections, and perturbations of the environment. They showed that a model can be trained to separate a given video into its OmniMatte layers. GenerativeOmniMatte showed how the task can be achieved by far less data by fine-tuning a generative video diffusion model. That model has already learned the distribution of video content for the purpose of generating videos. Finally, OmniMatteZero showed that separation into onimatte layers does not require training at all, but can be achieved using the internal representation of a pre-trained text-to-video model.

No-learning Methods The first known video matting method was developed in 2001. The method utilizes optical flow for trimap propagation and a Bayesian image matting technique which is applied to each image separately. Video SnapCut, which later was incorporated in Adobe After Effects as Roto Brush tool, was developed in 2009. The method makes use of local classifiers for binary image segmentation near the target object's boundary. The results of the segmentation are propagated to the next frame using optical flow, and an image matting algorithm is applied. A method from 2011 was also included in Adobe After Effects as Refine Edge tool. The propagation of trimap with optical flow was enhanced with control points along the object edge. The method uses per-image matting, but temporal coherence was improved with a temporal filter.

Benchmarking Video matting is a rapidly-evolving field with many practical applications. However, in order to compare the quality of the methods, they must be tested on a benchmark. The benchmark consists of a dataset with test sequences and a result comparison methodology. Currently there exists one major video matting online benchmark, which uses chroma keying and stop motion for ground truth estimation. After method submission, the rating for each method is derived from objective metrics. As objective metrics do not represent human perception of quality, a subjective survey is necessary to provide adequate comparison.

Practical use

Object cutout Video matting methods are required in video editing software. The most common application is cutting out and transferring an object into another scene. The tool allows users to cut out a moving object by interactively painting areas that must or must not belong to the object, or specifying complete trimaps as input. There are several software implementations:

An interactive video cutout system Adobe After Effects Rotobrush tool Adobe After Effects Refine Edge tool YUVSoft Matting plugin for Adobe After Effects To enhance the speed and quality of matting, some methods use additional data. For example, time-of-flight cameras had been explored in real-time matting systems.

Background replacement Another application of video matting is background matting, which is very popular in online video calls. A Zoom plugin had been developed, and Skype announced Background Replace in June 2020. Video matting methods also allow to apply video effects only to background or foreground.

3D video editing Video matting is crucial in 2D to 3D conversion, where the alpha matte is used to correctly process transparent objects. It is also employed in stereo to multiview conversion.

Video completion Closely related to matting is video completion after removal of an object in the video. While matting is used to separate the video into several layers, completion allows to fill gaps with plausible contents from the video after removing one of the layers.

See also Foreground detection – Concept in computer vision Optical flow – Pattern of motion in a visual scene due to relative motion of the observer Video processing – Particular case of image processing Alpha compositing – Operation in computer graphics

References

External links Video matting benchmark Image matting benchmark

Worked examples

Example 1 — a first encounter with Video matting

Start with the simplest possible case. Write down what Video matting claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Video matting before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Video matting ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Video matting

In research
Video matting appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Video matting in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Video matting is common in secondary-school and first-year university syllabi. It links to neighbouring topics Video processing, so understanding it makes those chapters shorter.
In everyday life
Look for Video matting outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Video matting” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Video matting in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Video matting means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Video matting out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Video matting in simple terms?

Video matting is a technique for separating the video into two or more layers, usually foreground and background, and generating alpha mattes which determine blending of the layers. The technique is very popular in video editing because it allows to substitute the background, or process the layers…

Why does Video matting matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Video matting?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Video matting.

Tags

  • Video processing

Keep exploring