• Aucun résultat trouvé

Multigrid Acceleration of the Horn-Schunck Algorithm for the Optical Flow Problem

N/A
N/A
Protected

Academic year: 2022

Partager "Multigrid Acceleration of the Horn-Schunck Algorithm for the Optical Flow Problem"

Copied!
80
0
0

Texte intégral

(1)

Multigrid Acceleration

of the Horn-Schunck Algorithm for the Optical Flow Problem

El Mostafa Kalmoun kalmoun@cs.fau.de

Ulrich Ruede ruede@cs.fau.de

(2)

Overview

• Introduction and Related Works

• Optical Flow Constraints

• Regularization

• Horn Schunck Algorithm

• Multigrid Scheme

• A Simple Illustration

• Variational Multigrid

• Experimental Results

(3)

Introduction and Related Works

y

x

Frame at time t

(4)

Introduction and Related Works

y

x

Frame at time t

y+dy

x+dx Frame at time t + dt

dy

dx

(5)

Introduction and Related Works

y

x

Frame at time t

y+dy

x+dx Frame at time t + dt

dy

dx

The optical flow at the pixel (x,y) is the 2D-velocity vector (u,v) = (dx

dt ,dy dt )

(6)

Introduction and Related Works

y

x

Frame at time t

y+dy

x+dx Frame at time t + dt

dy

dx

The optical flow at the pixel (x,y) is the 2D-velocity vector (u,v) = (dx

dt ,dy dt )

• An approximation of the 2D-motion

(7)

Introduction and Related Works

y

x

Frame at time t

y+dy

x+dx Frame at time t + dt

dy

dx

The optical flow at the pixel (x,y) is the 2D-velocity vector (u,v) = (dx

dt ,dy dt )

• An approximation of the 2D-motion • Optical Flow 6= Motion

(8)

Introduction and Related Works

./ Term originates with James Gibson in 1979

./ Quadratic smoothness ↔ Horn–Schunck (1981)

./ Registration technique with local constraints ↔ Lucas–Kanade (1981)

./ Oriented smoothness ↔ Nagel–Enkelmann (1983–86) ./ Multigrid relaxation ↔ Terzopolous (1986)

./ Performance evaluation of popular algorithms ↔ Barron–Fleet–Beauchemin (1994)

./ General anisotropic smoothness ↔ Weickert (1996)

(9)

Optical Flow Constraints

I(x,y,t) : The image intensity of the pixel (x,y) at time t.

Ix,Iy,It : Spatial and temporal derivatives of I.

(10)

Optical Flow Constraints

I(x,y,t) : The image intensity of the pixel (x,y) at time t.

Ix,Iy,It : Spatial and temporal derivatives of I.

Assumption : Objects keep the same intensity over time

(11)

Optical Flow Constraints

I(x,y,t) : The image intensity of the pixel (x,y) at time t.

Ix,Iy,It : Spatial and temporal derivatives of I.

Assumption : Objects keep the same intensity over time

I(x,y,t) = I(x+dx,y+dy,t +dt)

(12)

Optical Flow Constraints

I(x,y,t) : The image intensity of the pixel (x,y) at time t.

Ix,Iy,It : Spatial and temporal derivatives of I.

Assumption : Objects keep the same intensity over time

I(x,y,t) = I(x+dx,y+dy,t +dt) Taylor Expansion =⇒

I

x

u + I

y

v + I

t

= 0

The optical flow constraint equation (OFCE)

(13)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

(14)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

v

u

(15)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

v

u

∇I~

(16)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

v

u

∇I~

−It/|∇I~ |

(17)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

v

u

∇I~

−It/|∇I~ |

OFC line

(18)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

v

u

∇I~

−It/|∇I~ |

OFC line

~ w1

(19)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

v

u

∇I~

−It/|∇I~ |

OFC line

~ w1

~ w2

(20)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

v

u

∇I~

−It/|∇I~ |

OFC line

~ w1

~ w2

We can only calculate the normal component of the velocity ~w and not the tangent flow

(21)

Optical Flow Constraints

An equivalent form of the (OFCE) :

∇~I.~w = −ItDI.(~~ w,1) = 0

where

∇~I = (Ix,Iy) , DI~ = (Ix,Iy,It)

and

~w = (u,v)

v

u

∇I~

−It/|∇I~ |

OFC line

~ w1

~ w2

We can only calculate the normal component of the velocity ~w and not the tangent flow −→ The aperture problem.

(22)

Regularization

The (OFCE) is replaced by min

(u,v)

Z

x

Z

y

E(u,v) dxdy (P)

(23)

Regularization

The (OFCE) is replaced by min

(u,v)

Z

x

Z

y

E(u,v) dxdy (P)

where

E = EdEr,

Ed(u,v) = (Ixu+Iyv+It)2 (the data term) Er is the regularization term

(24)

Regularization

The (OFCE) is replaced by min

(u,v)

Z

x

Z

y

E(u,v) dxdy (P)

where

E = EdEr,

Ed(u,v) = (Ixu+Iyv+It)2 (the data term) Er is the regularization term

and

α is a positive scalar for adjustment between Ed and Er

(25)

Regularization

The (OFCE) is replaced by min

(u,v)

Z

x

Z

y

E(u,v) dxdy (P)

where

E = EdEr,

Ed(u,v) = (Ixu+Iyv+It)2 (the data term) Er is the regularization term

and

α is a positive scalar for adjustment between Ed and Er

The method for solving (P) will depend on the choice of Er.

(26)

Horn-Schunck Algorithm

A standard choice of Er is the isotropic stabilizer :

Er(u,v) = |∇u|2+|∇v|2

(27)

Horn-Schunck Algorithm

A standard choice of Er is the isotropic stabilizer :

Er(u,v) = |∇u|2+|∇v|2 From calculus of variations, we get

α∆u−Ix(Ixu+Iyv+It) = 0 α∆vIy(Ixu+Iyv+It) = 0

(28)

Horn-Schunck Algorithm

A standard choice of Er is the isotropic stabilizer :

Er(u,v) = |∇u|2+|∇v|2 From calculus of variations, we get

α∆u−Ix(Ixu+Iyv+It) = 0 α∆vIy(Ixu+Iyv+It) = 0 We discretize the Laplacien ∆ by the standard 5 point stencil

1 1 −4 1

1

and use ∆w = w¯ −w where w¯ is the average of the neighbors.

(29)

Horn-Schunck Algorithm

Spatial and Temporal Image Derivatives Masks

(30)

Horn-Schunck Algorithm

Spatial and Temporal Image Derivatives Masks

Mx = 14

−1 1

−1 1

My = 14

1 1

−1 −1

Mt = 14

1 1 1 1

(31)

Horn-Schunck Algorithm

Spatial and Temporal Image Derivatives Masks

Mx = 14

−1 1

−1 1

My = 14

1 1

−1 −1

Mt = 14

1 1 1 1

Ix = Mx∗(I1+I2) Iy = My∗(I1+I2) It = Mt ∗(I2I1)

Coupled Gauss-Seidel relaxation

(32)

Horn-Schunck Algorithm

Spatial and Temporal Image Derivatives Masks

Mx = 14

−1 1

−1 1

My = 14

1 1

−1 −1

Mt = 14

1 1 1 1

Ix = Mx∗(I1+I2) Iy = My∗(I1+I2) It = Mt ∗(I2I1)

Coupled Gauss-Seidel relaxation

uk+1 = u¯kIx Ixu¯k+Iyv¯k+It α+Ix2+Iy2 vk+1 = v¯kIy Ixu¯k+Iyv¯k+It

α+Ix2+Iy2

(33)

Multigrid Scheme

Multigrid Components

(34)

Multigrid Scheme

Multigrid Components

./ Vertex-centered grid and standard coarsening

(35)

Multigrid Scheme

Multigrid Components

./ Vertex-centered grid and standard coarsening

./ Coupled lexicographic point Gauss-Seidel smoother

(36)

Multigrid Scheme

Multigrid Components

./ Vertex-centered grid and standard coarsening

./ Coupled lexicographic point Gauss-Seidel smoother ./ Full weighting and bilinear interpolation

(37)

Multigrid Scheme

Multigrid Components

./ Vertex-centered grid and standard coarsening

./ Coupled lexicographic point Gauss-Seidel smoother ./ Full weighting and bilinear interpolation

./ Discretization coarse grid approximation (DCA approach)

(38)

A Simple Illustration

Intensity value :

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

(39)

A Simple Illustration

Intensity value :

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

(40)

A Simple Illustration

Intensity value :

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

Corresponding system of PDE’s :

α∆u = u+v+1 α∆v = u+v+1

(41)

A Simple Illustration

Intensity value :

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

Corresponding system of PDE’s :

α∆u = u+v+1 α∆v = u+v+1

(42)

A Simple Illustration

Intensity value :

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

Corresponding system of PDE’s :

α∆u = u+v+1 α∆v = u+v+1

α = 1 and u0 6= v0

Method Convergence rate

Horn-Schunck 0.998

V(1,0) 0.370

V(1,1) 0.183

V(2,1) 0.116

V(3,3) 0.056

(43)

Variational Multigrid

Write the system of the two PDE’s as

L

u v

=

f g

(44)

Variational Multigrid

Write the system of the two PDE’s as

L

u v

=

f g

where

f = −IxIt , g = −IyIt

L = Ld +Lr , Lr =

−α∆ 0 0 −α∆

and Ld is a 2x2 block diagonal matrix with entries

Ix2 IxIy IxIy Iy2

(45)

Variational Multigrid

Write the system of the two PDE’s as

L

u v

=

f g

where

f = −IxIt , g = −IyIt

L = Ld +Lr , Lr =

−α∆ 0 0 −α∆

and Ld is a 2x2 block diagonal matrix with entries

Ix2 IxIy IxIy Iy2

Ld (positive semi-definite)

(46)

Variational Multigrid

Write the system of the two PDE’s as

L

u v

=

f g

where

f = −IxIt , g = −IyIt

L = Ld +Lr , Lr =

−α∆ 0 0 −α∆

and Ld is a 2x2 block diagonal matrix with entries

Ix2 IxIy IxIy Iy2

Ld (positive semi-definite) + Lr (positive definite)

(47)

Variational Multigrid

Write the system of the two PDE’s as

L

u v

=

f g

where

f = −IxIt , g = −IyIt

L = Ld +Lr , Lr =

−α∆ 0 0 −α∆

and Ld is a 2x2 block diagonal matrix with entries

Ix2 IxIy IxIy Iy2

Ld (positive semi-definite) + Lr (positive definite) = L (positive definite).

(48)

Variational Multigrid

Variational Minimization Form

Lw = F ⇐⇒ w = arg min

a(z)

(49)

Variational Multigrid

Variational Minimization Form

Lw = F ⇐⇒ w = arg min

a(z) a(z) = 12(Lz,z)−(F,z)

(50)

Variational Multigrid

Variational Minimization Form

Lw = F ⇐⇒ w = arg min

a(z) a(z) = 12(Lz,z)−(F,z)

Galerkin Approach

Let IHh : ΩH 7→ Ωh be a full rank linear mapping.

(51)

Variational Multigrid

Variational Minimization Form

Lw = F ⇐⇒ w = arg min

a(z) a(z) = 12(Lz,z)−(F,z)

Galerkin Approach

Let IHh : ΩH 7→ Ωh be a full rank linear mapping.

An optimal coarse grid correction IHhwH of wh is characterized by

((IHh)TLhIHh)wH = (IHh)T (F −Lhwh)

(52)

Variational Multigrid

The CGO is chosen then as follows

LH = IhHLhIHh and IhH = (IHh)T

(53)

Variational Multigrid

The CGO is chosen then as follows

LH = IhHLhIHh and IhH = (IHh)T

For our system, we get

LH =

R 0 0 R

L1h L2h L2h L3h

P 0 0 P

=

R L1hP R L2hP R L2hP R L3hP

(54)

Variational Multigrid

Multigrid Components

(55)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

(56)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

. Galerkin coarse grid approximation (GCA approach)

(57)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

. Galerkin coarse grid approximation (GCA approach)

The General Scheme

(58)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

. Galerkin coarse grid approximation (GCA approach)

The General Scheme

READ FRAMES

(59)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

. Galerkin coarse grid approximation (GCA approach)

The General Scheme

READ FRAMES

COMPUTE

SPATIAL and TEMPORAL FRAMES DERIVATIVES

(60)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

. Galerkin coarse grid approximation (GCA approach)

The General Scheme

READ FRAMES

COMPUTE

SPATIAL and TEMPORAL FRAMES DERIVATIVES

CALCULATE the FINEST GRID OPERATOR and the RHS

(61)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

. Galerkin coarse grid approximation (GCA approach)

The General Scheme

READ FRAMES

COMPUTE

SPATIAL and TEMPORAL FRAMES DERIVATIVES

CALCULATE the FINEST GRID OPERATOR and the RHS

SET UP

the COARSE GRID OPERATORS HIEARACHY with GALERKIN

(62)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

. Galerkin coarse grid approximation (GCA approach)

The General Scheme

READ FRAMES

COMPUTE

SPATIAL and TEMPORAL FRAMES DERIVATIVES

CALCULATE the FINEST GRID OPERATOR and the RHS

SET UP

the COARSE GRID OPERATORS HIEARACHY with GALERKIN SOLVE

with

MULTIGRID V-CYCLING

(63)

Variational Multigrid

Multigrid Components

. Vertex-centered grid and standard coarsening

. Coupled lexicographic point Gauss-Seidel smoother . Full weighting and bilinear interpolation

. Galerkin coarse grid approximation (GCA approach)

The General Scheme

READ FRAMES

COMPUTE

SPATIAL and TEMPORAL FRAMES DERIVATIVES

CALCULATE the FINEST GRID OPERATOR and the RHS

SET UP

the COARSE GRID OPERATORS HIEARACHY with GALERKIN SOLVE

with

MULTIGRID V-CYCLING WRITE

the OPTICAL FLOW FIELD

(64)

Experimental Results

(65)

Experimental Results

A rotating sphere (128x128)

(66)

Experimental Results

A rotating sphere (128x128) the flow field

(67)

Experimental Results

the flow field after scaling

(68)

Experimental Results

The marble sequence (512x512)

(69)

Experimental Results

The marble sequence (512x512) the flow field

(70)

Experimental Results

the flow field after scaling

(71)

Experimental Results

The Hamburg taxi sequence (256x190)

(72)

Experimental Results

The Hamburg taxi sequence (256x190) the flow field

(73)

Experimental Results

the flow field after scaling

(74)

Experimental Results

α = 5 and u0 = v0 = 0 on P4 2.4GHz

Sphere Marble Taxi

ρ CPU ρ CPU ρ CPU Horn-Schunck 0.98 3.9 0.98 106 0.98 20.8 VMG V(2,1) 0.15 1.1 0.43 23.8 0.45 4.3

(75)

Experimental Results

α = 5 and u0 = v0 = 0 on P4 2.4GHz

Sphere Marble Taxi

ρ CPU ρ CPU ρ CPU Horn-Schunck 0.98 3.9 0.98 106 0.98 20.8 VMG V(2,1) 0.15 1.1 0.43 23.8 0.45 4.3

+ Robust (but not yet optimal convergence)

(76)

Experimental Results

α = 5 and u0 = v0 = 0 on P4 2.4GHz

Sphere Marble Taxi

ρ CPU ρ CPU ρ CPU Horn-Schunck 0.98 3.9 0.98 106 0.98 20.8 VMG V(2,1) 0.15 1.1 0.43 23.8 0.45 4.3

+ Robust (but not yet optimal convergence)

* need matrix dependent transfer grid operators

(77)

Experimental Results

α = 5 and u0 = v0 = 0 on P4 2.4GHz

Sphere Marble Taxi

ρ CPU ρ CPU ρ CPU Horn-Schunck 0.98 3.9 0.98 106 0.98 20.8 VMG V(2,1) 0.15 1.1 0.43 23.8 0.45 4.3

+ Robust (but not yet optimal convergence)

* need matrix dependent transfer grid operators – Galerkin leads to high memory costs

⇒ search for better representation of the CGOs

(78)

Future work

• Application in medicine imaging

• Consider other regularization (e.g. by Nagel, Weickert ...)

(79)

Future work

• Application in medicine imaging

• Consider other regularization (e.g. by Nagel, Weickert ...)

PLEASE WAKE UP!

(80)

Future work

• Application in medicine imaging

• Consider other regularization (e.g. by Nagel, Weickert ...)

PLEASE WAKE UP!

THANKS FOR YOUR ATTENTION

Références

Documents relatifs

The authors have proposed an efficient numerical model that can handle this multi-scale problem: using billion points and locally refined

The simulated and experimental results for quantitative photoacoustic tomography reconstruction show that the proposed multigrid inversion can dramatically reduce the required

Structure and displacement w distribution at the boundary surface: y ¼ 32r for the real case and the ideal case (interface layer thickness = 2r) respectively (from left to right:

Our examination of a large array of ion events near the bow shock reveals that FVD can be seen well only if: (a) high time resolution data are used, (b) ¯uxes from ion channels

To determine the role of the regulation of brain LDLR by PCSK9 and because apoE is the main apolipoprotein in brain that can bind LDLR, we quantifi ed the protein levels of

extinctions and large dispersal rates, the dormancy of dispersed seeds is selected against 482. in newly colonized (and empty) patches (see

Furthermore, these results highlight two distinct domains of IglG critical for protein function; a unique α-helical N-terminal extension dispensable for secretion but required

2 - 10 - ةماعلا ةمتاخلا : ك ةػػػػػػػػػػػػػػػػػػقدلا ـزلتست ذا ، اماجسنا ك اديقعت تاراهبؼا رثكأ دحا يثلاثلا بثولا ةيلاعف في يكربغا ءادلأا تاراهم برتعت