Professional Documents
Culture Documents
Optical Flow
Optical Flow
Optical flow is a concept for estimating the motion of objects within a visual
representation. Typically the motion is represented as vectors originating or terminating
at pixels in a digital image sequence.
Optical flow is useful in pattern recognition, computer vision, and other image processing
applications. It is closely related to motion estimation and motion compensation. Often
the term optical flow is used to describe a dense motion field with vectors at each pixel,
as opposed to motion estimation or compensation which uses vectors for blocks of pixels,
as in video compression methods such as MPEG. Some consider using optical flow for
collision avoidance and altitude acquisition system for unmanned air vehicles (UAVs).
Introduction
Generation of Optical Flow
Optical Flow and 3-D Motion
Introduction
Until now we dealt primarily with single image and the type of information encoded in it
as well as with the means how to extract it. In some evolutionary circles, it is believed
that the estimation of the motion of predators advancing at a mobile animal was
important to its ability to take flight away from the predator and hence survive. In this
lecture, we will deal with the problem of recovering the motion of objects in the 3-D
world from the motion of segments on the 2-D image plane.
The technical problem with estimating the motion of objects in 3-D is that in the image
formation process, due to the perspective projection of the 3-D world onto the 2-D image
plane, some of the information is lost. We will now address several ways of recovering
the 3-D information from 2-D images using various ``cues''. These cues are motion,
binocular stereopsis, texture, shading and contour. In this lecture we will content
ourselves with studying motion flow.
If the projection of a 3-D point on the image plane is a point with image coordinates
, simple inversion of the perspective projection equation in order to obtain 3-D
information will not work, since there are infinitely many points in the 3-D which would
get projected to the same point
in the image plane, all lying on a line going through
the center of projection and the point
(see Figure 1). Thus, some additional
information is needed in order to recover the 3-D structure from 2-D images. One
possible way how to extract this 3-D information is from time-varying sequences. This 3-
An example of the optical flow pattern from the sequence of images of a rotating Rubik's
cube shown in Figure 2.
Figure 2: A Rubik's cube on a rotating turntable, taken from Russell and Norvig, ``AI, A
Modern Approach'', Prentice Hall, 1995, Figure 24.8, pg. 736.
is given in Figure 3.
Figure 3: Flow vectors calculated from comparing the two images of a Rubik's cube,
taken from Russell and Norvig, ``AI, A Modern Approach'', Prentice Hall, 1995, Figure
24.9, pg. 737.
The optical flow vector
has two components
and
describing the motion of a point feature in and direction in the image plane
respectively. In order to be able to measure optical flow we need to find corresponding
points between two frames. One possibility would be to exploit the similarity between the
image patches surrounding the individual points. There are two measures of similarity
that are commonly used for optical flow vectors. One is sum of squared differences
where the summation ranges over the image patch centered at the feature of interest. The
optical flow of the chosen point feature is
It is important to note that the optical flow is not uniquely determined by the local
information. For example consider two local patches of the images observed in two
consecutive times (see Figure 4).
Figure 4: In spite of the fact that the dark square moved between the two consecutive
frames, observing purely the cut-out patch we cannot observe any change, or we may
assume that the observed pattern moved arbitrarily along the direction of the edge.
In spite of the fact that the dark square moved between the two consecutive frames,
observing purely the cut-out patch we cannot observe any change, or we may assume that
the observed pattern moved arbitrarily along the direction of the edge. The fact that one
cannot determine the optical flow along the direction of the brightness pattern is known
as aperture problem. Have you ever thought about what might cause the barber pole
illusion, where it appears that a barber shop pole is spiralling up and out. Indeed, full
optical flow is best determined at the corners.
where
The useful thing about this equation (3 is that it enables us to determine the time to
impact with an object at a distance , away given by
. You can imagine that this is
important for navigation and also your well being.
Another use of motion flow is in rendering . Here you take multiple 2-D views of a fixed
scene and use it to reconstruct the 3-D shape of the object. An example of this is given in
Figure (6).
Figure 6: 3-D reconstruction of a house from four photographs taken from different
locations (left) and the photograph of the house taken from the same location (right).
Figure taken from Russell and Norvig, ``Artificial Intelligence - A Modern Approach,
Prentice Hall, 1995, Figure 24.11, page 738
Fancier versions of this are due to Debevec, Taylor and Malik and are available here.
decent picture of the motion from one image to the next, an example of which is included
below.
Sample Optical Flow Field
Figure 1: Optical flow field from a taxi driving down a street. (Source:
http://www.kfunigraz.ac.at/imawww/invcon/pictures/flowfield.gif)
With this in mind, we can now take a look at how the image registration algorithm we
used builds upon the concept introduced here.