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
Video editing is the manipulation and arrangement of video shots. Video editing is used to structure and present all video information, including films and television shows, video advertisements and video essays. Video editing has been dramatical ...
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
, compute the foreground
, background
and alpha matte
, such that the equation
holds true. This equation has trivial solution
,
,
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
Methods description
The first known video matting method
was developed in 2001. The method utilizes
optical flow
Optical flow or optic flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between an observer and a scene. Optical flow can also be defined as the distribution of apparent veloci ...
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
In digital image processing and computer vision, image segmentation is the process of partitioning a digital image into multiple image segments, also known as image regions or image objects ( sets of pixels). The goal of segmentation is to simpli ...
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.
Finally, a
deep learning method
was developed for image matting in 2017. It overcomes most traditional methods.
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 key
Chroma key compositing, or chroma keying, is a visual-effects and post-production technique for compositing (layering) two images or video streams together based on colour hues ( chroma range). The technique has been used in many fields to ...
ing and
stop motion
Stop motion is an animated filmmaking technique in which objects are physically manipulated in small increments between individually photographed frames so that they will appear to exhibit independent motion or change when the series of frames i ...
for
ground truth
Ground truth is information that is known to be real or true, provided by direct observation and measurement (i.e. empirical evidence) as opposed to information provided by inference.
Etymology
The ''Oxford English Dictionary'' (s.v. "ground t ...
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 camera
A time-of-flight camera (ToF camera), also known as time-of-flight sensor (ToF sensor), is a range imaging camera system for measuring distances between the camera and the subject for each point of the image based on time-of-flight, the round ...
s 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
Zoom may refer to:
Technology Computing
* Zoom (software), videoconferencing application
* Page zooming, the ability to magnify or shrink a portion of a page on a computer display
* Zooming user interface, a graphical interface allowing for image ...
plugin had been developed, and
Skype
Skype () is a proprietary telecommunications application operated by Skype Technologies, a division of Microsoft, best known for VoIP-based videotelephony, videoconferencing and voice calls. It also has instant messaging, file transfer, deb ...
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
2D to 3D video conversion (also called 2D to stereo 3D conversion and stereo conversion) is the process of transforming 2D ("flat") film to 3D form, which in almost all cases is stereo, so it is the process of creating imagery for each eye from ...
, 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
*
Optical flow
Optical flow or optic flow is the pattern of apparent motion of objects, surfaces, and edges in a visual scene caused by the relative motion between an observer and a scene. Optical flow can also be defined as the distribution of apparent veloci ...
*
Video processing In electronics engineering, video processing is a particular case of signal processing, in particular image processing, which often employs video filters and where the input and output signals are video files or video streams. Video processing ...
*
Alpha compositing
In computer graphics, alpha compositing or alpha blending is the process of combining one image with a background to create the appearance of partial or full transparency. It is often useful to render picture elements (pixels) in separate pas ...
References
External links
Video matting benchmarkImage matting benchmark
{{Video processing
Video processing