Photoshop Quickselect & Interactive Digital Photomontage

33
Interactive Digital Photomontage 1 Photoshop Quickselect & Interactive Digital Photomontage By Joseph Tighe

Transcript of Photoshop Quickselect & Interactive Digital Photomontage

Page 1: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage1

Photoshop Quickselect & Interactive Digital PhotomontageBy Joseph Tighe

Page 2: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage2

Photoshop Quickselect

Based on the graph cut technology discussed (Boykov-Kolmogorov)What might happen when we use a color model?

Page 3: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage3

Photoshop Quickselect

Page 4: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage4

Demo

Page 5: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage5

Photoshop Quickselect

So we abandon the color model and only use pixel similarities.The “Refine Edge” matting is applied as a post process step to give good edges boundaries.

Page 6: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage6

Interactive Digital Photomontage

Aseem Agarwala1 Mira Dontcheva1

Maneesh Agrawala2 Steven Drucker2

Alex Colburn2 Brian Curless1

David Salesin1,2 Michael Cohen2

1University of Washington 2Microsoft Research

Page 7: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage7

Photomontage: “combining parts of a set of photographs into a single composite picture”1 while keeping noticeable seam to a minimum.

1 Agarwala et al.

Page 8: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage8

Examples: Group Shot

Page 9: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage9

Examples: Depth of Field

Page 10: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage10

Examples: Depth of Field (Result)

Page 11: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage11

Video

Page 12: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage12

Overview of Approach

Use a graph cut optimization to determine what regions from which images are used (Labeling)Use gradient domain fusion based on the Poisson equation to blend any remaining artifacts away.

(note: alignment is needed as a pre processing step and is not covered in this paper.)

Page 13: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage13

Graph-cut Optimization

∑∑ +=qp

iP

d qLpLqpCpLpCLC,

))(),(,,())(,()(

Cost function to minimize:

Data penalty(Image Objective)

Interaction penalty(Seam Objective)

Page 14: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage14

Image Objectives

Designated ImageDesignated ColorMin/Max LuminanceMin/Max ContrastMin/Max LikelihoodEraserMin/Max Difference

Page 15: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage15

Designated ImageFor each stroke the user specifies which source image the pixels are to come from

Page 16: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage16

Designated Color

Specify a target color and find source images that have similar or different colors.Cost function given by: Euclidean distance in RGB space.

Page 17: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage17

Min/Max Luminance

Min (max) of luminance channel. Good for adding shadows/highlightsCost function given by: the distance in the luminance channel between the current source pixel and the min/max for that pixel’s span (all source pixels at that location)

Page 18: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage18

Min/Max ContrastMin: Remove small sharp obstructions (wires)Max: Good for increased depth of field (ant)Cost function given by: Min/Max of a difference of Gaussians for each pixel’s span

Page 19: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage19

Min/Max LikelihoodGood for removing people in front of buildings.Cost function given by: the probability of that pixel given by the distribution across that pixel’s span in RGB.

Page 20: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage20

Eraser

The color most different from the current color (works like designated color, except for the color is designated by the current composite)Cost function given by: Euclidean distance in RGB space

Page 21: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage21

Min/Max DifferenceThe min or max difference between some specified source image at each pixelCost function given by: the Euclidean distance in RGB space between the pixel in the specified source and the pixel’s span

Page 22: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage22

Seam Objectives

Colors (Faces)Colors & Gradients (Automatic/Global approaches)Colors & Edges (Multiple versions of the same scene)

Page 23: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage23

Seam Objectives

z image of q and p pixels gneighborin obetween tw potential edgescalor theis ),(p pixelat z image of RGBin gradient color component -6 a is )(S

),(),(

)()()()(

)()()()(

edges" & colors" matching if/

gradients" & colors" matching ifgradients"" matching ifcolors"" matching if

L(q) L(p) if0

))(),(,,(

z

)()(

)()()()(

)()()()(

qpEp

qpEqpEZ

qSqSpSpSY

qSqSpSpSX

ZXYX

YX

qLpLqpc

z

qLpL

qLpLqLpL

qLpLqLpL

i

+=

∇−∇+∇−∇=

−+−=

⎪⎪⎪

⎪⎪⎪

+

=

=

Page 24: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage24

Graph-cut Optimization

∑∑ +=qp

iP

d qLpLqpCpLpCLC,

))(),(,,())(,()(

Cost function to minimize:

Data penalty(Image Objective)

Interaction penalty(Seam Objective)

Page 25: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage25

Graph-cut Optimization (Boykov-Kolmogorov)

f

:f f : E(f)) fE(

ffE(f')f

:f

Return 5.2 goto 1 success If 4.

1 success and set , If 3.2.

ofexpansion - one within ' among min arg Find 3.1.

Lin labeleach For 3.0 successSet 2.

labelingarbitrary an Start with 1.

===<

=

=

∧∧

α

α

From: BOYKOV, Y., VEKSLER, O., AND ZABIH, R. 2001. Fast approximate energy minimization via graph cuts. IEEE Transactions on Pattern Analysis and Machine Intelligence 23, 11, 1222–1239.

Page 26: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage26

Graph-cut Optimization (Boykov-Kolmogorov)

From: BOYKOV, Y., VEKSLER, O., AND ZABIH, R. 2001. Fast approximate energy minimization via graph cuts. IEEE Transactions on Pattern Analysis and Machine Intelligence 23, 11, 1222–1239.

Page 27: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage27

How is this applied?

GloballyLocally (painting strokes)

Page 28: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage28

GloballyNo user interactionCost function is minimized for all pixels and all images

Page 29: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage29

Locally (Single Image Brush)

Page 30: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage30

Locally (Multiple Image Brush)

Applies an Image Objective locally but draws from multiple sources to minimize that objectiveSeam Objective is applied globally

Page 31: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage31

Gradient-domain Fusion (Blending)

Use the labels to determine where to copy the color gradients from.Create a composite image using the techniques described in Perez et al. 2003 (Poisson image editing)

Page 32: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage32

Demo

Page 33: Photoshop Quickselect & Interactive Digital Photomontage

Interactive Digital Photomontage33

Observations

Image Objectives rarely produce results that can’t be obtained just by using the designated image objective

Exceptions are the fully automatic methods