22
Video Inpainting Und er Constrained Camer a Motion Kedar A. Patwardhan, Student Me mber, IEEE, Guillermo Sapiro, Sen ior Member, IEEE, and Marcelo Be rtalmío

Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

Embed Size (px)

Citation preview

Page 1: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

Video Inpainting Under Constrained Camera Mo

tionKedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertal

mío

Page 2: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

Abstract

Propose a method for inpainting missing parts of a video sequence recorded with a moving or stationary camera.

Page 3: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

OutlineOutline

INTRODUCTION AND OVERVIEW ASSUMPTIONS AND PREPROCESSING MOTION INPAINTING BACKGROUND INPAINTING EXAMPLES CONCLUDING REMARKS

Page 4: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

INTRODUCTION

The problem of automatic video restoration in general, and automatic object removal and modification in particular, is beginning to attract the attention of many researchers.

We present a simple and fast (compared with the literature) method to automatically fill-in video “holes”.

Page 5: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

Overview the algorithmOverview the algorithm

Page 6: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm
Page 7: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm
Page 8: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

ASSUMPTIONS Our basic assumptions are the following:

• The scene essentially consists of stationary background with some moving foreground.• Camera motion is approximately parallel to the plane of image projection.• Foreground objects move in a repetitive

fashion.• Moving objects do not significantly change size.

Page 9: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm
Page 10: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

PREPROCESSING

The simple assumptions that we make allow us to compute a rough “motion confidence mask” gives us a segmentation of the sequence into foreground and background

In the preprocessing stage we build three mosaics:• a background mosaic • a foreground mosaic• an optical flow mosaic.

Page 11: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

Background

Optical flowForeground

Page 12: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

MOTION INPAINTING

Given the problem of inpainting an image “hole” in a still image I.

For each pixel in the boundary of , consider its surrounding patch , a square centered in .

Page 13: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm
Page 14: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

For any given pixel , its priority is:

a confidence term C(P):proportional to the number of undamaged and reliable pixels surrounding

a data term D(P):is high if there is an image edge arriving at , and highest if the direction of this edge is orthogonal to the boundary of .

Get highest priorityGet highest priority

Page 15: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm
Page 16: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

CopyCopy

Once the matching patch is found, instead of fully copying it onto the target , we copy from only the pixels that correspond to the moving foreground.

The remaining un-filled pixels of must correspond to the background, we do not want to fill them at this motion inpainting stage.

For this reason, we mark them to have zero priority

Page 17: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm
Page 18: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

BACKGROUND INPAINTING

When there is camera motion involved, often the background is less occluded in one frame than another. we align all the frames using the precomputed shifts, and then look for background information available in nearby frames.

In cases where the occluder is stationary. We fill in this hole directly on the background mosaic using the priority based texture synthesis scheme in ”Region Filling and Object Removal by Exemplar-Based Image Inpainting”.

Page 19: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

EXAMPLES

All the videos referred to in this section have been captured using a consumer hand-held camera, providing a video resolution of 640x480 pixels per frame.

These and other video examples may be seen at

http://www.tc.umn.edu/~patw0007/video-inpainting

Page 20: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm
Page 21: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm
Page 22: Video Inpainting Under Constrained Camera Motion Kedar A. Patwardhan, Student Member, IEEE, Guillermo Sapiro, Senior Member, IEEE, and Marcelo Bertalm

CONCLUDING REMARKS

We have presented a simple framework for filling in video sequences in the presence of camera motion.

Currently, we are working on removing the assumptions stated in Section II-A, to be able to deal with arbitrary camera motion (including zooms), changes of scale in the moving objects, and dynamic backgrounds.