re-cinematography: improving the camera dynamics of casual...

73
Re-Cinematography: Improving the Camera Dynamics of Casual Video Michael Gleicher Feng Liu Department of Computer Sciences University of Wisconsin- Madison

Upload: others

Post on 17-Jan-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Re-Cinematography:Improving the Camera Dynamics of

Casual Video

Michael Gleicher

Feng LiuDepartment of Computer Sciences

University of Wisconsin- Madison

Page 2: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Motivation:

More video doesn’t mean better video

More Video!

• Cameras everywhere

• Players everywhere

• Sharing everywhere

Page 3: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Motivation:

More video doesn’t mean better video

Good video takes effort!

Page 4: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Problem: Bad Camera Motion

No planning

No tripod

Page 5: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Problem: Bad Camera Motion

Prior Work: Image Stabilization

One part of the

problem: jitter

Helped by

Image Stabilization

Page 6: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Problem: Bad Camera Motion

Solution: Re-Cinematography

Re-Cinematography:Post-process video clips so that the camera

motions better follow the rules of good video.

Page 7: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Rubber duck races

Vail, CO, USA, 19 August, 2007

Source Footage Re-Cinematography Result

Page 8: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera
Page 9: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

What the art of cinematography tells us

about camera motion

Camera motions should be intentional

– Avoid movement if not necessary

– Move in directed ways

Re-Cinematography:Post-process video clips so that the camera

motions appear to better follow the rules.

Page 10: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Re-Cinematography Pipeline

Source

Video

Motion

Estimation

Motion

Synthesis

Image

Transform

Result

Video

Page 11: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Re-Cinematography Pipeline (1)

Source

Video

Motion

Estimation

Motion

Synthesis

Image

Transform

Result

Video

How did the camera move?

Page 12: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Re-Cinematography Pipeline (2)

Source

Video

Motion

Estimation

Motion

Synthesis

Image

Transform

Result

Video

Figure out what motion we want in the

result

Page 13: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Re-Cinematography Pipeline (3)

Source

Video

Motion

Estimation

Motion

Synthesis

Image

Transform

Result

Video

Transform the source into the result

Page 14: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Re-Cinematography Pipeline

Scene

Analysis

Motion

Analysis

Motion

Synthesis

Source

Video

Motion

Estimation

Image

Transform

Result

Video

Page 15: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Motion Synthesis Steps

Source

Video

Motion

Estimation

Motion

Synthesis

Image

Transform

Result

Video

Create

Motions

Segment

Video

Optimize

Motions

Page 16: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

3 Key Ideas

• Analyze motion estimates to break video into segments

• Use local mosaics to keyframe new camera motions

• Consider both motion and image quality to automatically

keyframe cameras

Page 17: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Background: Camera Motion Estimation and

Projective Transformations

1,

1','

hygx

feydx

hygx

cbyaxyx

1hg

fed

cba

Page 18: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Mosaicing

Source Images Base Image

All images transformed to common base image

Page 19: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

3 Key Ideas

• Analyze motion estimates to break video into segments

• Use local mosaics to keyframe new camera motions

• Consider both motion and image quality to automatically

keyframe cameras

Page 20: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Local Mosaics

Limit error and motion in each segment

Page 21: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Break videos into segments with like

motions

Move in a direction

Small movement

Zoom in or out

Bad estimation

Page 22: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Break videos into segments with like

motions

MovingStatic Bad

Page 23: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Break videos into segments with like

motions

Page 24: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

3 Key Ideas

• Analyze motion estimates to break video into segments

• Use local mosaics to keyframe new camera motions

• Consider both motion and image quality to automatically

keyframe cameras

Page 25: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Photograph the Mosaic with a virtual camera

Page 26: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Virtual camera does not have to be where

the real camera was

Source frames

shown in yellow

Result frames

shown in magenta

Page 27: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

What paths do we want?

1. Preserve the intent of the source

2. Obey the rule of cinematography:

Camera motion should be intentional

Page 28: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

The key insight:

Translate cinematography to implementation

Motion should be intentional

• Static shots should be static

• Moving shots are goal directed

– Constant velocity with ease in/out

Page 29: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Directed Paths

Interpolate with direct constant* velocity paths

* Possibly with ease-in and out.

Page 30: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Moving the Camera

Interpolate transformations in projective space

mlerp(A,B,α) = exp( α log(A) + (1-α) log(B) )

A,B are matrices

Page 31: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Matrix logarithm interpolation of

transfomations

Page 32: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Smooth Paths Depart from Original

Source motion Result motion

Page 33: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Changing motion means transforming

frames

Source motion Result motion

Page 34: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Transforming frames might cause problems

Source frame Result frame

Page 35: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

3 Key Ideas

• Analyze motion estimates to break video into segments

• Use local mosaics to keyframe new camera motions

• Consider both motion and image quality to automatically

keyframe cameras

Page 36: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Penalties for each frane

Offscreen

Uncovered

Distortion

Page 37: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Offscreen

Page 38: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Uncovered

Page 39: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Distorted

Page 40: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Finding good motions

An optimization problem:

Or a constrained optimization problem:

Find motion M that minimizes: nonsmooth(M) +

sum image penalties

Find motion M that minimizes: nonsmooth(M)

Subject to: sum image penalties < thresh

Page 41: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Static Segments

• If initial video was nearly static

• Make it a static segment

– No camera motion

Page 42: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Keyframing Dynamic Segments

Start with direct path

Is the worst frame

penalty below

threshold?

Insert a key at worst

frame

No

Yes

Page 43: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

A contrived synthetic example to explain key

insertion

Page 44: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Try the smooth motion first

Page 45: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Insert a key at the worst point

Page 46: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Inserting keys creates velocity

discontinuities

Page 47: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Implementation

• Analyze video (slow-preprocess)– Motion estimation, salience detection

• Re-Cinematography (a few seconds for up to 2 minutes of video)– Break video into segments

– Keyframe segments

• Create result (30fps playback using graphics hardware)– Transform each frame

– In-Paint (draw frames +/- 2 seconds)

Page 48: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Examples

• Sanyo XACTI

camera

• Source footage with

image stabilization

Page 49: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Mini-Golf

Pico Mountain, VT, 2006

Source Footage Re-Cinematography Result

Page 50: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera
Page 51: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

2X Speed

Source Footage Re-Cinematography Result

Skip

Page 52: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera
Page 53: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

318 sourceLearning to run

Vail, CO, 19 August 2006

Source Video

318 2X

Page 54: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

318 source video

Page 55: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

318 resultLearning to run

Vail, CO, 19 August 2006

Re-Cinematography Result

Page 56: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

318 result video

Page 57: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

318 2X2X speed comparison

Source Footage Re-Cinematography Result

Page 58: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

318 2X video2X speed comparison

Source Footage Re-Cinematography Result

Page 59: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Sam’s First Steps, July 6th, 2006

Re-Cinematography

Result

Skip

Page 60: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

First Steps

Page 61: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Re-Cinematography “Works”

Velocity profiles meet goals

Frame number

Ma

gn

itu

de

of

ap

pa

rent velo

city Source video

Result video

Page 62: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Static segments are static

Page 63: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Moving segments have piecewise constant

velocity

Page 64: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Ease in and out

Page 65: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

But there are problems

Show source images when

motion estimation fails

Jitter from bad motion

estimation

Visual Artifacts from bad

inpainting

Page 66: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Problems

• Bad camera motion estimation

• Bad motion estimation assessment

• Bad important object detection

• Bad inpainting

• These are standard questions being explored in

Computer Vision!

Page 67: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Motion Blur• Hard for Estimation

• Wrong for Changed Motion

Page 68: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

A more interesting question:

To swing or not to swing

Source Footage Re-Cinematography Result

Page 69: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera
Page 70: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera
Page 71: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera
Page 72: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Summary

Re-cinematography changes the camera motions

in video to better follow the rules of good video

Key ideas to do this:

• Break video into local mosaics

• Animate a camera viewing the local mosaics

• Automatically keyframe the camera to optimize tradeoffs

Research supported in part by NSF grant IIS-0416284 and

the UW Graduate School Research Committee.

Page 73: Re-Cinematography: Improving the Camera Dynamics of Casual ...graphics.cs.wisc.edu/Talks/Gleicher/2007/recin.pdf · What the art of cinematography tells us about camera motion Camera

Because I thought you’d ask….

Answers to Common Questions

• I don’t know.

• No, we don’t introduce cuts.

• The details are in the paper, send me email if its not clear.

• Friends in industry say they can do the camera motion

estimation robustly, in real time.

• Yes, I would like to go to Oktoberfest Friday.

• Our in-painter builds a 4 second mosaic for each frame.

• 2

• Logarithms and exponenents of 3x3 matrices can be

computed robustly and efficiently with iterative methods.

• Yes, this slide is an old joke – but I haven’t used it in years.