110
Computational Photography Prof. Feng Liu Spring 2014 http://www.cs.pdx.edu/~fliu/courses/cs510/ 05/29/2014

Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Computational Photography

Prof.  Feng Liu

Spring 2014

http://www.cs.pdx.edu/~fliu/courses/cs510/

05/29/2014

Page 2: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Last Time

Stereoscopic 3D Human depth perception

3D displays

2

Page 3: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Today

Stereoscopic 3D 3D Cinematography

Stereoscopic media post-processing

3

Page 4: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereoscopic 3D

Page 5: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Reprint from 3D Movie Making: Stereoscopic Digital Cinema from Script to Screen

History

Page 6: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target
Page 7: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Ubiquitous Stereoscopic 3D

Page 8: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Image source: http://www.slate.com/id/2303814/

Page 9: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Will 3D Stay?

Image source: http://www.slate.com/id/2303814/

Page 10: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

3D Fatigue

Blurring vision

Eyestrain

Headache

Image source: http://www.digitalproductionme.com/article-4580-3d--bad-for-you/#.UI-QfGdTDK0

Page 11: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereoscopic 3D Camera

Page 12: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereo Photo

Left Right

Red-cyan anaglyph

Page 13: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereopsis

Image from http://www.vision3d.com

Page 14: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Disparity and Perceived Depth

Left Right

depth

Page 15: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Disparity and Perceived Depth

depth Left

Right

Positive disparity

Negativedisparity

Page 16: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Vergence-accommodation

There is an area around it where vergence and accommodation agree, which is called zone of comfort. This discrepancy could damage the visual acuity before the age of 8.

real world stereoscopic displays

Slide credit: Y.Y Chuang

Page 17: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereoscopic Comfort Zone

Page 18: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Monocular Object

Monocular object

Monocular object

Page 19: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereo Window Violation

When an object with negative disparities is cut by the screen edge, it suffers from the stereo window violation. That is, the object is perceived in front of the screen, but is occluded by the screen edge.

Page 20: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereo Window Violation

Left Right

Page 21: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

More Visual Fatigue Sources

Slide credit: Y.Y Chuang

Page 22: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Enable Warping on Stereoscopic Images

Yuzhen Niu  Wu‐Chi Feng   Feng Liu

Portland State University

Page 23: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Image Warping

Page 24: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Naïve Stereo Warping

Left Right

Page 25: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Naïve Stereo Warping

Left Right

Page 26: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

90o Rotation

Left Right

Page 27: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

More Stereo Warping

Page 28: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Warp the left and right view consistently

Avoid introducing vertical disparities

Maintain good horizontal disparities

Goals for Stereo Warping

Page 29: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Warp the left and right view consistently

Avoid introducing vertical disparities

Maintain good horizontal disparities

Naïve Stereo Warping

Page 30: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Warp the left image using the user-specified warping

Estimate the target disparity map for the warping result

Warp the right image guided by the target disparity map

Our Solution

Page 31: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Overview

Left input Right input

Page 32: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Overview

Left result Right input

Page 33: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Overview

w/target disparity mapLeft result Right input

Page 34: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Overview

Left result Right result

Page 35: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Overview

Input Warping result

Page 36: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

1. Warp the left image using the user-specified warping

2. Estimate the target disparity map for the warping result

3. Warp the right image guided by the target disparity map

Our Solution

Page 37: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

1. Warp the left image using the user-specified warping

2. Estimate the target disparity map for the warping result

Estimate the original disparity map

SIFT-based feature matching [Lowe 2004] and

Optical flow [Sun et al. 2010]

Compute the target disparity map

3. Warp the right image guided by the target disparity map

Our Solution

Page 38: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

√ No vertical disparities

What Is A Good Disparity Map

Page 39: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

√ No vertical disparities

? Preserve original (horizontal) disparities

What Is A Good Disparity Map

Page 40: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Uniform Scaling

Flattened object Input Our result

Page 41: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Uniform Scaling

Flattened object Input Our result

perceived ball

Page 42: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Uniform Scaling

Flattened object Input Our result

Page 43: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Uniform Scaling

Flattened object Input Our result

Page 44: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Uniform Scaling

Flattened object Input Our result

Page 45: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

√ No vertical disparities

√ Preserve perceived 3D shape

What Is A Good Disparity Map

Page 46: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Goal: preserve the perceived 3D shape

Idea: match the perceived depth range change to the local warp in 2D image space

Target Disparity Map Estimation

Page 47: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Depend on

Raw image disparity

Viewing distance

Screen size

Perceived Depth

Page 48: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Depend on

Raw image disparity

Viewing distance

Screen size

Perceived Depth

??

Page 49: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Goal: preserve the perceived 3D shape

Idea: match the perceived depth range change to the local warp in 2D image space

Target Disparity Map Estimation

Page 50: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Goal: preserve the perceived 3D shape

Idea: match the disparity range change to the local warp in 2D image space

Target Disparity Map Estimation

Page 51: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Goal: preserve the perceived 3D shape

Idea: match the disparity range change to the local warp in 2D image space

Target Disparity Map Estimation

factor scaling image local :disparityinput :disparity target :ˆ

ˆ..

ˆˆ

minmin

2

i

d dNdjiiji

sdd

sddts

ddsddi ij

Keep the objects with small disparities in the comfort zone after warping

Page 52: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Find the best fitting similarity transform to the local image warping

Use the similarity transformation scaling factor

Local Image Scaling Factor

Page 53: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Perceived depth does not linearly depends on disparity

But, when objects have small disparities, perceived depth nearly linearly depends on disparity

objects are closer to the screen

small screen sizes

Perceived Depth vs Disparity

Page 54: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Warp the left image using the user-specified warping

Estimate the target disparity map for the warping result

Warp the right image guided by the target disparity map

Our Solution

Page 55: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Content-preserving warping

As-rigid-as-possible shape manipulation [Igarashi et al. 2005]

Feature-aware texturing [Gal and Cohen-Or 2006]

Content-preserving warps for 3d video stabilization [Liu et al. 2009]

Nonlinear disparity mapping for stereoscopic 3d [Lang et al. 2010]

Disparity-guided Image Warping

Page 56: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Content-preserving Warping

Build a grid mesh from input image Warp input image by least-squares minimization Data term: move features to target positions Smoothness term: avoid visual distortion Similarity transformation constraints

Solved by a linear solver

Page 57: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Content-preserving Warping

Left result Right result

Page 58: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Our Observation

Left Right

Left Right Left Right

Page 59: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Our Observation

SimilarLeft Right

Left Right Left Right

Page 60: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Pre-warping

Left result Right pre-warping result

Page 61: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Pre-warping

Left result Right pre-warping result

Page 62: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Content-preserving Warping

Left result Right result

Page 63: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Content-preserving Warping

Left result Right result

Page 64: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Input Warping result

Page 65: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

No change to disparity map

Rotating a rectified stereo camera will not change the disparity map

Result: rotation

Page 66: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: rotation

Input Our result

Page 67: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: rotation

Input Our result

Page 68: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: rotation

Input Our result

Page 69: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: rotation

Input Our result

Page 70: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: rotation

Input Our result

Page 71: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: rotation

Input Our result

Page 72: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: similarity transformation

Uniformly scaling the disparity values

Input Our result

Page 73: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: affine transformation

Uniformly scaling the disparity values

Input Our result

Page 74: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Result: perspective transformation

Input Our result Scaling map

Page 75: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

More parametric warping

Input Our result

Page 76: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

More parametric warping

Input Our result

Page 77: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Image Retargeting

Input Our result

Left RightScaling map

Page 78: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Object Resizing

Input Our result

Page 79: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Content-preserving Warping

Input Our result

Page 80: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Keystone Correction for Stereoscopic Cinematography

Feng Liu, Yuzhen Niu, and Hailin Jin. Keystone Correction for Stereoscopic Cinematography. IEEE 3-D Cinematography 2012, Providence, RI, June 2012

Page 81: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereoscopic Comfort Zone

Page 82: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereoscopic Camera Model

Page 83: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Keystone distortion

Left Right

Left Right

Toe-in

Page 84: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Keystone distortion

Left Right

Left Right

Toe-invertical

disparities

Page 85: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Keystone in projectors

Images from http://htrgroup.com/

Page 86: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Keystone correction for projectors

Basics: 3D rotation can be modeled by a homography

Keystone correction [Raskar and Beardsley 01, Li et al. 04, etc]

Estimate 3D rotation or homography

optical keystone correction by modifying the lens system

or digital keystone correction by image warping

Page 87: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereo keystone correction

Projector keystone correction cannot work Revert the toe-in operation

Change the desirable (horizontal) disparity distribution

Stereo keystone correction requires Eliminate vertical disparities

Preserve horizontal disparities

Page 88: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Content-preserving warping

Non-uniformly move image content to target positions

Avoid noticeable distortion

Applications: Video stabilization [Liu et al. ‘09]

Disparity editing [Lang et al. ‘10]

Page 89: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Use a spatially-varying warping method Non-uniformly move image content to remove vertical

disparities and preserve horizontal disparities

Avoid noticeable image distortion

Correction by content-preserving warping

Page 90: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Stereo keystone correction

Feature correspondence estimation

Target feature position estimation

Image transformation via content-preserving warping

Page 91: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Feature correspondence estimation

Input: left image with disparity and right image

Detect SIFT features from the left and right image

Establish feature correspondence [Lowe ‘04]

Remove outliers using the epipolar geometry constraint [Hartley and Zisserman ‘00]

Page 92: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Target feature position estimation

Keep the input horizontal coordinates to preserve horizontal disparities

Average the left and right vertical coordinates for each feature pair to remove vertical disparities

Page 93: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Content-preserving warping

Keystone correction result: left with disparity and right with mesh

Page 94: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Warping algorithm

Build a grid mesh from input image Warp input image by least-squares minimization Data term: move features to target positions

Smoothness term: avoid visual distortion

Page 95: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Local similarity transformation constraint

95

Smoothness term: minimize visual distortion

Page 96: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Warping algorithm

Build a grid mesh from input image Warp input image by least-squares minimization Data term: move features to target positions Smoothness term: avoid visual distortion

Solved by a linear solver

Page 97: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Camera-centric disparity editing

Estimate the relative camera pose between the left and right camera and a sparse set of 3D points 6-point algorithm [Stewenius et al. ‘05]

Adjust the baseline and toe-in angle Compute output feature positions

Content-preserving warping

Page 98: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Disparity adjustment

Page 99: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Disparity adjustment

Page 100: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Disparity adjustment

Page 101: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Disparity adjustment

Page 102: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Disparity adjustment

Input Output

Page 103: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Examples

Input anaglyph and disparity

Page 104: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Examples: Move the train near the screen

Toe-in result

Page 105: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Examples: Move the train near the screen

Output anaglyph and disparity

Page 106: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Examples: Move the walker near the screen

Page 107: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Examples

Input Output 1 and 2

Page 108: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Video example

Input sequence

Output sequence

Page 109: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target
Page 110: Lecture stereo production - Computer Action Teamweb.cecs.pdx.edu/~fliu/courses/cs510/lectures/Lecture18.pdf1. Warp the left image using the user-specified warping 2. Estimate the target

Next Time

Final Project Presnetation

110