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

Similar documents
Feature Tracking and Optical Flow

Feature Tracking and Optical Flow

EE795: Computer Vision and Intelligent Systems

CS 4495 Computer Vision Motion and Optic Flow

Peripheral drift illusion

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

Dense Image-based Motion Estimation Algorithms & Optical Flow

Motion and Optical Flow. Slides from Ce Liu, Steve Seitz, Larry Zitnick, Ali Farhadi

EE795: Computer Vision and Intelligent Systems

CS6670: Computer Vision

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


Motion and Tracking. Andrea Torsello DAIS Università Ca Foscari via Torino 155, Mestre (VE)

Overview. Video. Overview 4/7/2008. Optical flow. Why estimate motion? Motion estimation: Optical flow. Motion Magnification Colorization.

Visual Tracking (1) Feature Point Tracking and Block Matching

Capturing, Modeling, Rendering 3D Structures

Multi-stable Perception. Necker Cube

Optical Flow-Based Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides.

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

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

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

Computer Vision Lecture 20

Computer Vision Lecture 20

Ninio, J. and Stevens, K. A. (2000) Variations on the Hermann grid: an extinction illusion. Perception, 29,

CS664 Lecture #18: Motion

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

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

EECS 556 Image Processing W 09

Lucas-Kanade Motion Estimation. Thanks to Steve Seitz, Simon Baker, Takeo Kanade, and anyone else who helped develop these slides.

Lecture 19: Motion. Effect of window size 11/20/2007. Sources of error in correspondences. Review Problem set 3. Tuesday, Nov 20

Comparison between Motion Analysis and Stereo

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

The Lucas & Kanade Algorithm

Particle Tracking. For Bulk Material Handling Systems Using DEM Models. By: Jordan Pease

Visual Tracking (1) Pixel-intensity-based methods

Optical flow and tracking

Visual Tracking. Image Processing Laboratory Dipartimento di Matematica e Informatica Università degli studi di Catania.

CS-465 Computer Vision

Visual Tracking. Antonino Furnari. Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania

Colour Segmentation-based Computation of Dense Optical Flow with Application to Video Object Segmentation

Automatic Image Alignment (direct) with a lot of slides stolen from Steve Seitz and Rick Szeliski

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

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Lecture 20: Tracking. Tuesday, Nov 27

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

Fundamental matrix. Let p be a point in left image, p in right image. Epipolar relation. Epipolar mapping described by a 3x3 matrix F

Displacement estimation

SUMMARY: DISTINCTIVE IMAGE FEATURES FROM SCALE- INVARIANT KEYPOINTS

Lecture 16: Computer Vision

Computer Vision II Lecture 4

CS201: Computer Vision Introduction to Tracking

Feature Based Registration - Image Alignment

VC 11/12 T11 Optical Flow

ViSP tracking methods overview

Lecture 16: Computer Vision

Visual motion. Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys

ECE Digital Image Processing and Introduction to Computer Vision

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

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

Computer Vision I - Filtering and Feature detection

Notes 9: Optical Flow

Chapter 9 Object Tracking an Overview

Image processing and features

Tracking Computer Vision Spring 2018, Lecture 24

Statistical image models

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

Optical Flow Estimation

Kanade Lucas Tomasi Tracking (KLT tracker)

Motion Estimation (II) Ce Liu Microsoft Research New England

Mixture Models and EM

Data Term. Michael Bleyer LVA Stereo Vision

Computer Vision I - Basics of Image Processing Part 2

Comparison Between The Optical Flow Computational Techniques

Autonomous Navigation for Flying Robots

EE 264: Image Processing and Reconstruction. Image Motion Estimation I. EE 264: Image Processing and Reconstruction. Outline

The Robust Estimation of Multiple Motions: Parametric and Piecewise-Smooth Flow Fields

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Computer Vision Lecture 20

What have we leaned so far?

Marcel Worring Intelligent Sensory Information Systems

Multiple Model Estimation : The EM Algorithm & Applications

Stereo vision. Many slides adapted from Steve Seitz

Computer Vision II Lecture 4

Video Alignment. Literature Survey. Spring 2005 Prof. Brian Evans Multidimensional Digital Signal Processing Project The University of Texas at Austin

arxiv: v1 [cs.cv] 2 May 2016

NIH Public Access Author Manuscript Proc Int Conf Image Proc. Author manuscript; available in PMC 2013 May 03.

OPPA European Social Fund Prague & EU: We invest in your future.

Multiple Model Estimation : The EM Algorithm & Applications

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

Chaplin, Modern Times, 1936

Correspondence and Stereopsis. Original notes by W. Correa. Figures from [Forsyth & Ponce] and [Trucco & Verri]

The SIFT (Scale Invariant Feature

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

Motion Tracking and Event Understanding in Video Sequences

Perceptual Grouping from Motion Cues Using Tensor Voting

Robert Collins CSE598G. Intro to Template Matching and the Lucas-Kanade Method

Local Feature Detectors

Exploring Curve Fitting for Fingers in Egocentric Images

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

Transcription:

Members: D91922016 朱威達 R93922010 林聖凱 R93922044 謝俊瑋 Motion Estimation There are three main types (or applications) of motion estimation: Parametric motion (image alignment) The main idea of parametric motion is to combine two or more picture of the same place with different small sections (such as Fig.1 and Fig.2), and combine them in to a whole picture of the place (such as Fig.3). In order to combine these photos, we have to find the motion of the camera, and make the view point of these photos the same, and then we can perfectly combine these photos. Fig.1 Fig.2 Fig.3 Tracking Tracking is to track the motion of specified point from one picture to another. Usually these points will have special characteristics that allow us to have higher accuracy of their motions. Optical flow Optical flow is to determine the motion of every point from one photo to another, and these motions must have consistency. Therefore their accuracy might be worse than tracking. For the motion estimation, there exist tree assumptions that can help us solve this problem: Brightness consistency Image measurements (e.g. brightness) in a small region remain the same although their 1

location may change. 2005/03/23 Motion Estimation by Chu, Lin, and Hsien Spatial coherence Neighboring points in the scene typically belong to the same surface and hence typically have similar motions. Since they also project to nearby points in the image, we expect spatial coherence in image flow. Temporal persistence The image motion of a surface patch changes gradually over time. Image registration: Goal: register a template image J(x) and an input image I(x), where x = (x, y) T For 3 problems above, I and J are defined as followed: Image alignment: I(x) and J(x) are two images Tracking: J(x) is the image at time t, and I(x) is a small patch around the point p in the image at t+1. Optical flow: J(x) and I(x) are image of t and t+1. Simple approach: We can solve this problem simply by minimizing the brightness difference that is use the difference of brightness as our measurement. Simple SSD algorithm: For each offset (u, v) Compute E(u,v); Choose (u, v) which minimizes E(u,v); E( uv, ) = ( I( x+ uy, + v) J( xy, )) 2 xy, Problems: Not efficient, we have to calculate it pixel by pixel and repeat many times. No sub-pixel accuracy Lucas-Kanade algorithm This algorithm was proposed by B.D. Lucas and T. Kanade, An Iterative Image Registration Technique with an Application to Stereo Vision, Proceedings of the 1981 DARPA Image Understanding Workshop, 1981, pp121-130. First we consider Newton s method of finding root for f(x) = 0, by Taylor s expansion, the 2

' 1 '' 2 function f(x) can be approximated by f( x+ ε) = f( x0) + f ( x0) ε + f ( x0) ε +... 2 So in each iteration, set the approximate the root of f(x)=0. In the 2-dimension case we want to minimize f ( x ) ε = n n ' f ( xn ) and n+ 1 n f ' by using the same technique as Newton s method to find the root of E 0= = 2 I x( I( x, y) J( x, y) + uix + viy) and u xy, xy, x f ( xn ) = x, we can the ( x ) E( uv, ) = I( x+ uy, + v) J( xy, ), and E 0= = 2 I y( I( x, y) J( x, y) + uix + viy), we can have Lucas-Kanade algorithm. v xy, n ( ) 2 into For parametric model, we need to transfer Euv (, ) = ( I( x+ uy, + v) J( xy, )) 2 x ( ) 2 E( p) = I( W(x;p) ) J( x ) xy, And finally the algorithm becomes: iterate warp I with W(x;p) compute error image J(x,y)-I(W(x,p)) compute gradient image evaluate Jacobian at (x;p) W compute I p compute Hessian W I J( ) I( ) x p x W(x;p) solve p update p by p+ p compute [ ] W x p until converge 1 p= H I [ J( x) I( W(x;p) )] T Tracking Goal of Tracking Given two images, we d like to know where the corresponding point of image1 is in the image2. 3

brightness constancy: The basic assumption behind SSD minimization is brightness constancy. I( x+ u, y+ v, t+ 1) I( x, y, t) = 0 At a point a small distance away, and a small time later, the intensity is I( xyt,,) + ui( xyt,,) + vi( xyt,,) + I(, xyt,) I( xyt,,) 0 x y t ui( xyt,, ) + vi( xyt,, ) + I( xyt,, ) = 0 x y t Iu+ Iv+ I = 0 x y t The derived equation is also called Optical flow constraint equation. If only one image pixel is used (one equation in two unknowns), the result will be a line. Normal flow could be derived as following: r Normal speed: S = v nˆ (projection of velocity onto normal) uuv Normal Velocity: v s nˆ = r It I Since v = and nˆ =, I I 2 uuv v It I I v ˆ ˆ = v n n = I I 2 I 2 uuv v It I v v nˆ nˆ = = 2 I 2 In order to get the accurate result, the multiple constraints are combined to get an estimate of the velocity. 4

Area-based method Because of the disadvantage of the aforementioned methods, the area based method is used. Under the assumption of Spatial smoothness, we could use this technique to find out the best match. The method is similar to multiple constraint, and the best match can be easily found. However, the size of block and the range of the block are important issues. Larger window reduces ambiguity, but easily violates spatial smoothness assumption. Beside where to search is also an important factor. 5

In the above graph, the middle image reveals insufficient information about the original image and hard to find out the best match. At the meanwhile, the rightmost image is good enough to find the best match. In the remaining section, the math equations are derived. Assume spatial smoothness ( ) 2 Euv (, ) = Iu x + Iv y + It xy, must be invertible The eigenvalues tell us about the local image structure and how well we can estimate the flow in both directions. KLT tracking The KLT tacking is selecting features by min( λ1, λ2) > λ and the features are monitored by measuring dissimilarity. The details of KLT algorithm are not covered in the class. KLT is quite similar to SIFT but the motion is considered. However, in the practical use, SIFT can get the better result than KLT even if SIFT doesn t take motion into the consideration. There re two main reasons: 1. KLT accumulates errors. 6

2. KLT doesn t consider affine transformations. Optical Flow Multiple motions via late many assumptions Single motion assumption underlies the common correlation and gradient-based approaches and is violated when a region contains transparency, specular reflections, shadows, or fragmented occlusion. Spatial coherence constraint suffers from the same problem. It assumes that the flow within a neighborhood changes gradually since it is caused by a single motion. Least-square estimation is not robust If two motions are present in a neighborhood, two sets of constraints will be consistent with different motions. When examining one of the motions, the constraints fro the other motion will appear as gross errors which we refer to as outliers. Unfortunately, least-square estimation is known to lack robustness in the presence of outliers. As shown in Figure 1, least-square estimation performs badly when some outliers exist. Figure 2 further shows the examples of using it to fit a result after compromising two different motions. 7

(a) (b) Figure 1. (a) Use least-square to fit a line with coherent data. (b) Use least-square to fit a line some outliers. (a) Figure 2. Least square estimation in multiple motions (b) Robust statistical method The main goals of robust statistics are to recover the structure that best fits the majority of the data while identifying and rejecting outliers or deviating substructures. The problem of least-squares solution is that outlying measurements are assigned a high weight by a quadratic function, as shown in Figure 3. The influence of data points, which is proportional to the derivative of the quadratic function, increases linearly and without bound. Therefore, to reduce the influence of outliers, weighting function like truncated quadratic or other variations (Figure 4) could be used. Figure 3. Weight and influence functions in least-square estimation. 8

Figure 4. An example of weighting function to reduce the influence of outliers. Sample result of robust statistical method In the sequence of Figure 5, the camera is stationary and a person is moving behind a plant resulting in fragmented occlusion. The robust estimation framework allows the dominant motion (of the plant and the background) to be accurately estimated while ignoring the motion of the person. Figures 6 and 7 show the sample results of detecting the major and secondary motions in this image sequence. Figure 5. Sample image sequence. 9

Figure 6. Robustly determining the dominant motion. (a) Violations of the single motion assumption shown as dark regions. (b) Constraint lines corresponding to the dominant motion. Figure 7. Estimating multiple motions. (a) White regions correspond to a second consistent motion (the person and his shadow). (b) Constraint lines corresponding to the secondary motion. Regularization and dense optical flow Assumption 1: Neighboring points in the scene typically belong to the same surface and hence typically have similar motions. Assumption 2: Since they also project to nearby points in the image, we expect spatial coherence in image flow. Regularization First, we want to formulate the regularization problem. Given a 1-D signal, as shown in Figure 8(a), we want to find a smoothed function that best fits this signal (Figure 8(b)). We both consider the data conservation and spatial smoothness. The regularization term is written as the formula in Figure 8(c), where λ controls the relative importance of the data conservation and spatial coherence terms. Further, we replace the least-square form with a robust function ρ to perform robust regularization (Figure 8(d)). That s how we robustly deal with motion boundary problem. 10

(a) 2005/03/23 Motion Estimation by Chu, Lin, and Hsien (b) (c) Figure 8. Formulation of regularization. (d) Problems posted by motion boundaries Figure 9 illustrates the situation which occurs at a motion boundary. With the least-square formulation the local flow vector u i,j is forced to be close to the average of its neighbors. When a motion discontinuity is present this results in smoothing across the boundary which reduces the accuracy of the flow field and obscures important structural information about the presence of an object boundary. Figure 9. Smoothing across a flow discontinuity. An example of oversmoothing Figure 10(a) shows a synthetic image sequence in which the left half of the image is stationary and the right half is moving one pixel to the left between frames. The horizontal and vertical components of the flow are shown with the magnitude of the flow represented by intensity, where black indicates motion to the left and up and gray indicates no motion. The true horizontal and vertical motions are shown in Figures 10(b) and (c), respectively. 11

(a) (b) (c) Figure 10. Random noise example. (a) First random noise image in the sequence. (b) True horizontal motion (black = -1 pixel, white = 1 pixel, gray = 0 pixels). (c) True vertical motion. Figure 11 shows a plot of the horizontal motion where the height of the plot corresponds to the recovered image velocity. Figure 11(a) shows that the application of the least-squares formulation results in motion estimates which very smoothly thus obscuring the motion boundary. When we recast the problem in the robust estimation framework, the problems of oversmoothing are reduced (Figure 11(b)). Figure 11. Horizontal displacement. The horizontal component of motion is interpreted as height and plotted. Plotting the results illustrates the oversmoothing of the least-square solution (a), and the sharp discontinuity which is preserved by robust estimation (b). In another kind of presentation, we can see the estimation differences between quadratic and robust methods in Figure 12. The quadratic method introduces blur effects in motion boundaries, while robust method keeps sharp estimation in boundaries. 12

Quadratic Horizontal motion Vertical motion Robust Horizontal motion Vertical motion Figure 12. Estimation differences between the quadratic and robust methods. Applications of optical flow impressionist effects One application of optical flow is to produce impressionist effect for images or videos. Figure 13(b) is obtained after generating brush strokes which orientation is 45. Brush generation method is modified so that brush strokes are clipped to edges in Figure 13(c). Next, an artist may not want to have all strokes drawn in the same direction. Therefore, the effect is improved that the stroke direction is decided by the gradient (Figure 13(d)). Furthermore, techniques for Figure 13(d) is modified such that with vanishing gradient magnitude are interpolated from surrounding regions (Figure 13(e)). Brush strokes may also be rendered with textured brush images that have r,g,b and alpha components. Figure 13(f) shows an example of applying texture brush. Details of this application please see Peter Litwinowicz, Processing Images and Video for An Impressionist Effects, SIGGRAPH 1997. Temporal coherence In a video sequence, the optical flow vector field is used as a displacement field to move the brush strokes to new locations in a subsequent frame. We must make sure to generate new strokes near the image boundaries to maintain temporal coherence. As shown in Figure 14, new brushes will be generated when regions are too sparse. Details of this application please see Peter Litwinowicz, Processing Images and Video for An Impressionist Effects, SIGGRAPH 1997. 13

(a) Input image (b) Brush (c) Edge clipping (d) Gradient (e) Smooth gradient (f) Texture brush Figure 13. Process of producing impressionist effect for images. 14

Figure 14. The process of generating new brushes. 15