# Optical flow

### From Wikipedia, the free encyclopedia

**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 (an eye or a camera) and the scene.^{[1]}^{[2]} Optical flow techniques such as motion detection, object segmentation, time-to-collision and focus of expansion calculations, motion compensated encoding, and stereo disparity measurement utilize this motion of the objects surfaces, and edges.^{[3]}^{[4]}

## Contents |

## [edit] Estimation of the optical flow

Sequences of ordered images allow the estimation of motion as either instantaneous image velocities or discrete image displacements.^{[5]} Fleet and Weiss provide a tutorial introduction to gradient based optical flow .^{[6]} John L. Barron, David J. Fleet, and Steven Beauchemin provides a performance analysis of a number of optical flow techniques. It emphasizes the accuracy and density of measurements.^{[7]}

The optical flow methods try to calculate the motion between two image frames which are taken at times *t* and *t* + δ*t* at every voxel position. These methods are called differential since they are based on local Taylor series approximations of the image signal, that is: they use partial derivatives with respect to the spatial and temporal coordinates.

For a 2D+t dimensional case (3D or n-D cases are similar) a voxel at location *(x,y,t)* with intensity *I(x,y,t)* will have moved by δ*x*, δ*y* and δ*t* between the two image frames, and the following *image constraint equation* can be given:

*I*(*x*,*y*,*t*) =*I*(*x*+ δ*x*,*y*+ δ*y*,*t*+ δ*t*)

Assuming the movement to be small, the image constraint at *I*(*x*,*y*,*t*) with Taylor series can be developed to get:

where H.O.T. means higher order terms, which are small enough to be ignored. From these equations it follows that:

or

which results in

where *V*_{x},*V*_{y} are the *x* and *y* components of the velocity or optical flow of *I*(*x*,*y*,*t*) and , and are the derivatives of the image at (*x*,*y*,*t*) in the corresponding directions. *I*_{x},*I*_{y} and *I*_{t} can be written for the derivatives in the following.

Thus:

*I*_{x}*V*_{x}+*I*_{y}*V*_{y}= −*I*_{t}

or

This is an equation in two unknowns and cannot be solved as such. This is known as the *aperture problem* of the optical flow algorithms. To find the optical flow another set of equations is needed, given by some additional constraint. All optical flow methods introduce additional conditions for estimating the actual flow.

### [edit] Methods for determining optical flow

- Phase correlation – inverse of normalized cross-power spectrum
- Block-based methods – minimizing sum of squared differences or sum of absolute differences, or maximizing normalized cross-correlation
- Differential methods of estimating optical flow, based on partial derivatives of the image signal and/or the sought flow field and higher-order partial derivatives, such as:
- Lucas–Kanade Optical Flow Method – regarding image patches and an affine model for the flow field
- Horn–Schunck method – optimizing a functional based on residuals from the brightness constancy constraint, and a particular regularization term expressing the expected smoothness of the flow field
- Buxton–Buxton method – based on a model of the motion of edges in image sequences
^{[8]} - Black–Jepson method – coarse optical flow via correlation
^{[9]} - General variational methods – a range of modifications/extensions of Horn–Schunck, using other data terms and other smoothness terms.

- Discrete optimization methods – the search space is quantized, and then image matching is addressed through label assignment at every pixel, such that the corresponding deformation minimizes the distance between the source and the target image.
^{[10]}The optimal solution is often recovered through min-cut max-flow algorithms, linear programming or belief propagation methods.

## [edit] Uses of optical flow

Motion estimation and video compression have developed as a major aspect of optical flow research. While the optical flow field is superficially similar to a dense motion field derived from the techniques of motion estimation, optical flow is the study of not only the determination of the optical flow field itself, but also of its use in estimating the three-dimensional nature and structure of the scene, as well as the 3D motion of objects and the observer relative to the scene.

Optical flow was used by robotics researchers in many areas such as: object detection and tracking, image dominant plane extraction, movement detection, robot navigation and visual odometry.^{[11]}

The application of optical flow includes the problem of inferring not only the motion of the observer and objects in the scene, but also the structure of objects and the environment. Since awareness of motion and the generation of mental maps of the structure of our environment are critical components of animal (and human) vision, the conversion of this innate ability to a computer capability is similarly crucial in the field of machine vision.^{[12]}

Consider Figure 1 as an example. Motion estimation techniques can determine that on a two dimensional plane the ball is moving up and to the right and vectors describing this motion can be extracted from the sequence of frames. For the purposes of video compression (e.g., MPEG), the sequence is now described as well as it needs to be. However, in the field of machine vision, the question of whether the ball is moving to the right or if the observer is moving to the left is unknowable yet critical information. If a static, patterned background were present in the five frames, we could confidently state that the sphere is moving to the right.

## [edit] References

**^**Andrew Burton and John Radford (1978).*Thinking in Perspective: Critical Essays in the Study of Thought Processes*. Routledge. http://books.google.com/books?id=CSgOAAAAQAAJ&pg=PA77&dq=%22optical+flow%22+%22optic+flow%22+date:0-1985&lr=&as_brr=3&ei=VA33R-i0DoTitgOy2v3mDQ&sig=4-4sqaoUSnfRa9WStpvUbcVBCkE.**^**David H. Warren and Edward R. Strelow (1985).*Electronic Spatial Sensing for the Blind: Contributions from Perception*. Springer. ISBN 9024726891. http://books.google.com/books?id=-I_Hazgqx8QC&pg=PA414&dq=%22optical+flow%22+%22optic+flow%22+date:0-1985&lr=&as_brr=3&ei=VA33R-i0DoTitgOy2v3mDQ&sig=Oe6VsDLiO3kh2Suox-z2siPbpgw.**^**Kelson R. T. Aires, Andre M. Santana, Adelardo A. D. Medeiros (2008).*Optical Flow Using Color Information*. ACM New York, NY, USA. ISBN 978-1-59593-753-7. http://delivery.acm.org/10.1145/1370000/1364064/p1607-aires.pdf?key1=1364064&key2=4460403121&coll=GUIDE&dl=GUIDE&CFID=72158298&CFTOKEN=85078203.**^**S. S. Beauchemin , J. L. Barron (1995).*The computation of optical flow*. ACM New York, USA. http://portal.acm.org/ft_gateway.cfm?id=212141&type=pdf&coll=GUIDE&dl=GUIDE&CFID=72158298&CFTOKEN=85078203.**^**S. S. Beauchemin , J. L. Barron (1995).*The computation of optical flow*. ACM New York, USA. http://portal.acm.org/ft_gateway.cfm?id=212141&type=pdf&coll=GUIDE&dl=GUIDE&CFID=72158298&CFTOKEN=85078203.**^**David J. Fleet and Yair Wiess (2006). "Optical Flow Estimation". in Paragios et al..*Handbook of Mathematical Models in Computer Vision*. Springer. http://www.cs.toronto.edu/~fleet/research/Papers/flowChapter05.pdf.**^**John L. Barron, David J. Fleet, and Steven Beauchemin (1994). "Performance of optical flow techniques".*International Journal of Computer Vision*(Springer). http://www.cs.toronto.edu/~fleet/research/Papers/ijcv-94.pdf.**^**Glyn W. Humphreys and Vicki Bruce (1989).*Visual Cognition*. Psychology Press. ISBN 0863771246. http://books.google.com/books?id=NiQXkMbx-lUC&pg=PA107&dq=optical-flow+Buxton-and-Buxton&as_brr=3&ei=Sb7VSJC2NJrStQOay_mOBA&sig=ACfU3U2EbPIJKFbpgnWE7Ihn-j95i_4UOA#PPA107,M1.**^**S. S. Beauchemin , J. L. Barron (1995).*The computation of optical flow*. ACM New York, USA. http://portal.acm.org/ft_gateway.cfm?id=212141&type=pdf&coll=GUIDE&dl=GUIDE&CFID=72158298&CFTOKEN=85078203.**^**B. Glocker, N. Komodakis, G. Tziritas, N. Navab & N. Paragios (2008).*Dense Image Registration through MRFs and Efficient Linear Programming*. Medical Image Analysis Journal. http://www.mas.ecp.fr/vision/Personnel/nikos/pub/mian08.pdf.**^**Kelson R. T. Aires, Andre M. Santana, Adelardo A. D. Medeiros (2008).*Optical Flow Using Color Information*. ACM New York, NY, USA. ISBN 978-1-59593-753-7. http://delivery.acm.org/10.1145/1370000/1364064/p1607-aires.pdf?key1=1364064&key2=4460403121&coll=GUIDE&dl=GUIDE&CFID=72158298&CFTOKEN=85078203.**^**Christopher M. Brown (1987).*Advances in Computer Vision*. Lawrence Erlbaum Associates. http://books.google.com/books?id=c97huisjZYYC&pg=PA133&dq=%22optic+flow%22++%22optical+flow%22&lr=&as_brr=3&ei=tRP3R9qPG4fotQOuopiFCg&sig=X6vs4yWOgFWszBNJWEYdEgLcCGk#PPA132,M1.

## [edit] External links

- Finding Optic Flow
- Art of Optical Flow article on fxguide.com (using optical flow in Visual Effects)
- Optical flow evaluation and ground truth sequences.
- Middlebury Optical flow evaluation and ground truth sequences.
- DROP: (Windows Interface) Dense Optical Flow Estimation Freeware Software Using Discrete Optimization.