Optical Flow. Adriana Bocoi and Elena Pelican. 1. Introduction

Similar documents
Mariya Zhariy. Uttendorf Introduction to Optical Flow. Mariya Zhariy. Introduction. Determining. Optical Flow. Results. Motivation Definition

Motion. 1 Introduction. 2 Optical Flow. Sohaib A Khan. 2.1 Brightness Constancy Equation

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Optic Flow and Basics Towards Horn-Schunck 1

Dominant plane detection using optical flow and Independent Component Analysis

Visual Tracking (1) Feature Point Tracking and Block Matching

Comparison Between The Optical Flow Computational Techniques

CS 565 Computer Vision. Nazar Khan PUCIT Lectures 15 and 16: Optic Flow

Moving Object Tracking in Video Using MATLAB

CS-465 Computer Vision

Leow Wee Kheng CS4243 Computer Vision and Pattern Recognition. Motion Tracking. CS4243 Motion Tracking 1

SURVEY OF LOCAL AND GLOBAL OPTICAL FLOW WITH COARSE TO FINE METHOD

Notes 9: Optical Flow

Optical Flow Estimation with CUDA. Mikhail Smirnov

Real-Time Optic Flow Computation with Variational Methods

CPSC 425: Computer Vision

AN ADAPTIVE MESH METHOD FOR OBJECT TRACKING

Hand-Eye Calibration from Image Derivatives

LOCAL-GLOBAL OPTICAL FLOW FOR IMAGE REGISTRATION

Matching. Compare region of image to region of image. Today, simplest kind of matching. Intensities similar.

arxiv: v1 [cs.cv] 2 May 2016

Massachusetts Institute of Technology Department of Computer Science and Electrical Engineering 6.801/6.866 Machine Vision QUIZ II

Dense Image-based Motion Estimation Algorithms & Optical Flow

Motion Analysis. Motion analysis. Now we will talk about. Differential Motion Analysis. Motion analysis. Difference Pictures

Tutorial of Motion Estimation Based on Horn-Schunk Optical Flow Algorithm in MATLAB

Time To Contact (TTC) Berthold K.P. Horn, Yajun Fang, Ichiro Masaki

Time-to-Contact from Image Intensity

Comparison between Optical Flow and Cross-Correlation Methods for Extraction of Velocity Fields from Particle Images

The 2D/3D Differential Optical Flow

Visual Tracking (1) Tracking of Feature Points and Planar Rigid Objects

Voxel-based Registration Methods in in vivo Imaging

Looming Motion Segmentation in Vehicle Tracking System using Wavelet Transforms

Large Displacement Optical Flow & Applications

Technion - Computer Science Department - Tehnical Report CIS

Optical Flow Estimation

VC 11/12 T11 Optical Flow

Marcel Worring Intelligent Sensory Information Systems

A Survey of Light Source Detection Methods

Proceedings of the 6th Int. Conf. on Computer Analysis of Images and Patterns. Direct Obstacle Detection and Motion. from Spatio-Temporal Derivatives

Midterm Exam Solutions

Finally: Motion and tracking. Motion 4/20/2011. CS 376 Lecture 24 Motion 1. Video. Uses of motion. Motion parallax. Motion field

A Reliable FPGA-based Real-time Optical-flow Estimation

3D Environment Measurement Using Binocular Stereo and Motion Stereo by Mobile Robot with Omnidirectional Stereo Camera

Fast Optical Flow Using Cross Correlation and Shortest-Path Techniques

Implementation of Optical Flow, Sliding Window and SVM for Vehicle Detection and Tracking

Efficient Block Matching Algorithm for Motion Estimation

Computing Slow Optical Flow By Interpolated Quadratic Surface Matching

C18 Computer vision. C18 Computer Vision. This time... Introduction. Outline.

Feature Tracking and Optical Flow

Motion. CS 554 Computer Vision Pinar Duygulu Bilkent University

CUDA GPGPU. Ivo Ihrke Tobias Ritschel Mario Fritz

EE795: Computer Vision and Intelligent Systems

Subpixel Corner Detection Using Spatial Moment 1)

Motion Estimation. There are three main types (or applications) of motion estimation:

Hand-Eye Calibration from Image Derivatives

Focus of Expansion Estimation for Motion Segmentation from a Single Camera

Lecture 16: Computer Vision

A Bottom Up Algebraic Approach to Motion Segmentation

Multiple Combined Constraints for Optical Flow Estimation

Illumination-robust variational optical flow based on cross-correlation

Moving Object Segmentation Method Based on Motion Information Classification by X-means and Spatial Region Segmentation

SELECTIVE ALGEBRAIC MULTIGRID IN FOAM-EXTEND

Announcements. Motion. Structure-from-Motion (SFM) Motion. Discrete Motion: Some Counting

2 The MiníMax Principle First consider a simple problem. This problem will address the tradeos involved in a two-objective optimiation problem, where

CS 4495 Computer Vision Motion and Optic Flow

Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation

Feature Tracking and Optical Flow

Depth-Layer-Based Patient Motion Compensation for the Overlay of 3D Volumes onto X-Ray Sequences

Lecture 20: Tracking. Tuesday, Nov 27

Real-Time Dense and Accurate Parallel Optical Flow using CUDA

SUBDIVISION ALGORITHMS FOR MOTION DESIGN BASED ON HOMOLOGOUS POINTS

Visual Tracking (1) Pixel-intensity-based methods

Planar homographies. Can we reconstruct another view from one image? vgg/projects/singleview/

CHAPTER 5 MOTION DETECTION AND ANALYSIS

smooth coefficients H. Köstler, U. Rüde

Gesture based PTZ camera control

International Journal of Advance Engineering and Research Development

Module 7 VIDEO CODING AND MOTION ESTIMATION

DETECTION OF CHANGES IN SURVEILLANCE VIDEOS. Longin Jan Latecki, Xiangdong Wen, and Nilesh Ghubade

Using temporal seeding to constrain the disparity search range in stereo matching

Optical Flow CS 637. Fuxin Li. With materials from Kristen Grauman, Richard Szeliski, S. Narasimhan, Deqing Sun

arxiv: v1 [cs.cv] 22 Jan 2016

Horn-Schunck and Lucas Kanade 1

Computational Optical Imaging - Optique Numerique. -- Single and Multiple View Geometry, Stereo matching --

Optical flow. Cordelia Schmid

IMA Preprint Series # 2016

A Robust Two Feature Points Based Depth Estimation Method 1)

Representing Moving Images with Layers. J. Y. Wang and E. H. Adelson MIT Media Lab

Class 3: Advanced Moving Object Detection and Alert Detection Feb. 18, 2008

Adaptive Multi-Stage 2D Image Motion Field Estimation

16720 Computer Vision: Homework 3 Template Tracking and Layered Motion.

EE795: Computer Vision and Intelligent Systems

Towards the completion of assignment 1

Tracking Weather Storms using 3D Doppler Radial Velocity Information

Spatial track: motion modeling

Performance Evaluation Metrics and Statistics for Positional Tracker Evaluation

Accurate Real-Time Disparity Estimation with Variational Methods

Problems with template matching

Factorization with Missing and Noisy Data

Optical flow. Cordelia Schmid

Transcription:

Proceedings of the Fifth Workshop on Mathematical Modelling of Environmental and Life Sciences Problems Constanţa, Romania, September, 200, pp. 5 5 Optical Flow Adriana Bocoi and Elena Pelican This paper deals with computing the optical flow field for a set of image sequences, using differential technique, namely the Horn and Schunck approach ([2]). The images are converted into numbers using (each number in the obtained file represents the intensity of each pixel from the original image) using the software ImageJ, a Java technology. As expected, this model does not give results in real-time, as one can see in the numerical experiments section, but is the cornerstone for the future approaches.. Introduction Optical flow is a motion in two dimensions that needs to be recovered from a sequence of images. This is neccesary to be done in computer vision, medical imaging, video processing, etc. Other points of view consider optical flow being the distribution of apparent velocities of movement of brightness patterns in an image, this arising from relative motion of objects and the viewer (Gibson 950, 9), or optical flow is the apparent motion of brightness patterns in the image (Robyn Owens 997), or optical flow is a concept for considering 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 (Wikipedia-free encyclopedia). The idea behind the optical flow computation method is the following. Having two subsequent images, we want to compute the vector field which describes the movement of each pixel from the first image to the second one. In order to do this, we transform each image in a matrix of numbers, and then we use the Horn and Schunck method (see [2]). The two considered images must have the same resolution and be part of the same scene from a movie. And it is our attempt to compute the Technischen Universität München, Germany, e-mail: bocoi@in.tum.de Ovidius University of Constanţa, Romania, e-mail: epelican@univ-ovidius.ro The paper was supported by the Grant CEEX 05-D-25/2005.

52 Adriana Bocoi and Elena Pelican optical flow for this two images, and consequently, to obtain an intermediary image, between the two initial ones. If we have a digital image sequence in which objects or even the camera are moving, one can obtain valid informations regarding the scene just by analysing the differences that apear from one image to another, difference caused by this mouvement. If, for example, we have a car moving in a scene, by the analysis of the differences of two consecutive images, one can determine which pixels is form the car, and which are part of the static background. By studying in detail the movement, one can determine: how many objects are in the image, in wich direction are they moving, if the movement is liniar or not, how fast are the objects moving, etc. The most difficult part, though, is the computation of the optical flow field (or image velocity). 2. Model for motion represention In order to detect the motion (for computing the optical flow field), one can use this classical model. If we denote by I(x, y, t) the measured image intensity at position (x, y, t), considering I(x, y, t) = constant for t, we obtain di = 0. () dt Using the chain rule di dt = I x dx y dy t we obtain the optical flow equation: Let us denote by Thus, the equation (2) becomes I x dx y dy t u = dx dt, v = dy dt, I x = I x, I x = I y. = 0. (2) I x u + I y v + I t = 0. (3) Here (u, v) denotes the optical flow field. Since the motion field is not uniquely determined by (3)(we have two unknowns u and v, and one equation), additional assumptions must be imposed. In this paper we use the variational optical flow computation algorithm proposed in [2]. The authors proposed to minimise the function So, we shall solve the problem: 2 u = 2 u x 2 + 2 u y 2, 2 v = 2 v x 2 + 2 v y 2 min( 2 u + 2 v).

Optical flow 53 2.. Aproximation of partial derivatives and the Laplacean For the partial derivatives of the intensity, we use as approximants the following operators: I x = I y = I t = (I i+,j,k I i,j,k + I i+,j+,k I i,j+,k + I i+,j,k+ I i,j,k+ + I i+,j+,k+ I i,j+,k+ )/4 (I i,j+,k I i,j,k + I i+,j+,k I i+,j,k + I i,j+,k+ I i,j,k+ + I i+,j+,k+ I i+,j,k+ )/4 (I i+,j,k I i,j,k + I i+,j+,k I i,j+,k + I i+,j,k+ I i,j,k+ + I i+,j+,k+ I i,j+,k+ )/4. For the estimation of the Laplacean, we shall use u k(ū i,j,k u i,j,k ), v k( v i,j,k v i,j,k ). Now, considering k = 3, and ū and v will be the local median of u and v, we shall aproximate them by a 9-point stencil scheme, as follows This way, we obtain 2 2 2 2 ū i,j,k = (u i,j,k + u i,j+,k + u i+,j,k + u i,j,k ) + 2 (u i,j,k + u i,j+,k +. +u i+,j+,k + u i+,j,k ) v i,j,k = (v i,j,k + v i,j+,k + v i+,j,k + v i,j,k ) + 2 (v i,j,k + v i,j+,k + +v i+,j+,k + v i+,j,k ). 3. Iterative solution As iterative solver, we shall use a (coupled) Gauss-Seidel relaxation method. We want to minimise ε b = I x u + I y v + I t, ε 2 c = (ū u)2 + ( v v) 2. (4) By minimising this, we get: { (α 2 + Ix 2 + I2 y ) (u ū) (α 2 + Ix 2 + I2 y ) (v v) = I x(i x ū + I y v + I t ) y(i x ū + I y v + I t ). (5)

54 Adriana Bocoi and Elena Pelican So, we obtain the iterative scheme u n+ = ū n I x(i x ū n + I y v n + I t ) (α 2 + Ix 2 + Iy) 2 v n+ = v n I y(i x ū n + I y v n + I t ) (α 2 + Ix 2 + Iy) 2. () In [2], the authors proposed as a stopping criterion the computation of a number of iteration at most equals with the length of the diagonal for the original image. 4. Experiments The algorithm implemented using the Horn & Shunk approach calculates the optical flow field by computing the partial derivates of the intensity, having the intensity in every pixel for the two images. Example. We consider as in [3], a simple example for the intensity function: I(x, y, t) = x + y + t. We take α = 0.5 and the initial approximation u 0 = v 0 = 0. The resolution of the images is 5 5. For this simple example we shall compute only one iteration (we do not need more than one). Fig.. One of the image sequences (left). Optical flow field after one iteration (right). Example 2. We shall consider now the example of a rotating sphere. We considere the set of images presented in [] where we have a rotating sphere around its axe. The resolution of the images is 200 200; we took α variable for testing what happens with the optical flow field. Example 3. We shall consider now the example of a rotating sphere. We considere the set of images presented in [] where we have a rotating sphere around

Optical flow 55 Fig. 2. First image generated after one iteration in the Horn & Schunck algorithm (middle). And the two consecutive images (left and right). its axe. The resolution of the images is 200 200; we took α variable for testing what happens with the optical flow field. Fig. 3. Optical flow field generated after one iteration with Horn&Schunck algorithm - 750 millisec (left) and after 00 iterations - 53 25 millisec (right). It can be noticed in Figure 3 the patterns on the sphere (this is not an homogenous vector field) (left image), and an improvement in the optical flow field (right image). In Figure 2. we can notice, also, an improvement in the optical flow field, but also an influence in the vector field having the gradient (for intensity) equal to 0. This is the moment when the theory tels us to stop. In this last case, we can notice an improvement in the optical flow field, but also an influence in the vector field having the gradient (for intensity) equal to 0. But there are some problems with the optical flow field from boundary of the sphere, so we should continue no more. As future work, we want to use different approaches (not only the differentiallike techniques) for synthetic and, also, natural images, and to improve the runtime of the implemented algorithms.

5 Adriana Bocoi and Elena Pelican Fig. 4. Optical flow field generated after 200 iterations with Horn&Schunck algorithm 8 032 millisec (left) and after 300 iterations 30 29 millisec (right). Fig. 5. Optical flow field generated after 400 iterations in the Horn-Schunck algorithm 82 57 millisec. Remark. All tests were run on a PC with P4 procesor with 78 MB Memory. References [] Baron, L., Fleet, D.J. and Beauchemin, S.S., Performance of Optical Flow Techniques, Intern.J. of Computer Vision, 2: (994), 43 77. [2] Horn, B.K.P. and Schunck, B.G., Determining Optical Flow, Institute Of Technology Massachusetts, SUA, A.I. Memo, No. 572(980). [3] Kalmoun, E.M. and Rüde, U., A variational multigrid for computing the optical flow, Friedrich-Alexander Universität Erlangen-Nürnberg, Germany, 03-4, 2003. [4] Schnörr, C., Determing optical flow for irregular domains by minimizing convex nonquadratic functionals, Proc. 2th Int. Conf. on Pattern Recognition, Vol. A, 994, 3. [5] Lyon, D.A. and Rao, H.V, Java Digital Signal Processing, MT Books, 997. [] http://www.cs.otago.ac.nz/research/vision.