# US 2020/0118254 A1 · Video inpainting via confidence-weighted motion estimation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2020/0118254 A1
- Document ID: US20200118254A1
- Status: Published application
- Kind: A1
- Application number: 16/378,906
- Filed: 2019-04-09
- Published: 2020-04-16
- Earliest claimed: 2018-10-12
- Assignees: Adobe Inc.
- Applicants: Adobe Inc.
- Inventors: Geoffrey Oxholm; Oliver Wang; Elya Shechtman; Michal Lukac; Ramiz Sheikh
- Web page: https://patentgrep.com/patent/US20200118254A1

## CPC

- H04N 5/265: Mixing
- G06T 5/77: Retouching; Inpainting; Scratch removal
- G06T 7/11: Region-based segmentation
- G06T 7/215: Motion-based segmentation
- G06T 7/269: using gradient-based methods
- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- G06T 11/60: Creating or editing images; Combining images with text
- G11B 27/036: Insert-editing
- H04N 5/272: Means for inserting a foreground image in a background image, i.e. inlay, outlay
- H04N 9/873: for restoring the colour component sequence of the reproduced {chrominance} signal
- G06T 2207/10016: Video; Image sequence
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G11B: INFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER (recording measured values in a way that does not require playback through a transducer G01D9/00; recording or playback apparatus using mechanically marked tape, e.g. punched paper tape, or using unit records, e.g. punched or magnetically marked cards G06K; transferring data from one type of record carrier to another G06K1/18; circuits for coupling output of reproducer to radio receiver H04B1/20; gramophone pick-ups or like acoustic electromechanical transducers or circuits therefor H04R)

## Abstract

Certain aspects involve video inpainting via confidence-weighted motion estimation. For instance, a video editor accesses video content having a target region to be modified in one or more video frames. The video editor computes a motion for a boundary of the target region. The video editor interpolates, from the boundary motion, a target motion of a target pixel within the target region. In the interpolation, confidence values assigned to boundary pixels control how the motion of these pixels contributes to the interpolated target motion. A confidence value is computed based on a difference between forward and reverse motion with respect to a particular boundary pixel, a texture in a region that includes the particular boundary pixel, or a combination thereof. The video editor modifies the target region in the video by updating color data of the target pixel to correspond to the target motion interpolated from the boundary motion.

## Claims

### Claim 1

A method in which one or more processing devices performs operations comprising:
accessing a scene comprising a first video frame and a second video frame, the accessed scene having an annotation identifying a target region to be modified in one or more video frames comprising the scene;
computing a boundary motion for a boundary of the target region within the scene, wherein the boundary includes boundary pixels neighboring the target region in the first video frame and the second video frame;
assigning confidence values to the boundary pixels, respectively, wherein a particular confidence value is at least partially based on one or more of (i) a difference between forward and reverse motion with respect to a particular boundary pixel and (ii) a texture in a region that includes the particular boundary pixel;
interpolating a target motion of a target pixel within the target region from the boundary motion, wherein the particular confidence value of the particular boundary pixel controls a contribution of a particular motion of the particular boundary pixel to the target motion as interpolated from the boundary motion; and
updating color data of the target pixel to correspond to the target motion interpolated from the boundary motion.

### Claim 2 (depends on 1)

The method of claim 1, the operations further comprising assigning the particular confidence value by performing additional operations that comprise:
computing a forward optical flow and a backward optical flow of the particular boundary pixel with respect to the first video frame and the second video frame; and
applying a sigmoidal function to a difference between the forward optical flow and the backward optical flow, wherein the particular confidence value includes or is derived from an output of the sigmoidal function,
wherein an increase in the difference between the forward optical flow and the backward optical flow corresponds to a decrease in the particular confidence value.

### Claim 3 (depends on 2)

The method of claim 2, the operations further comprising computing the difference between the forward optical flow and the backward optical flow by performing additional operations comprising:
identifying an observed position of the particular boundary pixel in the first video frame;
computing an estimated position of the particular boundary pixel by (i) applying the forward optical flow from the first video frame to the second video frame and (ii) applying the backward optical flow from the second video frame to the first video frame; and
computing a distance from the observed position to the estimated position.

### Claim 4 (depends on 2)

The method of claim 2, wherein the operations further comprise deriving the particular confidence value from the output of the sigmoidal function,
wherein deriving the particular confidence value from the output of the sigmoidal function comprises multiplying the output of the sigmoidal function by a texture component that is computed from the texture in a window region that includes the particular boundary pixel and a set of pixels in a window around the particular boundary pixel,
wherein an increase in the texture corresponds to an increase in the particular confidence value.

### Claim 5 (depends on 4)

The method of claim 4, the operations further comprising computing the texture component by computing, in the first video frame or the second video frame, a variance of intensity values in the window region.

### Claim 6 (depends on 5)

The method of claim 5, wherein the variance of intensity values in the window region comprises a summation of intensity differences, wherein each intensity difference is a difference between a grayscale intensity of a respective pixel in the window region and an average grayscale intensity of the window region.

### Claim 7 (depends on 1)

The method of claim 1, the operations further comprising assigning the particular confidence value by performing additional operations that comprise computing, in the first video frame or the second video frame, a variance of intensity values in a window region that includes the particular boundary pixel and a set of pixels in a window around the particular boundary pixel,
wherein a decrease in the variance of intensity values corresponds to a decrease in the particular confidence value.

### Claim 8 (depends on 7)

The method of claim 7, wherein the variance of intensity values in the window region comprises a summation of intensity differences, wherein each intensity difference is a difference between a grayscale intensity of a respective pixel in the window region and an average grayscale intensity of the window region.

### Claim 9 (depends on 1)

The method of claim 1, wherein the target region comprises an object to be removed or modified.

### Claim 10

A non-transitory computer-readable medium having program code stored thereon that, when executed by one or more processing devices, causes the one or more processing devices to perform operations comprising:
accessing a video having a target region;
a step for updating video content in the target region based on confidence-weighted motion estimation for the target region; and
presenting the updated video content on a display device.

### Claim 11 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein the step for updating video content in the target region based on the confidence-weighted motion estimation for the target region comprises:
computing a forward optical flow and a backward optical flow of a particular boundary pixel with respect to a first video frame in the video and a second video frame in the video; and
applying a sigmoidal function to a difference between the forward optical flow and the backward optical flow, wherein a particular confidence value of the particular boundary pixel includes or is derived from an output of the sigmoidal function,
wherein an increase in the difference between the forward optical flow and the backward optical flow corresponds to a decrease in the particular confidence value.

### Claim 12 (depends on 10)

The non-transitory computer-readable medium of claim 10, wherein the step for updating video content in the target region based on the confidence-weighted motion estimation for the target region comprises:
computing, in one or more video frames of the video content that depict the target region, a variance of intensity values in a window region that includes (i) a particular boundary pixel from a boundary around the target region and (ii) a set of pixels in a window around the particular boundary pixel, wherein a decrease in the variance of intensity values corresponds to a decrease in a particular confidence value of the particular boundary pixel.

### Claim 13

A system comprising:
a processing device; and
a non-transitory computer-readable medium communicatively coupled to the processing device,
wherein the processing device is configured to execute program code stored on the non-transitory computer-readable medium and thereby perform operations comprising:
accessing a scene comprising a first video frame and a second video frame, the accessed scene having an annotation identifying a target region to be modified in one or more video frames comprising the scene,
computing a boundary motion for a boundary of the target region within the scene, wherein the boundary includes boundary pixels neighboring the target region in the first video frame and the second video frame,
assigning confidence values to the boundary pixels, respectively, wherein a particular confidence value is at least partially based on one or more of (i) a difference between forward and reverse motion with respect to a particular boundary pixel and (ii) a texture in a region that includes the particular boundary pixel,
interpolating a target motion of a target pixel within the target region from the boundary motion, wherein the particular confidence value of the particular boundary pixel controls a contribution of a particular motion of the particular boundary pixel to the target motion as interpolated from the boundary motion, and
updating color data of the target pixel to correspond to the target motion interpolated from the boundary motion.

### Claim 14 (depends on 13)

The system of claim 13, the operations further comprising assigning the particular confidence value by performing additional operations that comprise:
computing a forward optical flow and a backward optical flow of the particular boundary pixel with respect to the first video frame and the second video frame; and
applying a sigmoidal function to a difference between the forward optical flow and the backward optical flow, wherein the particular confidence value includes or is derived from an output of the sigmoidal function,
wherein an increase in the difference between the forward optical flow and the backward optical flow corresponds to a decrease in the particular confidence value.

### Claim 15 (depends on 14)

The system of claim 14, the operations further comprising computing the difference between the forward optical flow and the backward optical flow by performing additional operations comprising:
identifying an observed position of the particular boundary pixel in the first video frame;
computing an estimated position of the particular boundary pixel by (i) applying the forward optical flow from the first video frame to the second video frame and (ii) applying the backward optical flow from the second video frame to the first video frame; and
computing a distance from the observed position to the estimated position.

### Claim 16 (depends on 14)

The system of claim 14, wherein the operations further comprise deriving the particular confidence value from the output of the sigmoidal function,
wherein deriving the particular confidence value from the output of the sigmoidal function comprises multiplying the output of the sigmoidal function by a texture component that is computed from the texture in a window region that includes the particular boundary pixel and a set of pixels in a window around the particular boundary pixel,
wherein an increase in the texture corresponds to an increase in the particular confidence value.

### Claim 17 (depends on 16)

The system of claim 16, the operations further comprising computing the texture component by computing, in the first video frame or the second video frame, a variance of intensity values in the window region.

### Claim 18 (depends on 17)

The system of claim 17, wherein the variance of intensity values in the window region comprises a summation of intensity differences, wherein each intensity difference is a difference between a grayscale intensity of a respective pixel in the window region and an average grayscale intensity of the window region.

### Claim 19 (depends on 13)

The system of claim 13, the operations further comprising assigning the particular confidence value by performing additional operations that comprise computing, in the first video frame or the second video frame, a variance of intensity values in a window region that includes the particular boundary pixel and a set of pixels in a window around the particular boundary pixel, wherein a decrease in the variance of intensity values corresponds to a decrease in the particular confidence value.

### Claim 20 (depends on 19)

The system of claim 19, wherein the variance of intensity values in the window region comprises a summation of intensity differences, wherein each intensity difference is a difference between a grayscale intensity of a respective pixel in the window region and an average grayscale intensity of the window region.
