44
1 A Tutorial on VIDEO COMPUTING ACCV-2000 Mubarak Shah School Of Computer Science University of Central Florida Orlando, FL 32816 [email protected] http://cs.ucf.edu/~vision/ Course Contents • Introduction Part I: Measurement of Image Motion Part II: Change Detection and Tracking Part III: Video Understanding Part IV: Video Phones and MPEG-4 Multimedia • Text • Graphics • Audio • Images • Video Imaging Configurations Stationary camera stationary objects Stationary camera moving objects Moving camera stationary objects Moving camera moving objects Video sequence of images • clip • mosaic key frames Steps in Video Computing Acquire (CCD arrays/synthesize (graphics)) Process (image processing) Analyze (computer vision) Transmit (compression/networking) Store (compression/databases) Retrieve (computer vision/databases) Browse (computer vision/databases) Visualize (graphics)

A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

Embed Size (px)

Citation preview

Page 1: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

1

A Tutorial on VIDEO COMPUTING

ACCV-2000

Mubarak ShahSchool Of Computer ScienceUniversity of Central Florida

Orlando, FL [email protected]

http://cs.ucf.edu/~vision/

Course Contents

• Introduction • Part I: Measurement of Image Motion• Part II: Change Detection and Tracking• Part III: Video Understanding• Part IV: Video Phones and MPEG-4

Multimedia

• Text• Graphics• Audio• Images• Video

Imaging Configurations

• Stationary camera stationary objects• Stationary camera moving objects• Moving camera stationary objects• Moving camera moving objects

Video

• sequence of images• clip• mosaic• key frames

Steps in Video Computing

• Acquire (CCD arrays/synthesize (graphics))• Process (image processing)• Analyze (computer vision)• Transmit (compression/networking)• Store (compression/databases)• Retrieve (computer vision/databases)• Browse (computer vision/databases)• Visualize (graphics)

Page 2: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

2

Computer Vision

• Measurement of Motion– 2-D Motion– 3-D Motion

• Scene Change Detection

• Tracking• Video Understanding• Video Segmentation

Image Processing

• Filtering• Compression

– MPEG-1– MPEG-2– MPEG-4– MPEG-7 (Multimedia Content Description Interface)

Databases

• Storage• Retrieval• Video on demand• Browsing

– skim– abstract– key frames– mosaics

Networking

• Transmission• ATM

Computer Graphics

• Visualization• Image-based Rendering and Modeling• Augmented Reality

Video Computing

• Computer Vision• Image Processing• Computer Graphics• Databases• Networks

Page 3: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

3

PART I

Measurement of Motion

Contents

• Image Motion Models• Optical Flow Methods

– Horn & Schunck – Lucas and Kanade– Anandan et al– Mann & Picard

• Video Mosaics

3-D Rigid Motion

′′′

=

+ =

+

XYZ

RXYZ

Tr r rr r rr r r

XYZ

TTT

X

Y

Z

11 12 13

21 22 23

31 32 33

Translation (3 unknowns)Rotation matrix (9 unknowns)

Rotation

X

θ

φ

Y

R

R

Z

( , , )X Y Z

( , , )′ ′ ′X Y Z

φ

φ

sin

cos

RYRX

==

Y’

Y

X’

X

φφφ

φφφ

sincoscossin)sin(

sinsincoscos)cos(

Θ+Θ=+Θ=′Θ−Θ=+Θ=′

RRRY

RRRX

Θ+Θ=′Θ−Θ=′

cossinsincos

YXYYXX

ΘΘΘ−Θ

=

′′′

ZYX

ZYX

1000cossin0sincos

Rotation (continued)

Y

Z

u’v’

W

ΘΘ XR =

cos sin

sin cos

Θ ΘΘ Θ

0

0

0 0 1

Y

Zu’

vW’

β

β XR =−

cos sin

sin cos

β β

β β

0

0 1 0

0

R =

1 0 0

0 1 0

0 0 1

Y

v

W

Z

Xu

Euler Angles

−−++−

==γβγββ

γαγβαγαγβαβαγαγβαγαγβαβα

γβα

coscossincossinsincoscossinsincoscossinsinsincossinsinsincossincoscossinsinsincoscoscos

XYZ RRRR

R =

1

11

α β

α γβ γ

)cosΘ ≈1 sin Θ Θ≈

if angles are small(

Page 4: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

4

Perspective Projection

(X,Y,Z)

LensImage Plane

image Zy

f

ZfXx

ZfYy

Zf

Yy

−=−=

=−

Worldpoint

Orthographic Projection

(X,Y,Z)Image Plane

image

y

Worldpoint

XxYy

==

Displacement Model

Orthographic Projection

(x,y)=image coordinates,(X,Y,Z)=world coordinates

x Xy Y

==

′ = + + +

′ = + + +

x r x r y r Z T

y r x r y r Z TX

Y

11 12 13

21 22 23

( )

( )

243

121

byaxay

byaxax

++=′++=′

Affine Transformation′ = +x Ax b

′′

=

+ =

+

X

Y

Z

R

X

Y

Z

T

r r r

r r r

r r r

X

Y

Z

T

T

T

X

Y

Z

11 12 13

21 22 23

31 32 33

Orthographic Projection (contd.)

′ = − + +

′ = + − +

x x y Z T

y x y Z TX

Y

α β

α γ

=

+ =

+

X

Y

Z

R

X

Y

Z

T

X

Y

Z

T

T

T

X

Y

Z

1

1

1

α β

α γ

β γ

Plane+Perspective(projective)aX bY cZ+ + =1

[ ]a b cXYZ

= 1

=

+

X

YZ

R

X

YZ

T

[ ]′′′

=

+

XYZ

RXYZ

T a b cXYZ

equation of a plane

3d rigid motion

′′′

=

XYZ

AXYZ

[ ]A R T a b c= +

′ =′′

xXZ ′ =

′′

yYZ

focal length = -1

Page 5: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

5

Plane+perspective (contd.)

1

1

87

654

87

321

++++=′

++++=′

yaxaayaxay

yaxaayaxax

a 9 1=

scale ambiguity

1++=′

XXX

TCbA

′′

=

′−′−′−′−

yx

aaaaaaaa

yyyxyxxyxxyx

8

7

6

5

4

3

2

1

10000001

find a’s by least squares

Projective

Summary of Displacement Models

′= + + + +

′= + + + +

x a a x ay a x axy

y a ax a y a xy a y1 2 3 4

25

6 7 8 4 52

Pseudo Perspective

′= + + + + +

′= + + + +

x a ax ay ax ay axy

y a ax ay a x a ya xy1 2 3 4

25

26

7 8 9 102

112

12

Biquadratic

xyayaxaay

xyayaxaax

8765

4321

+++=′+++=′

Bilinear

Projective1

1

21

143

21

121

++++

=′

++++

=′

ycxcbyaxa

y

ycxcbyaxa

x

Affine243

121

byaxaybyaxax

++=′++=′

2

1

byybxx

+=′+=′Translation

2

1

cossin

sincos

byxy

byxx

++=′+−=′

θθ

θθRigid

Displacement Models (contd)

• Translation– simple– used in block matching– no zoom, no rotation, no pan and tilt

• Rigid– rotation and translation– no zoom, no pan and tilt

• Affine– rotation about optical axis only

– can not capture pan and tilt– orthographic projection

• Projective

– exact eight parameters (3 rotations, 3 translations and 2scalings)

– difficult to estimate

Displacement Models (contd)

• Biquadratic– obtained by second order Taylor series– 12 parameters

• Bilinear– obtained from biquadratic model by removing square

terms– most widely used– not related to any physical 3D motion

• Pseudo-perspective– obtained by removing two square terms and

constraining four remaining to 2 degrees of freedom

Displacement Models (contd)

Instantaneous Velocity Model

Page 6: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

6

3-D Rigid Motion

+

=

Z

Y

X

T

T

T

Z

Y

X

Z

Y

X

1

1

1

γβ

γα

βα

+

−−

−=

−′−′−′

Z

Y

X

TTT

ZYX

ZZYYXX

0

0

0

γβ

γα

βα

+

+

−−

−=

′′

Z

Y

X

T

TT

ZYX

ZYX

100

010

001

0

0

0

γβ

γα

βα

VXX +×Ω=

+

ΩΩ−

Ω−ΩΩΩ−

=

&

&

&

&

Z

Y

X

T

TT

Z

YX

Z

Y

X

0

00

12

13

23

3-D Rigid Motion

321

213

132

VXYZ

VZXY

VYZX

+Ω−Ω=

+Ω−Ω=

+Ω−Ω=

+×Ω=

&

&

&

& VXX

Orthographic Projection

(u,v) is optical flow

321

213

132

213

132

VXYZ

VZXY

VYZX

VZxyv

VyZxu

+Ω−Ω=

+Ω−Ω=

+Ω−Ω=

+×Ω=

+Ω−Ω==

+Ω−Ω==

&

&

&

&

&

&

VXX

Perspective Projection (arbitrary flow)

ZfYy

ZfXx

=

=

ZZ

yZY

fZ

ZfYYfZyv

ZZx

ZXf

Z

ZfXXfZxu

&&&&&

&&&&&

−=−

==

−=−

==

2

2

212331

2

2213

32

1

)(

)(

yf

xyf

yZVx

ZVfv

xf

xyf

yxZV

ZV

fu

Ω−Ω+−Ω+Ω−=

Ω+

Ω−Ω−−Ω+=

Plane+orthographic(Affine)

cYbXaZ ++=

14

133

122

322

21

211

Ω−=Ω−Ω=

Ω−=

Ω−Ω=Ω=

Ω+=

caba

aVb

caba

aVb

u A x b= +

ZxVvyZVu

132

321

Ω−Ω+=Ω−Ω+=

yaxabv

yaxabu432

211

++=

++=

Plane+Perspective (pseudo perspective)

yac

xab

aZ

cYbXaZ

−−=

++=

11

u fVZ

VZ

x yf

xyf

x

v fVZ

xVZ

yf

xyf

y

= + − − − +

= − + − + −

( )

( )

12

33

1 2 2

21 3

3 2 1 2

Ω ΩΩ Ω

Ω ΩΩ Ω

2548764

52

4321

yaxyayaxaav

xyaxayaxaau

++++=

++++=

Page 7: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

7

Measurement of Image Motion

• Local Motion (Optical Flow)• Global Motion (Frame Alignment) Computing Optical Flow

Image from Hamburg Taxi seq Image from Hamburg Taxi seq

Fleet & Jepson optical flow Horn & Schunck optical flow

Page 8: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

8

Tian & Shah optical flow Horn&Schunck Optical Flow

f x y t f x y tfx

dxfy

dyft

dt( , , ) ( , , )= + + +∂∂

∂∂

∂∂

Taylor Series

),,(),,( dttdyydxxftyxf +++=

brightness constancy eq0=++ tyx fvfuf

0=++ dtfdyfdxf tyx

Interpretation of optical flow eq

y

t

y

x

ff

uff

v −−=

df

f ft

x y

=+2 2

d=normal flow

p=parallel flow

Equation of st.line

0=++ tyx fvfuf

Horn&Schunck (contd)

variational calculus( ) ( )∫∫ + + + + + +f u f v f u u v v dxdyx y t x y x y

2 2 2 2 2λ

( ) ( )

( ) (( )

f u f v f f u

f u f v f f v

x y t x

x y t y

+ + + =

+ + + =

λ

λ

2

2

0

0

( ) ( )

( ) (( )

f u f v f f u u

f u f v f f v vx y t x av

x y t y av

+ + + − =

+ + + − =

λ

λ

0

0

u u fPD

v v fPD

a v x

a v y

= −

= −

P f u f v f

D f fx av y av t

x y

= + +

= + +λ 2 2

discrete version

min

Algorithm-1

• k=0• Initialize u vK K

u u fPD

v v fPD

Kavk

x

avK

y

= −

= −

1

1

P f u f v f

D f fx av y av t

x y

= + +

= + +λ 2 2

• Repeat until some error measure is satisfied

Convolution

Page 9: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

9

Convolution (contd)

),(*),(),(

),(),(),(1

1

1

1

yxgyxfyxh

jigjyixfyxhi j

=

++= ∑ ∑−= −=

Derivative Masks

f x f y f t

frame-1 frame-2 frame-1frame-1 frame-2frame-2

Synthetic Images Results

One iteration 10 iterations

Comments

• Algorithm-1 works only for small motion.• If object moves faster, the brightness

changes rapidly, 2x2 or 3x3 masks fail to estimate spatiotemporal derivatives.

• Pyramids can be used to compute large optical flow vectors.

Pyramids

• Very useful for representing images.• Pyramid is built by using multiple copies of

image.• Each level in the pyramid is 1/4 of the size

of previous level.• The lowest level is of the highest resolution.• The highest level is of the lowest resolution.

Page 10: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

10

PyramidGaussian Pyramid

Algorithm-2 (Optical Flow)

• Create Gaussian pyramid of both frames.• Repeat

– apply algorithm-1 at the current level of pyramid.

– propagate flow by using bilinear interpolation to the next level, where it is used as an initial estimate.

– Go back to step 2

Horn&Schunck Method

• Good only for translation model.

• Over-smoothing of boundaries.

• Does not work well for real sequences.

Other Optical Flow Methods

Important Issues

• What motion model?• What function to be minimized?• What minimization method?

Page 11: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

11

Minimization Methods

• Least Squares fit• Weighted Least Squares fit• Newton-Raphson• Gradient Descent• Levenberg-Marquadet

Lucas & Kanade (Least Squares)

• Optical flow eq

tyx fvfuf −=+

999

111

tyx

tyx

fvfuf

fvfuf

−=+

−=+

M

=

9

1

9

1

9

1

t

t

y

y

x

x

f

f

v

u

f

f

f

f

MMM

tfAu =

• Consider 3 by 3 window

Lucas & Kanade

tTT

tTT

t

fAAAu

fAAuA

fAu

1)( −=

=

=

22

2

2

2

)(min tii j

yixi fvfuf ++∑ ∑−= −=

Lucas & Kanade

22

2

2

2

)(min tii j

yixi fvfuf ++∑ ∑−= −=

0)(

0)(

=++

=++

yitiyixi

xitiyixi

ffvfuf

ffvfuf

Lucas & Kanade

=

∑∑

∑∑−

tiyi

tixi

yiyixi

yixixi

ff

ff

fff

fff

v

u

1

2

2

Lucas & Kanade

22

2

2

2

)(min tii j

yixii fvfufw ++∑∑−= −=

tWfWAu=

tTT WfAWAuA =

tTT WfAWAAu 1)( −=

Page 12: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

12

Anandan

Affine

Affine

(0,0)

(1,1)

(x,y)x

x

(0,0)

(1,1)

(x’,y’)

243

121

),(

),(

byaxayxv

byaxayxu

++=

++=UXX −=′

Anandan

243

121

),(

),(

byaxayxv

byaxayxu

++=

++=

=

2

4

3

1

2

1

1000

0001

),(

),(

baabaa

yxyx

yxvyxu

•Affine

axXxu )()( =

Anandan

axXxu )()( =

2)()( uffaE T

xt δδ x+= ∑

2)()( affaE T

xt δδ Xx+=∑

=

y

x

f

ffX

min Optical flow constraint eq

tyx fvfuf −=+

Anandan

[ ] tTT fXxX

T fXaXffX ∑∑ −=δ))((

bAx =

Basic Components

• Pyramid construction• Motion estimation• Image warping• Coarse-to-fine refinement

Page 13: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

13

Mann & Picard

Projective

Projective Flow (weighted)

u f v f ff x f y t+ + = 0

1x ++

=′ TCbxx A

0=+ tTm fxfu

1x ++

=−′= TCbxxxu A

m

Projective Flow (weighted)

2)( tXTmfu fflow += ∑ε

2))1

(( tT f

A+−

++

= ∑ xT fxCx

bx

2))1())1((( tT

xT fx +++−+=∑ xCfxCbAx T

minimize

Projective Flow (weighted)

φφφ )()( txT f−= ∑∑ fxa T

Tccbaabaaa ],,,,,,,[ 212222111211=

],,,,,,,[ 22yxtyxtyyyxxx

t fyxyfyfxyffxxffyfxffyfxf −−−−=φ

Projective Flow (unweighted)

Bilinear

1x ++

=′ TCbxx A

xyayaxaayvxyayaxaaxu

m

m

8765

4321

+++=++++=+

Taylor Series

Page 14: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

14

Pseudo-Perspective

1x ++

=′ TCbxx A

254876

52

4321

yaxyayaxaavy

xyaxayaxaaux

m

m

++++=+

++++=+

Taylor Series

Projective Flow (unweighted)

2)( tXTmfu fflow += ∑ε

Minimize

Bilinear and Pseudo-Perspective

Φ−=ΦΦ ∑∑ tT fq)(

( )[ ]1,,,),1,,,( yxxyfyxxyf yxT =Φ

[ ]

yx

xx

yxT

fyxyfc

xyffxc

ccyxfyxf

22

21

21)1,,()1,,(

+=

+=

=Φbilinear

Pseudo perspective

Algorithm-1

• Estimate “q” (using approximate model, e.g. bilinear model).

• Relate “q” to “p”– select four points S1, S2, S3, S4– apply approximate model using “q” to compute – estimate exact “p”:

( , )′ ′x yk k

True Projective

[ ]T

kkkkkk

kkkkkk

k

k

ccbaabaa

yyyxyxxyxxyx

y

x

11243121

1000

0001

=

′−′−

′−′−=

′′

a

a

1

1

21

143

21

121

++++

=′

++++

=′

ycxcbyaxa

y

ycxcbyaxa

x

AaP

a

=

′−′−′−′−

′−′−′−′−

=

′′

′′

yyyxyxxyxxyx

yyyxyxxyxxyx

yx

yx

kkkkk

kkkkk

k

k

1000

0001

1000

0001

111111

111111

1

1

Perform least squares fit to compute a.

Page 15: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

15

Final Algorithm

• A Gaussian pyramid of three or four levels is constructed for each frame in the sequence.

• The parameters “p” are estimated at the top level of the pyramid, between the two lowest resolution images, “g” and “h”, using algorithm-1.

Final Algorithm

• The estimated “p” is applied to the next higher resolution image in the pyramid, to make images at that level nearly congruent.

• The process continues down the pyramid until the highest resolution image in the pyramid is reached.

Video Mosaics

• Mosaic aligns different pieces of a scene into a larger piece, and seamlessly blend them.– High resolution image from low

resolution images– Increased filed of view

Steps in Generating A Mosaic

• Take pictures

• Pick reference image• Determine transformation between

frames• Warp all images to the same reference

view

Applications of Mosaics

• Virtual Environments

• Computer Games• Movie Special Effects• Video Compression

Webpages

• http://n1nlf1.eecg.toronto .edu/tip.ps.gz

Video Orbits of the projective group, S. Mann and R. Picard. (paper)

• http://wearcam.org/pencigraphy (C code for generating mosaics)

Page 16: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

16

Webpages

• http://ww-bcs.mit.edu/people/adelson/papers.html

– The Laplacian Pyramid as a compact code, Burt and Adelson, IEEE Trans on Communication, 1983.

• J. Bergen, P. Anandan, K. Hanna, and R. Hingorani, “Hierarchical Model-Based Motion Estimation”, ECCV-92, pp 237-22.

Webpages

• http://www.cs.cmu.edu/afs/cs/project/cil/ftp/html/v-source.html (c code for several optical flow algorithms)

• ftp://csd.uwo.ca/pub/visionPerformance of optical flow techniques (paper)

Barron, Fleet and Beauchermin

Webpages

• http://www.wisdom.weizmann.ac.il/~irani/abstracts/mosaics.html (“Efficient representations of video sequences and their applications”, Michal Irani, P. Anandan, Jim Bergen, Rakesh Kumar, and Steve Hsu)

• R. Szeliski. “Video mosaics for virtual environments”, IEEE Computer Graphics and Applications, pages,22-30, March 1996.

Part II

Change Detection and Tracking

Contents

• Change Detection• Pfinder• W4• Skin Detection• Tracking People Using Color

Change Detection

Page 17: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

17

Main Points

• Detect pixels which are changing due to motion of objects.

• Not necessarily measure motion (optical flow), only detect motion.

• A set of connected pixels which are changing may correspond to moving object.

Picture Difference

>

=otherwise

TyxDPifyxDi KK0

),(1),(

|),(),(|),( 1 jyixfjyixfyxDP ii

m

mi

m

mj

++−++= −−= −=

∑ ∑

|),(),(|),( jyixfjyixfyxDP kii

m

mi

m

mi

m

mk

++−++= +−= −= −=

∑ ∑ ∑

|),(),(|),( 1 yxfyxfyxDP ii −−=

Background Image

• The first image of a sequence without any moving objects, is background image.

• Median filter)),(,),,((),( 1 yxfyxfmedianyxB nK=

PFINDER

Pentland

Pfinder

• Segment a human from an arbitrary complex background.

• It only works for single person situations.

• All approaches based on background modeling work only for fixed cameras.

Algorithm• Learn background model by watching 30 second video• Detect moving object by measuring deviations from

background model• Segment moving blob into smaller blobs by minimizing

covariance of a blob• Predict position of a blob in the next frame using

Kalman filter• Assign each pixel in the new frame to a class with max

likelihood.• Update background and blob statistics

Page 18: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

18

Learning Background Image

• Each pixel in the background has associated mean color value and a covariance matrix.

• The color distribution for each pixel is described by Gaussian.

• YUV color space is used.

Detecting Moving Objects

• After background model has been learned, Pfinder watches for large deviations from the model.

• Deviations are measured in terms of Mahalanobis distance in color.

• If the distance is sufficient then the process of building a blob model is started.

Detecting Moving Objects

• For each of k blob in the image, log-likelihood is computed

)2ln(5.||ln5.)()(5. 1 DmKyKyd kkkT

kk −−−−−= − µµ

• Log likelihood values are used to classify pixels

)),((maxarg),( yxdyxs kk=

Updating

•The statistical model for the background is updated.

y

yyEKtt

Tttt

αµαµ

µµ

+−=

−−=−1)1(

]))([(

• The statistics of each blob (mean and covariance) are re-computed.

W4 (Who, When, Where, What)

Davis

W4

• Compute “minimum”(M(x)), “maximum” (N(x)), and “largest absolute difference” (L(x)).

>−

>−

=

otherwise

yxLyxfyxN

oryxLyxfyxMif

yxD i

i

i

K0

),(|),(),(|

),(|),(),(|1

),(

Page 19: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

19

• Theoretically, the performance of this tracker should be worse than others.

• Even if one value is far away from the mean, then that value will result in an abnormally high value of L.

• Having short training time is better for this tracker.

Limitations

• Multiple people• Occlusion• Shadows• Slow moving people• Still background objects and deposited objects • Multiple processes (swaying of trees..)

Sohaib Khan & Mubarak Shah, “Tracking in Presence of Occlusion”, ACCV-2000

Webpage

• http://www.cs.cmu.edu/~vsam – DARPA Visual Surveillance and Monitoring

program

Skin Detection

Kjeldsen and Kender

Training

• Crop skin regions in the training images.• Build histogram of training images.• Ideally this histogram should be bi-modal,

one peak corresponding to the skin pixels, other to the non-skin pixels.

• Practically there may be several peaks corresponding to skin, and non-skin pixels.

Page 20: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

20

Training

• Apply threshold to skin peaks to remove small peaks.

• Label all values (colors) under skin peaks as “skin”, and the remaining values as “non-skin”.

• Generate a look-up table for all possible colors in the image, and assign “skin” or “non-skin” label.

Detection

• For each pixel in the image, determine its label from the “look-up table” generated during training.

Building Histogram

• Instead of incrementing the pixel counts in a particular histogram bin:– for skin pixel increment the bins centered

around the given value by a Gaussian function. – For non-skin pixels decrement the bins centered

around the given value by a smaller Gaussian function.

Tracking People Using Color

Fieguth and Terzopoulos

• Computer mean color vector for each sub region.

∑∈

=iRyxi

iii yxbyxgyxrR

bgr),(

)),(),,(),,((||

1),,(

Fieguth and Terzopoulos

• Compute goodness of fit.

),,( iii bgr

i

i

i

i

i

i

i

i

i

i

i

i

i

bb

gg

rr

bb

gg

rr

,,min

,,max

Target Measurement

),,( iii bgr

Page 21: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

21

Fieguth and Terzopoulos

• Tracking

∑=

++Ψ=Ψ

N

i

iHiHiHH N

yyxxyx

1

),(),(

),(minarg)ˆ,ˆ( ),( Hyx yxyx HHH

Ψ=

Fieguth and Terzopoulos

• Non-linear velocity estimator)1()( −= fvfv

tf

fvffif∆

=+>−))(sgn(

)()0)1().((ρ

δρρ

tf

fvfvfif∆

=+<−))(sgn(

)()0)1().((ρ

δρ

tfv

fvfif∆

=+=2

))(sgn()()0)(( δρ

Bibliography

• .J. K. Aggarwal and Q. Cai, “Human Motion Analysis: A Review”, Computer Vision and Image Understanding , Vol. 73, No. 3, March, pp. 428-440, 1999

• .Azarbayejani, C. Wren and A. Pentland, “Real-Time 3D Tracking of the Human Body”, MIT Media Laboratory, Perceptual Computing Section, TR No. 374, May 1996

• .W.E.L. Grimson et. al., “Using Adaptive Tracking to Classify and Monitor Activities in a Site”, Proceedings of Computer Vision and Pattern Recognition, Santa Barbara, June 23-25, 1998, pp. 22-29

Bibliography• .Takeo Kanade et. al. “Advances in Cooperative Multi-

Sensor Video Surveillance”, Proceedings of Image Understanding workshop , Monterey California, Nov 20-23, 1998, pp. 3-24

• .Haritaoglu I., Harwood D, Davis L, “W4 - Who, Where, When, What: A Real Time System for Detecting and Tracking People”, International Face and Gesture Recognition Conference, 1998

• .Paul Fieguth , Demetri Terzopoulos, “Color-Based Tracking of Heads and Other Mobile Objects at Video Frame Rates”, CVPR 1997, pp. 21-27

Part III

VIDEO UNDERSTANDING

Contents

• Monitoring Human Behavior In an Office• Visual Lipreading• Hand Gesture Recognition• Action Recognition using temporal

templates• Virtual 3-D blackboard• Detecting Events in Video

Page 22: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

22

Monitoring Human Behavior In an Office Environment

Doug Ayers and Mubarak Shah, “Recognizing HumanActivities In an Office Environment”, Workshop on

Applications of ComputerVision, October, 1998

Goals of the System

• Recognize human actions in a room for which prior knowledge is available.

• Handle multiple people• Provide a textual description of each

action• Extract “key frames” for each action

Possible Actions

• Enter• Leave• Sitting or Standing• Picking Up Object• Put Down Object• …..

Prior Knowledge

• Spatial layout of the scene: – Location of entrances and exits– Location of objects and some

information about how they are use

• Context can then be used to improve recognition and save computation

Layout of Scene 1 Layout of Scene 2

Page 23: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

23

Layout of Scene 4

Major Components

• Skin Detection • Tracking • Scene Change Detection• Action Recognition

Start

End Standing Sitting

Near CabinetNear Terminal

Using Terminal

Enter

Sit Leave

Use Terminal

Near Phone

Talking on Phone

Hanging Up Phone

Pick Up Phone

Put Down Phone

Stand

Opening/ClosingCabinet

Open / CloseCabinet

Sit / 0Stand / 0

State Model For Action Recognition

Key Frames

• Why get key frames?– Key frames take less space to store– Key frames take less time to transmit– Key frames can be viewed more quickly

• We use heuristics to determine when key frames are taken– Some are taken before the action occurs– Some are taken after the action occurs

Results

http://www.cs.ucf.edu/~ayers/research.html

Page 24: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

24

Key Frames Sequence 1 (350 frames), Part 1 Key Frames Sequence 1 (350 frames), Part 2

Key Frames Sequence 2 (200 frames)

Key Frames Sequence 3 (200 frames)

Page 25: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

25

Key Frames Sequence 4 (399 frames), Part 1

Key Frames Sequence 4 (399 frames), Part 2

Visual LipreadingLi Nan, Shawn Dettmer, and

Mubarak Shah, “Visual Lipreading”, Workshop on Face and Gesture

Recognition, Zurich, 1995.

Page 26: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

26

Image Sequences of “A” to “J” Particulars• Problem: Pattern differ spatially• Solution: Spatial registration using SSD• Problem : Articulations vary in length, and

thus, in number of frames.• Solution: Dynamic programming for

temporal warping of sequences.• Problem: Features should have compact

representation.• Solution: Principle Component Analysis.

Results

0102030405060708090

I II III

ES-1ES-2HMMCox

I: “A” to “J” one speaker, 10 training seqsII. “A” to “M”, one speaker, 10 training seqsIII. “A” to “Z”, ten speakers, two training seqs/letter/person

Page 27: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

27

Hand Gesture Recognition

Jim Davis and Mubarak Shah, “Visual Gesture Recognition”, IEE Proc. Vis Image Signal Processing,

October 1993.

Seven Gestures

Gesture Phases

• Hand fixed in the start position.• Fingers or hand move smoothly to gesture

position.• Hand fixed in gesture position.• Fingers or hand return smoothly to start

position.

Finite State Machine

Main Steps

• Detect fingertips.• Create fingertip trajectories using motion

correspondence of fingertip points.• Fit vectors and assign motion code to

unknown gesture.• Match

Detecting Fingertips

Page 28: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

28

Vector Extraction Vector Representation of Gestures

Results

Action Recognition Using Temporal Templates

A. Bobick and J. Davis, “Action Recognition Using Temporal Templates”, Motion-Based Recognition, ed: Mubarak Shah & Ramesh Jain, Kluwer Academic

Publishers, 1997

Main Points

• Use seven Hu moments of MHI and MEI to recognize different exercises.

• Use seven views (-90 degrees to +90 degrees in increments of 30 degrees).

• For each exercise several samples are recorded using all seven views, and the mean and covariance matrices for the seven moments are computed as a model.

• During recognition, for an unknown exercise all seven moments are computed, and compared with all 18 exercises using Mahalanobis distance.

• The exercise with minimum distance is computed as the match.

• They present recognition results with one and two view sequences, as compared to seven view sequences used for model generation.

MEI and MHI

),,(),,(1

0ityxDtyxE

i−=

=

τ

τ U

−−=

=otherwisetyxH

tyxifDtyxH

)1)1,,(,0max(1),,(

),,(τ

τ

τ

Motion-Energy Images (MEI)

Motion History Images (MHI)

Difference Pictures

Page 29: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

29

Virtual 3-D Blackboard:

Andrew Wu, Mubarak Shah & Niels Lobo, FG-2000REU [email protected] http://www.cs.ucf.edu/~vision(go to REU99)

Finger Tracking with a Single Camera

Summary of Algorithm

• Find head and arms using skin detection. • Estimate locations of shoulder and elbow .• Determine finger tip from arm outline, and

track it.• Compute 3 -D trajectory of finger tip using

spherical kinematics.

Movie

3-D finger tracking of a semi-circle

..\..\..\public_html\montage-semi.html

3-D Trajectory

Graphs of semi-circle movement, from varying viewpoints

XY

XZ

ZY

Saddle Point movie..\..\..\public_html\move-sad.html

..\..\..\public_html\move-spire.html

Spiral movie

Page 30: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

30

Open GL AnimationA Framework for the Design of

Visual Event Detectors

Niels Haering and Niels Da Vitoria Lobo, ACCV-2000

Hunt events HuntsNon-hunt

Hunt

Non-hunt

Landing Events Landing EventsNon-landing Approach

Touch-down Deceleration Non-landing

Page 31: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

31

Papershttp://www.cs.ucf.edu/~vision

• Claudette Cedras and Mubarak Shah, “Motion-Based Recognition: A survey”, Image and Vision Computing, March 1995.

• Jim Davis and Mubarak Shah, “Visual Gesture Recognition”, IEE Proc. Vis Image Signal Processing, October 1993.

• Li Nan, Shawn Dettmer, and Mubarak Shah, “Visual Lipreading”, Workshop on Face and Gesture Recognition, Zurich, 1995.

• Doug Ayers and Mubarak Shah, “Recognizing Human Activities In an Office Environment”, Workshop on Applications of Computer Vision, October, 1998.

Book

• Mubarak Shah and Ramesh Jain, “Motion-Based Recognition”, Kluwer Academic Publishers, 1997 ISBN 0-7923-4618-1.

BookMubarak Shah and Ramesh Jain, “Motion-

Based Recognition”, Kluwer Academic Publishers, 1997 ISBN 0-7923-4618-1.

Contents• Mubarak Shah and Ramesh Jain, “Visual Recognition

of Activities, Gestures, Facial Expressions and Speech: An Introduction and a Perspective”

• Human Activity Recognition– Y. Yacoob and L. Davis, “Estimating Image

Motion Using Temporal Multi-Scale Models of Flow and Acceleration

– A. Baumberg and D. Hogg, “Learning Deformable Models for Tracking the Human Body

– S. Seitz and C. Dyer, “Cyclic Motion Analysis Using the Period Trace”

Contents (contd.)

– R. Pollana and R. Nelson, “Temporal Texture and Activity Recognition”

– A. Bobick and J. Davis, “Action Recognition Using Temporal Templates”

– N. Goddard, “Human Activity Recognition”– K. Rohr, “Human Movement Analysis Based

on Explicit Motion Models”

Contents (contd.)• Gesture Recognition and Facial Expression

Recognition– A. Bobick and A. Wilson, “State-Based

Recognition of Gestures”– T. Starner and A. Pentland, “Real-Time

American Sign Language Recognition from Video Using Hidden Markov Models”

– M. Black , Y. Yacoob and S. Ju, “Recognizing Human Motion Using Parameterized Models of Optical Flow”

Page 32: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

32

Contents (contd.)

– I. Essa and A. Pentland, “Facial Expression Recognition Using Image Motion”

• Lipreading– C. Bregler and S. Omohumdro, “Learning

Visual Models for Lipreading”– A. Goldschen, O. Garcia and E. Petajan,

“Continuous Automatic Speech Recognition by Lipreading”

– N. Li, S. Dettmer and M. Shah, “Visually Recognizing Speech Using Eigensequences”

Part IV

Video Phones and MPEG-4

MPEG-1 & MPEG -2 Artifacts• Blockiness

– poor motion estimation– seen during dissolves and fades

• Mosquito Noises– edges of objects (high frequency DCT terms)

• Dirty Window– streaks or noise remain stationary while objects move

• Wavy Noise– seen during pans across crowds– coarsely quantized high frequency terms cause errors

Where MPEG-2 will fail?• Motions which are not translation

– zooms– rotations– non-rigid (smoke)– dissolves

• Others – shadows– scene cuts– changes in brightness

Video Compression At Low Bitrate

• The quality of block-based coding video (MPEG-1 & MPEG-2) at low bitrate, e.g., 10 kbps is very poor.– Decompressed images suffer from blockiness

artifacts – Block matching does not account for rotation,

scaling and shear

Model-Based Video Coding

Page 33: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

33

Model-Based Compression

• Object-based• Knowledge-based• Semantic-based

Model-Based Compression

• Analysis• Synthesis• Coding

Video Compression• MC/DCT

– Source Model: translation motion only– Encoded Information: Motion vectors and color

of blocks• Object-Based

– Source Model: moving unknown objects• translation only• affine• affine with triangular mesh

– Encoded Information: Shape, motion, color of each moving object

Video Compression

• Knowledge-Based– Source Model: Moving known objects– Encoded Information: Shape, motion and color

of known objects

• Semantic– Source Model: Facial Expressions– Encoded Information: Action units

Object-Based Coding

Frame

Unchangedregion changed

region

Uncoveredbackground

Moving region

Objec-1 Objec-2 Objec-3

MC MCMFMCMF MF

Contents

• Estimation using rigid+non-rigid motion model

• Making Faces (SIGGRAPH-98)• Synthesizing Realistic Facial Expressions

from Photographs (SIGGRAPH-98)• MPEG-4

Page 34: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

34

Model-Based Image Coding

• The transmitter and receiver both posses the same 3D face model and texture images.

• During the session, at the transmitter the facial motion parameters: global and local, are extracted.

• At the receiver the image is synthesized using estimated motion parameters.

• The difference between synthesized and actual image can be transmitted as residuals.

Face Model

• Candide model has 108 nodes, 184 polygons.• Candide is a generic head and shoulder

model. It needs to be conformed to a particular person’s face.

• Cyberware scan gives head model consisting of 460,000 polygons.

Wireframe Model Fitting• Fit orthographic projection of wireframe to

the frontal view of speaker using Affine transformation.

• Locate four features in the image and the projection of model.

• Find parameters of Affine using least squares fit.

• Apply Affine to all vertices, and scale depth.

Synthesis• Collapse initial wire frame onto the image to

obtain a collection of triangles.• Map observed texture in the first frame into

respective triangles.• Rotate and translate the initial wire frame

according to global and local motion, and collapse onto the next frame.

• Map texture within each triangle from first frame to the next frame by interpolation.

Video Phones

Motion Estimation

Perspective Projection (optical flow)

212331

2

2213

32

1

)(

)(

yf

xyf

yZV

xZV

fv

xf

xyf

yxZV

ZV

fu

Ω−

Ω+−Ω+Ω−=

Ω+

Ω−Ω−−Ω+=

Page 35: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

35

Optical Flow Constraint Eq

0=++ tyx fvfuf0))((

))((

212331

2

2213

32

1

=+Ω

−Ω

+−Ω+Ω−

+Ω+Ω−Ω−−Ω+

t

yx

fyf

xyf

yZV

xZV

f

fxf

xyf

yxZV

ZVff

tyx

yxxyyx

yxyx

fxfyff

xyffxfffff

fyf

fxyf

VyfxfZfV

ZffV

Zff

−=Ω+

+Ω+++Ω−+−

+−++

3

2

2

1

2

321

)(

)()(

)(()()(

tyx

yxxyyx

yxyx

fxfyff

xyffxfffff

fyf

fxyf

VyfxfZfV

ZffV

Zff

−=Ω+

+Ω+++Ω−+−

+−++

3

2

2

1

2

321

)(

)()(

)(()()(

bAx =),,,,,( 321321 ΩΩΩ= VVVx

Solve by Least Squares

+++−+−−

=

)()()()(()()(22

xfyff

xyff

xffffff

yff

xyfyfxfZf

Zff

Zff

A

yxyxxyyxyxyx

M

M

Making Faces

Guenter et al SIGGARPH’98

Making Faces

• System for capturing 3D geometry and color and shading (texture map).

• Six cameras capture 182 color dots on a face.

• 3D coordinates for each color dot are computed using pairs of images.

• Cyberware scanner is used to get dense wire frame model.

Page 36: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

36

Making Faces

• Two models are related by a rigid transformation.

• Movement of each node in successive frames is computed by determining correspondence of nodes.

Synthesizing Realistic Facial Expressions from Photographs

Pighin et al SIGGRAPH’98

Synthesizing Realistic Facial Expressions

• Select 13 feature points manually in face image corresponding to points in face model created with Alias.

• Estimate camera poses and deformed 3d model points.

• Use these deformed values to deform the remaining points on the mesh using interpolation.

Synthesizing Realistic Facial Expressions

• Introduce more points feature points (99) manually, and compute deformations as before by keeping the camera poses fixed.

• Use these deformed values to deform the remaining points on the mesh using interpolation as before.

• Extract texture.• Create new expressions using morphing.

Show Video Clip. MPEG-4

Page 37: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

37

MPEG-4

• MPEG-4 is the international standard for true multimedia coding.

• MPEG-4 provides very low bitrate & error resilience for Internet and wireless.

• MPEG-4 can be carried in MPEG-2 systems layer.

MPEG-4

• 3-D facial animation• Wavelet texture coding• Mesh coding with texture mapping• Media integration of text and graphics• Text to speech synthesis

Applications of MPEG-4

• Multimedia broadcasting and presentations• Virtual talking humans• Advanced interpersonal communication systems• Games• Storytelling• Language teaching• Speech rehabilitation • Teleshopping• Telelearning

MPEG-4

• Real audio and video objects

• Synthetic audio and video• Integration of Synthetic & Natural

contents (Synthetic & Natural Hybrid Coding)

MPEG-4

• Traditional video coding is block-based.• MPEG-4 provides object-based

representation for better compression and functionalities.

• Objects are rendered after decoding object descriptions.

• Display of content layers can be selected at MPEG-4 terminal.

Scope & Features of MPEG-4

• Authors– reusability– flexibility– content owner rights

• Network providers• End users

Page 38: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

38

Media Objects

• Primitive Media Objects• Compound Media Objects• Examples

– Still Images (e.g. fixed background)– Video objects (e.g., a talking person-without

background)– Audio objects (e.g., the voice associated with

that person)– etc

MPEG-4 Versions

MPEG-4

functioanlities

5 kbps

64 kbps

4 MbpsVLB Core1. Low resolution CIF (360X288)2. Low frame rate 15fps3. High coding efficiency 4. Low complexity, low error5. Random access6. Fast forward/reverse

High Bitrate1. Higher resolution2. Higher frame rate3. Interlaced video

Content-based functionalities1. Interactivity2. Flexible representation and Manipulation in the compressed Domain3. Hybrid coding

User Interactions

• Client Side– content manipulation done at client terminal

• changing position of an object• making it visible or invisible

• changing the font size of text

• Server Side– requires back channel

• Efficient representation of visual objects of arbitrary shape to support content-based functionalities

• Supports most functionalities of MPEG-1 and MPEG-2– rectangular sized images– several input formats– frame rates– bit rates– spatial, temporal and quality scalability

Page 39: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

39

Object Composition

• Objects are organized in a scene graph.• VRML based binary format BIF is used to

specify scene graph.• 2-D and 3-D objects, transforms and

properties are specified.• MPEG-4 allows objects to be transmitted

once, and displayed repeatedly in the scene after transformations.

MPEG-4 Scene

Display

Hypothetical Viewer

Audio CompositorVideo

Compositor

3-Dobjects

Multiplexeddownstream control data

Multiplexedupstream

control data

Background

sprite

voiceAudiovisual objects

Scene Graph

Scene

Person

deskglobespritevoice

background A/vpresentationfurniture

MPEG-4 Terminal

Upstream data

User events, class requests

Textures, Images and Video

• Efficient compression of – images and video– textures for texture mapping on 2D and 3D

meshes– implicit 2D meshes– time-varying geometry streams that animate

meshes

2-D Animated Meshes

• A 2-D mesh is tessellation of a 2 -D planar region into triangles.

• Dynamic meshes contain mesh geometry and motion.

• 2-D meshes can be used for texture mapping. Three nodes of triangle defines affine motion.

Page 40: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

40

2-D Mesh ModelingMPEG-4 Video and Image

Coding Scheme• Shape coding and motion compensation• DCT-based texture coding

– standard 8x8 and shape adapted DCT

• Motion compensation– local block based (8x8 or 16x16)– global (affine) for sprites

MPEG-4 Video Coder

DCT Q

Motiontexturecoding

Video multiplex

FrameStorePred-3

Pred-2

Pred-1

Q-1

IDCT

MotionEstimation Shape

coding

Switch

+

+

Sprite Panorama

• First compute static “sprite” or “mosaic”• Then transmit 8 or 6 global motion (camera)

parameters for each frame to reconstruct the fame from the “sprite”

• Moving foreground is transmitted separately as an arbitrary-shape video object.

Steps in Sprite Construction

• Incremental mosaic construction• Incremental residual estimation• Computation of significance measures on

the residuals• Spatial coding and decoding• Visit

http://www.wisdom.weizmann.ac.il/~irani/abstracts/mosaics.html

Page 41: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

41

Other Objects

• Text and graphics• Talking synthetic head and associated text• Synthetic sound

Face and Body Animation• Face animation is in MPEG-4 version 1.• Body animation is in MPEG-4 version 2.• Face animation parameters displace feature

points from neutral position.• Body animation parameters are joint angles.• Face and body animation parameter

sequences are compressed to low bit rate.• Facial expressions: joy, sadness, anger, fear,

disgust and surprise.• Visemes

Face Model

• Face model (3D) specified in VRML, can be downloaded to the terminal with MPEG-4

Neutral Face• Face is gazing in the Z direction• Face axes parallel to the world axes• Pupil is 1/3 of iris in diameter• Eyelids are tangent to the iris• Upper and lower teeth are touching and

mouth is closed• Tongue is flat, and the tip of tongue is

touching the boundary between upper and lower teeth

Face Node• FAP (Facial Animation Parameters)

– FAPs allow to animate 3 -D facial node at the receiver. Animation of key feature points and reproduction of visemes & expressions

• Face Definition Parameters (FDP)– FDP allow to configure facial model to be used at the

receiver, either by sending a new model, or by adapting a previously available model. Sent only once.

• Face Interpolation Table (FIT)– FIT allow to define interpolation rules for FAPs that have to

be interpolated at the receiver. The 3 -D model is animated using FAPs sent and FAPs interpolated.

• Face Animation Table (FAT)– It specifies for each selected FAP the set of vertices to be

affected in a new downloaded model, as well as the way they are affected. E.g. FAP ‘open jaw’, then table defines what that means in terms of moving the feature points.

Facial Animation Parameters (FAPS)

• 2 eyeball and 3 head rotations are represented using Euler angles

• Each FAP is expressed as a fraction of neutral face mouth width, mouth-nose distance, eye separation, or iris diameter.

Page 42: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

42

FAP Groups

Group FAPSVisemes & expressions 2jaw, chin, inner lower-lip, corner lip, mid -lip 16eyeballs, pupils, eyelids 12eyebrow 8cheeks 4tongue 5head rotation 3outer lip position 10nose 4ears 4

FAPS

• 31: raise_l_I_eyebrow (vertical displacement of left inner eyebrow)

• 32: raise_r_I_eyebrow(vertical displacement of right inner eyebrow)

• 33: raise_l_m_eyebrow(vertical displacement of left middle eyebrow)

• 34: raise_r_m_eyebrow(vertical displacement of right middle eyebrow)

• 35:

FAP Data

• Synthetically generated• Extracted by analysis

– Real-time (video phones)– Off-line (story telling)– Fully automatic (video phones)– Human-guided (teleshopping & gaming)

FAPs Masking Scheme Options

• No FAPs are coded for the corresponding group• A mask is given indicating which FAPs in the

corresponding group are coded. FAPs not coded, retain their previous values

• A mask is given indicating which FAPs in the corresponding group are coded. The decoder should interpolate FAPs not selected by the group mask.

• All FAPs in the group are coded.

Four Cases of FDP

• No FDP data is sent, residing 3-D model at the receiver is used for animation

• Feature points (calibrate the model) are sent• Feature points and texture are sent• Facial Animation Tables (FATs) and 3-D model

are sent– FAT specify the FAP behavior (which and how the new

model vertices should be moved for each FAP)

• It is difficult for the sender to know precisely the appearance of the synthesized result at the receiver since a large number of models may be used.

Page 43: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

43

3-D Facial Animation System

FAPeditor

FAPAnalysis

FDPAnalysis

Rendering

BIFSdecoder

FAPdecoder

Modelcnfiguration

Modelanimation

FDPeditor

BIFSencoder

FAPencoder

user

FAP stream

FDP stream

FAPdata

FDPdata

output

Videoinput

user

user

FAPs

• Speech recognition can use FAPs to increase recognition rate.

• FAPs can be used to animate face models by text to speech systems

• In HCI FAPs can be used to communicate speech, emotions, etc, in particular in noisy environment.

Visemes and Expressions

• For each frame a weighted combination of two visemes and two facial expressions

• After FAPs are applied the decoder can interpret effect of visemes and expressions

• Definitions of visemes and expressions using FAPs can be downloaded

Phonemes and Visemes

• 56 phonemes – 37 consonants– 19 vowels/diphthongs

• 56 phonemes can be mapped to 35 visemes• A triseme is made up of three visemes to

capture co-articulations

56 PhonemesPhone Example

aa cotac batah buttao aboutaw boughax theaxr dineray biteeh beter birrdey baitih bitix rosesiy beat

Phone Exampleow boatoy boyoy boyuh bookuw bootux beautyb bobbcl b-closurech churchd daddcl d-closuredh theydx butteren buttonf fief

Phone Exampleg gaggcl g-closurehh hayhv Leheighjh judgek kickkcl k-closurl ledm momn nonng singnx flapped -np poppcl p-closur

Phone Exampleq glottal stopr reds sissh shoet tottcl t-closureth thiefv veryw wety yetz zoozh measureepi epithetic

closureh# silence

Phone to Viseme Mapping

Vowel/Diphthongsaa ae, ehah aoaw ax,ih,iyaxr ayfr eyix owoy uhuw ux

Consonantsb,p bcl,m,pcl chdh,epi dx,nx,q f,ven hh hvjh ng rs,sh,z th wy zh h#d,dcl,g,gc,k,kcl,l,n,t,tcl

Page 44: A Tutorial on Course Contents VIDEO COMPUTING ACCV …crcv-web.eecs.ucf.edu/people/faculty/accv2000h-6.pdf · 3 PART I Measurement of Motion Contents • Image Motion Models • Optical

44

Viseme_select phonemes example0 none na1 p, b, m put, bed, mill2 f, v far, voice3 T, D think, that4 t, d tip, doll5 k, g call, gas6 tS, dZ, S chair, join, she7 s, z sir, zeal8 n, l lot, not9 r red10 A: car11 e bed12 I tip13 O top14 U book

MPEG-4 Visems Facial Expressions• Joy

– The eyebrows are relaxed. The mouth is open, and mouth corners pulled back toward ears.

• Sadness– The inner eyebrows are bent upward. The eyes

are slightly closed. The mouth is relaxed.

• Anger– The inner eyebrows are pulled downward and

together. The eyes are wide open. The lips are pressed against each other or opened to expose teeth.

Facial Expressions

• Fear– The eyebrows are raised and pulled together.

The inner eyebrows are bent upward. The eyes are tense and alert.

• Disgust– The eyebrows and eyelids are relaxed. The upper

lip is raised and curled, often asymmetrically.

• Surprise– The eyebrows are raised. The upper eyelids are

wide open, the lower relaxed. The jaw is open.

MPEG-4 Decoder

2-D/3-Dgeometry

CashedData

textures,FAPs

Audiosynthesizer/processing

Audio decoder

System Layercompositingrendering

Video/imagedecodingMPEGJPEG

System Layer

Display

User input

MPEG-4

• Go to http://www.cselt.it/mpeg

Conclusion

• Video Computing– Video Understanding– Video Tracking– Video Mosaics– Video Phones– Video Synthesis– Video Compression