photomontage

36
GrabCut GrabCut Interactive Image Interactive Image ( ( and and Stereo) Stereo) S S egmentation egmentation Carsten Rother Carsten Rother Vladimir Kolmogorov Vladimir Kolmogorov Andrew Blake Andrew Blake Antonio Criminisi Antonio Criminisi Geoffrey Cross Geoffrey Cross [based on Siggraph 2004 and ECCV 2004] [based on Siggraph 2004 and ECCV 2004]

Upload: rico

Post on 21-Mar-2016

44 views

Category:

Documents


1 download

DESCRIPTION

GrabCut Interactive Image (and Stereo) Segmentation Carsten Rother Vladimir Kolmogorov Andrew Blake Antonio Criminisi Geoffrey Cross [based on Siggraph 2004 and ECCV 2004]. GrabCut – Interactive Foreground Extraction 1. Photomontage. GrabCut – Interactive Foreground Extraction 2. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Photomontage

GrabCut GrabCut Interactive ImageInteractive Image

((andand Stereo) Stereo) SSegmentation egmentation

Carsten RotherCarsten RotherVladimir Kolmogorov Vladimir Kolmogorov

Andrew BlakeAndrew BlakeAntonio CriminisiAntonio Criminisi

Geoffrey CrossGeoffrey Cross [based on Siggraph 2004 and ECCV 2004][based on Siggraph 2004 and ECCV 2004]

Page 2: Photomontage

PhotomontagePhotomontage

GrabCut – Interactive Foreground Extraction 1

Page 3: Photomontage

Talk OutlineTalk Outline

Hard Image Segmentation: Fore- vs. BackgroundHard Image Segmentation: Fore- vs. Background

Soft Segmentation: Alpha Matting

Stereo Segmentation: Exploit Depth

GrabCut – Interactive Foreground Extraction 2

Page 4: Photomontage

Problem Problem

GrabCut – Interactive Foreground Extraction 3

Fast & Accurate ?

Page 5: Photomontage

What GrabCut doesWhat GrabCut does

User Input

Result

Magic Wand (198?)

Intelligent ScissorsMortensen and Barrett (1995)

GrabCut

Regions Boundary Regions & Boundary

GrabCut – Interactive Foreground Extraction 4

Page 6: Photomontage

FrameworkFramework

Input: Image

Output: Segmentation

Parameters: Colour ,Coherence

Energy:

Optimization:

GrabCut – Interactive Foreground Extraction 5

Page 7: Photomontage

Maximum a posteriori estimator (MAP):

• Gibbs Distribution of the MRF

same as

Energy – Probabilistic Energy – Probabilistic ViewView

GrabCut – Interactive Foreground Extraction 6

- log

Page 8: Photomontage

Graph CutsGraph Cuts - - Boykov and Jolly Boykov and Jolly (2001)(2001)

GrabCut – Interactive Foreground Extraction 7

ImageImage Min CutMin Cut

Cut: separating source and sink; Energy: collection of edges

Min Cut: Global minimal enegry in polynomial time

Foreground Foreground (source)(source)

BackgroundBackground(sink)(sink)

Page 9: Photomontage

Iterated Graph CutIterated Graph Cut

User Initialisation

K-means for learning

colour distributions

Graph cuts to infer the

segmentation

?

GrabCut – Interactive Foreground Extraction 8

Page 10: Photomontage

1 2 3 4

Iterated Graph CutsIterated Graph Cuts

GrabCut – Interactive Foreground Extraction 9

Energy after each IterationResult

Guaranteed to

converge

Page 11: Photomontage

Colour ModelColour Model

Gaussian Mixture Model Gaussian Mixture Model (typically 5-8 components)(typically 5-8 components)

Foreground &Background

Background

Foreground

BackgroundG

GrabCut – Interactive Foreground Extraction 10

R

G

RIterated graph cut

Page 12: Photomontage

Coherence ModelCoherence ModelAn object is a coherent set of pixels:

Error (%) over training set:

25

How do we choose ?

25

Page 13: Photomontage

Gaussian MRF:

Linear regression gives in closed-form

Pseudo-Likelihood:

Parameter Learning Parameter Learning (Blake (Blake 2004)2004)

GrabCut – Interactive Foreground Extraction 12

approximation

=

Page 14: Photomontage

A Gaussian MRF is not a realistic texture model

Gaussian? Gaussian!Real Image syntheticGMRF

Parameter Learning - Parameter Learning - ProblemsProblems

GrabCut – Interactive Foreground Extraction 13

Page 15: Photomontage

Moderately simple Moderately simple examplesexamples

… … GrabCut completes automaticallyGrabCut completes automatically GrabCut – Interactive Foreground Extraction 14

Page 16: Photomontage

Difficult ExamplesDifficult Examples

Camouflage & Camouflage & Low ContrastLow Contrast No telepathyNo telepathyFine structureFine structure

Initial Rectangle

InitialResult

GrabCut – Interactive Foreground Extraction 15

Page 17: Photomontage

Evaluation – Labelled Evaluation – Labelled DatabaseDatabase

Available online: http://research.microsoft.com/vision/cambridge/segmentation/

GrabCut – Interactive Foreground Extraction 16

Page 18: Photomontage

Comparison Comparison GrabCutBoykov and Jolly (2001)

Error Rate: 0.72%Error Rate: 1.87%Error Rate: 1.81%Error Rate: 1.32%Error Rate: 1.25%Error Rate: 0.72%

GrabCut – Interactive Foreground Extraction 17

User Input

Result

Page 19: Photomontage

ComparisonComparison

Trimap Boykov and Jolly

Error Rate: 1.36%

Input Image Ground Truth BimapGrabCut

Error Rate: 2.13%

GrabCut – Interactive Foreground Extraction 18

Error rate - modestly increase

User Interactions - considerable reduced

Page 20: Photomontage

Results Parameter Results Parameter LearningLearning

GrabCut – Interactive Foreground Extraction 19

Page 21: Photomontage

ComparisonComparison

Magic Wand (198?)

Intelligent Scissors Mortensen and Barrett (1995)

GrabCutRother et al. (2004)

Graph Cuts Boykov and Jolly (2001)

LazySnappingLi et al. (2004)

GrabCut – Interactive Foreground Extraction 20

Page 22: Photomontage

““Mixed pixels”: Combination of fore- and Mixed pixels”: Combination of fore- and background background

Alpha Mask: Proportion of fore- and background Alpha Mask: Proportion of fore- and background Natural Matting Problem: Determine alpha,F,B Natural Matting Problem: Determine alpha,F,B

from C from C

Under-determined System: 3 Equations and 7 unknowns

Digital MattingDigital Matting

GrabCut – Interactive Foreground Extraction 21

Page 23: Photomontage

1. Simple Alpha & Simple Colour 2. Difficult Alpha & Simple Colour

3. Simple Alpha & Difficult Colour

4. Difficult Alpha & Difficult Colour

Existing Methods

Human ?

GrabCut

GrabCut – Interactive Foreground Extraction 22

Transparency - Transparency - TaxonomieTaxonomie

Page 24: Photomontage

Border Matting Border Matting

Hard Segmentation Automatic Trimap Soft Segmentation

GrabCut – Interactive Foreground Extraction 23

to

Page 25: Photomontage

Input Bayes MattingChuang et. al. (2001)

Knockout 2Photoshop Plug-In

ComparisonComparison

GrabCut – Interactive Foreground Extraction 24

With no regularisation over alpha

Shum et. al. (2004): Coherence matting in “Pop-up light fields”

Page 26: Photomontage

Solve

Mean Colour Foreground

Mean ColourBackground

GrabCut – Interactive Foreground Extraction 25

Natural Image MattingNatural Image Matting

Ruzon and Tomasi (2000): Alpha estimation in natural images

Page 27: Photomontage

Noisy alpha-profile

Border MattingBorder Matting

GrabCut – Interactive Foreground Extraction 26

1

0

Foreground

Mix

Back-ground

Foreground Mix Background

Fit a smooth alpha-profile with parameters

Page 28: Photomontage

Result using DP Border Matting

DP

t

Dynamic ProgrammingDynamic Programming

GrabCut – Interactive Foreground Extraction 27

Noisy alpha-profile Regularisation

t+1

Page 29: Photomontage

GrabCut BorderGrabCut Border Matting -Matting - ColourColour

Compute MAP of p(F|C,alpha) (marginalize over Compute MAP of p(F|C,alpha) (marginalize over B)B)

To avoid colour bleeding use colour stealing To avoid colour bleeding use colour stealing (“exemplar based inpainting” – Patches do not work)(“exemplar based inpainting” – Patches do not work)

[Chuang et al. ‘01] Grabcut Border Matting

GrabCut – Interactive Foreground Extraction 28

Page 30: Photomontage

ResultsResults

GrabCut – Interactive Foreground Extraction 29

Page 31: Photomontage

Stereo Video + Stereo Video + SegmentationSegmentation

Criminisi et. al. (2003): 4-Plane DP to handle occlusions properly

Left Sequence Right Sequence

Disparity Sequence

GrabCut – Interactive Foreground Extraction 30

Page 32: Photomontage

Occusion, left and rightOccusion, left and right

GrabCut – Interactive Foreground Extraction 31

Page 33: Photomontage

Background SubstitutionBackground Substitution

Criminisi et. al. (2004): Remove boundary artefacts (SPS algorithm)

GrabCut – Interactive Foreground Extraction 32

Page 34: Photomontage

Object InsertionObject Insertion

GrabCut – Interactive Foreground Extraction 33

Page 35: Photomontage

Focus on ForegroundFocus on Foreground

GrabCut – Interactive Foreground Extraction 34

Page 36: Photomontage

Conclusions & FutConclusions & Future ure WorkWork

GrabCut – powerful interactive extraction tool

Iterated Graph Cut based on colour and contrast

Regularized alpha matting by Dynamic Programming

Stereo and Segmentation give supportive information

How to solve the difficult hair problem ?

GrabCut – Interactive Foreground Extraction 35

[Argawall et.al.2004]