The condensation algorithm (Conditional Density Propagation) is a
computer vision
Computer vision is an Interdisciplinarity, interdisciplinary scientific field that deals with how computers can gain high-level understanding from digital images or videos. From the perspective of engineering, it seeks to understand and automate t ...
algorithm. The principal application is to detect and
track
Track or Tracks may refer to:
Routes or imprints
* Ancient trackway, any track or trail whose origin is lost in antiquity
* Animal track, imprints left on surfaces that an animal walks across
* Desire path, a line worn by people taking the short ...
the contour of objects moving in a cluttered environment. Object tracking is one of the more basic and difficult aspects of computer vision and is generally a prerequisite to
object recognition
Object recognition – technology in the field of computer vision for finding and identifying objects in an image or video sequence. Humans recognize a multitude of objects in images with little effort, despite the fact that the image of the ...
. Being able to identify which pixels in an image make up the contour of an object is a non-trivial problem. Condensation is a
probabilistic algorithm
A randomized algorithm is an algorithm that employs a degree of randomness as part of its logic or procedure. The algorithm typically uses uniformly random bits as an auxiliary input to guide its behavior, in the hope of achieving good performan ...
that attempts to solve this problem.
The algorithm itself is described in detail by Isard and
Blake
Blake is a surname which originated from Old English. Its derivation is uncertain; it could come from "blac", a nickname for someone who had dark hair or skin, or from "blaac", a nickname for someone with pale hair or skin. Another theory, presum ...
in a publication in the ''International Journal of Computer Vision'' in 1998.
One of the most interesting facets of the algorithm is that it does not compute on every pixel of the image. Rather, pixels to process are chosen at random, and only a subset of the pixels end up being processed. Multiple hypotheses about what is moving are supported naturally by the probabilistic nature of the approach. The evaluation functions come largely from previous work in the area and include many standard statistical approaches. The original part of this work is the application of particle filter estimation techniques.
The algorithm’s creation was inspired by the inability of
Kalman filtering to perform object tracking well in the presence of significant background clutter. The presence of clutter tends to produce probability distributions for the object state which are
multi-modal and therefore poorly modeled by the Kalman filter. The condensation algorithm in its most general form requires no assumptions about the probability distributions of the object or measurements.
Algorithm overview
The condensation algorithm seeks to solve the problem of estimating the conformation of an object described by a
vector at time
, given observations
of the detected features in the images up to and including the current time. The algorithm outputs an estimate to the state
conditional probability density by applying a nonlinear filter based on factored sampling and can be thought of as a development of a
Monte-Carlo method
Monte Carlo methods, or Monte Carlo experiments, are a broad class of computational algorithms that rely on repeated random sampling to obtain numerical results. The underlying concept is to use randomness to solve problems that might be determini ...
.
is a representation of the probability of possible conformations for the objects based on previous conformations and measurements. The condensation algorithm is a
generative model
In statistical classification, two main approaches are called the generative approach and the discriminative approach. These compute classifiers by different approaches, differing in the degree of statistical modelling. Terminology is incons ...
since it models the
joint distribution
Given two random variables that are defined on the same probability space, the joint probability distribution is the corresponding probability distribution on all possible pairs of outputs. The joint distribution can just as well be considered ...
of the object and the observer.
The conditional density of the object at the current time
is estimated as a weighted, time-indexed sample set
with weights
. N is a parameter determining the number of sample sets chosen. A realization of
is obtained by sampling with replacement from the set
with probability equal to the corresponding element of
.
The assumptions that object dynamics form a temporal Markov chain and that observations are
independent of each other and the dynamics facilitate the implementation of the condensation algorithm. The first assumption allows the dynamics of the object to be entirely determined by the conditional density
. The model of the system dynamics determined by
must also be selected for the algorithm, and generally includes both
deterministic
Determinism is a philosophical view, where all events are determined completely by previously existing causes. Deterministic theories throughout the history of philosophy have developed from diverse and sometimes overlapping motives and consi ...
and
stochastic
Stochastic (, ) refers to the property of being well described by a random probability distribution. Although stochasticity and randomness are distinct in that the former refers to a modeling approach and the latter refers to phenomena themselve ...
dynamics.
The algorithm can be summarized by initialization at time
and three steps at each time ''t'':
Initialization
Form the initial sample set and weights by sampling according to the prior distribution. For example, specify as
Gaussian
Carl Friedrich Gauss (1777–1855) is the eponym of all of the topics listed below.
There are over 100 topics all named after this German mathematician and scientist, all in the fields of mathematics, physics, and astronomy. The English eponymo ...
and set the weights equal to each other.
Iterative procedure
# Sample with replacement
times from the set
with probability
to generate a realization of
.
# Apply the learned dynamics
to each element of this new set, to generate a new set
.
# To take into account the current observation
, set
for each element
.
This algorithm outputs the probability distribution
which can be directly used to calculate the mean position of the tracked object, as well as the other
moments of the tracked object.
Cumulative weights can instead be used to achieve a more efficient sampling.
Implementation considerations
Since object-tracking can be a real-time objective, consideration of algorithm efficiency becomes important. The condensation algorithm is relatively simple when compared to the computational intensity of the Ricatti equation required for Kalman filtering. The parameter
, which determines the number of samples in the sample set, will clearly hold a trade-off in efficiency versus performance.
One way to increase efficiency of the algorithm is by selecting a low degree of freedom model for representing the shape of the object. The model used by Isard 1998 is a linear parameterization of
B-splines
In the mathematical subfield of numerical analysis, a B-spline or basis spline is a spline function that has minimal support with respect to a given degree, smoothness, and domain partition. Any spline function of given degree can be expressed ...
in which the splines are limited to certain configurations. Suitable configurations were found by analytically determining combinations of contours from multiple views, of the object in different poses, and through
principal component analysis
Principal component analysis (PCA) is a popular technique for analyzing large datasets containing a high number of dimensions/features per observation, increasing the interpretability of data while preserving the maximum amount of information, and ...
(PCA) on the deforming object.
Isard and Blake model the object dynamics
as a second order
difference equation
In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a paramete ...
with deterministic and stochastic components:
where
is the mean value of the state, and
,
are matrices representing the deterministic and stochastic components of the dynamical model respectively.
,
, and
are estimated via
Maximum Likelihood Estimation
In statistics, maximum likelihood estimation (MLE) is a method of estimating the parameters of an assumed probability distribution, given some observed data. This is achieved by maximizing a likelihood function so that, under the assumed stati ...
while the object performs typical movements.
The observation model
cannot be directly estimated from the data, requiring assumptions to be made in order to estimate it. Isard 1998 assumes that the clutter which may make the object not visible is a
Poisson random process
In probability, statistics and related fields, a Poisson point process is a type of random mathematical object that consists of points randomly located on a mathematical space with the essential feature that the points occur independently of ...
with spatial density
and that any true target measurement is unbiased and normally distributed with
standard deviation .
The basic condensation algorithm is used to track a single object in time. It is possible to extend the condensation algorithm using a single probability distribution to describe the likely states of multiple objects to track multiple objects in a scene at the same time.
Since clutter can cause the object probability distribution to split into multiple peaks, each peak represents a hypothesis about the object configuration. Smoothing is a statistical technique of conditioning the distribution based on both past and future measurements once the tracking is complete in order to reduce the effects of multiple peaks. Smoothing cannot be directly done in real-time since it requires information of future measurements.
Applications
The algorithm can be used for vision-based
robot localization
Robot localization denotes the robot's ability to establish its own position and orientation within the frame of reference. Path planning is effectively an extension of localisation, in that it requires the determination of the robot's current po ...
of mobile robots. Instead of tracking the position of an object in the scene, however, the position of the camera platform is tracked. This allows the camera platform to be globally localized given a visual map of the environment.
Extensions of the condensation algorithm have also been used to
recognize human gestures in image sequences. This application of the condensation algorithm impacts the range of human–computer interactions possible. It has been used to recognize simple gestures of a user at a whiteboard to control actions such as selecting regions of the boards to print or save them. Other extensions have also been used for tracking multiple cars in the same scene.
The condensation algorithm has also been used for
face recognition
A facial recognition system is a technology capable of matching a human face from a digital image or a video frame against a database of faces. Such a system is typically employed to authenticate users through ID verification services, an ...
in a video sequence.
Resources
An implementation of the condensation algorithm in
C can be found o
Michael Isard’s website
An implementation in
MATLAB
MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementa ...
can be found on th
Mathworks File Exchange
An example of implementation using the
OpenCV
OpenCV (''Open Source Computer Vision Library'') is a library of programming functions mainly aimed at real-time computer vision. Originally developed by Intel, it was later supported by Willow Garage then Itseez (which was later acquired by I ...
library can be found on th
OpenCV forums
See also
*
Particle filter
Particle filters, or sequential Monte Carlo methods, are a set of Monte Carlo algorithms used to solve filtering problems arising in signal processing and Bayesian statistical inference. The filtering problem consists of estimating the int ...
– Condensation is the application of Sampling Importance Resampling (SIR) estimation to contour tracking
References
{{reflist
Computer vision