78
Image Completion using Planar Structure Guidance Jia-Bin Huang Johannes Kopf Narendra Ahuja Sing Bing Kang

Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Embed Size (px)

DESCRIPTION

We propose a method for automatically guiding patch-based image completion using mid-level structural cues. Our method first estimates planar projection parameters, softly segments the known region into planes, and discovers translational regularity within these planes. This information is then converted into soft constraints for the low-level completion algorithm by defining prior probabilities for patch offsets and transformations. Our method handles multiple planes, and in the absence of any detected planes falls back to a baseline fronto-parallel image completion algorithm. We validate our technique through extensive comparisons with state-of-the-art algorithms on a variety of scenes. Project page: https://sites.google.com/site/jbhuang0604/publications/struct_completion

Citation preview

Page 1: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Image Completion using Planar Structure Guidance

Jia-Bin Huang Johannes KopfNarendra AhujaSing Bing Kang

Page 2: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

The image completion problem

Credit: ©Flickr user remonrijper

Page 3: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

The image completion problem

Credit: ©Flickr user remonrijper

Page 4: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

The image completion problem

Credit: ©Flickr user remonrijper

Page 5: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Large Hole

Small Hole

Non-stationaryStationary

Page 6: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Large Hole

Small Hole

Non-stationary

Texture Synthesis

Stationary

Page 7: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Texture Synthesis

Large Hole

Small Hole

Non-stationary

Image Inpainting

Stationary

Page 8: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Texture Synthesis

Large Hole

Small Hole

Non-stationary

Image Completion

Stationary

Page 9: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input Image Credit: ©Flickr user remonrijper

Page 10: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Region to fill

Page 11: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop Content Aware Fill[Wexler et al. 2007] [Barnes et al. 2009]

Page 12: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Statistics of Patch Offsets[He and Sun ECCV 2012]

Translational patches are not sufficient!

Page 13: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Searching patch transformation space is HARD!

Image Melding[Darabi et al. 2012]

Page 14: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Our Result We use mid-level information

Page 15: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Based on non-parametric framework of [Wexler et al. 2007]

Page 16: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Based on non-parametric framework of [Wexler et al. 2007]

• The basic form

Page 17: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Based on non-parametric framework of [Wexler et al. 2007]

• The basic form

• Patch matching cost

• PatchMatch [Barnes et al. 2009]

for efficient nearest neighbor field search.

Page 18: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Low-level processing is not sufficient

Page 19: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Low-level processing is not sufficient

• Idea: guide the completion using mid-level information!

Page 20: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Low-level processing is not sufficient

• Idea: guide the completion using mid-level information!

• Transformation of source patches

Page 21: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Low-level processing is not sufficient

• Idea: guide the completion using mid-level information!

• Transformation of source patches

• Translational(Photoshop CAF)

Page 22: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Low-level processing is not sufficient

• Idea: guide the completion using mid-level information!

• Transformation of source patches

• Translational(Photoshop CAF)

• Rotation and scale(Image Melding)

Page 23: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

• Low-level processing is not sufficient

• Idea: guide the completion using mid-level information!

• Transformation of source patches

• Translational(Photoshop CAF)

• Rotation and scale(Image Melding)

• Projective transform(Ours)

Page 24: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Mid-Level cues for guidance

•Planes:Cues for how to deform patches

•Regularity:Cues for where to sample patches

Page 25: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Mid-level cues – planes

Credit: ©Flickr user micromegas

Page 26: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane detection – vanishing point detection

Page 27: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane detection – vanishing point detection

Page 28: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane detection – localization

Support lines for VPs

Page 29: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane detection – localization

Support lines for VPs Support line density

Page 30: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane detection – localization

Support lines for VPs Support line density Plane location density

Page 31: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane detection – localization

Support lines for VPs Support line density Plane location density

Page 32: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane detection – localization

Support lines for VPs Support line density Plane location density

Page 33: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane detection – posterior probability

Page 34: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Our Result

Page 35: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop Content Aware Fill Statistics of Patch Offsets

Image Melding Our Result

Page 36: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop Content Aware Fill Statistics of Patch Offsets

Image Melding Our Result

Page 37: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and Hole Credit: ©Flickr user theenmoy

Page 38: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Our Result (with planar guidance only)

Need regularity guidance!

Page 39: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Extracting mid-level cues - regularity detection

Page 40: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Regularity detection – feature detection and matching

Page 41: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Regularity detection – mode detection

• For fronto-parallel scenes, similar to [He and Sun ECCV 2012]• Can handle perspectively distorted planes and multiple surfaces

Page 42: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Regularity detection without rectification

Page 43: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Plane and regularityWith planar guidance only

Page 44: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Guided sampling and propagation

• Slight modification of PatchMatch algorithm

• Plane guided sampling and propagation• Draw a plane index based on posterior probability

• Draw random samples using rejection-based sampling

Page 45: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Guided sampling and propagation

• Slight modification of PatchMatch algorithm

• Plane guided sampling and propagation• Draw a plane index based on posterior probability

• Draw random samples using rejection-based sampling

• Regularity guided sampling• Randomly draw a offset vector in rectified space

Page 46: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Results

Page 47: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and Hole Credit: ©Flickr user danielfoster

Page 48: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop Content Aware Fill Statistics of Patch Offsets

Image Melding Our Result

Page 49: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and hole

Credit: ©Flickr user the-o

Page 50: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop CAF Statistics of Patch Offsets Image Melding Our Result

[Wexler et al. 2007] [Barnes et al. 2009]

[He and Sun 2012] [Darabi et al. 2012]

Page 51: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop CAF Statistics of Patch Offsets Image Melding Our Result

[Wexler et al. 2007] [Barnes et al. 2009]

[He and Sun 2012] [Darabi et al. 2012]

Page 52: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop CAF Statistics of Patch Offsets Image Melding Our Result

[Wexler et al. 2007] [Barnes et al. 2009]

[He and Sun 2012] [Darabi et al. 2012]

Page 53: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and HoleCredit: ©Flickr user chrisschoenbohm

Page 54: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop Content Aware Fill Statistics of Patch Offsets

Image Melding Our Result

Page 55: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and HoleCredit: ©Flickr user 99667320@N06

Page 56: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop Content Aware Fill Statistics of Patch Offsets

Image Melding Our Result

Page 57: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and hole

Credit: ©Flickr user sunshinepictures

Page 58: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop CAF Statistics of Patch Offsets Image Melding Our Result

[Wexler et al. 2007] [Barnes et al. 2009]

[He and Sun 2012] [Darabi et al. 2012]

Page 59: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

What if there are no structures?

• Reduces to baseline image completion algorithms which use translational patches (same as Photoshop content-aware fill)

Page 60: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

What if there are no structures?

• Reduces to baseline image completion algorithms which use translational patches (same as Photoshop content-aware fill)

• Works well with man-made scenes

• Backward-compatible with natural scenes

• Tested on 25 natural images from [Kopf et al. 2012]

Page 61: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and Mask Completion

Page 62: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and Mask Completion

Page 63: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input and Mask Completion

Page 64: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Check out our project website!

• http://bit.ly/planarcompletion

• Full comparison of 110 images• 85 urban scenes + 25 natural

• Code will be released soon!

Page 65: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Failure modes

• Difficult to find correct demarcation lines (boundary between regions)• Need higher-level information

• Missed, false, or inaccurate detection of plane parameters or regularity• Computer vision algorithms are not perfect

Page 66: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input

Credit: ©Flickr user loungerie

Page 67: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Mask

Page 68: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Our result

Page 69: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop

Priority BPImage Melding

Statistics of Patch Offset

Page 70: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Input

Credit: ©Flickr user addictive_picasso

Page 71: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Mask

Page 72: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Our result

Page 73: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Photoshop CAF[Wexler et al. 2007] [Barnes et al. 2009]

Image Melding[Darabi et al. 2012]

Statistics of Patch Offset[He and Sun 2012]

Page 74: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Conclusions

•Mid-level constraints for the win!

Page 75: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Conclusions

•Mid-level constraints for the win!• Our work: planes and regularity

Page 76: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Conclusions

•Mid-level constraints for the win!• Our work: planes and regularity

•Great for man-made scenes

Page 77: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Conclusions

•Mid-level constraints for the win!• Our work: planes and regularity

•Great for man-made scenes

•Backward-compatible with natural scenes

Page 78: Image Completion using Planar Structure Guidance (SIGGRAPH 2014)

Thank You!