# US 2022/0292649 A1 · Corrective lighting for video inpainting

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

- Number: US 2022/0292649 A1
- Document ID: US20220292649A1
- Status: Published application
- Kind: A1
- Application number: 17/196,581
- Filed: 2021-03-09
- Published: 2022-09-15
- Earliest claimed: 2021-03-09
- Assignees: Adobe Inc.
- Applicants: Adobe Inc.
- Inventors: Oliver Wang; John Nelson; Geoffrey Oxholm; Elya Shechtman
- Web page: https://patentgrep.com/patent/US20220292649A1

## CPC

- G06T 5/77: Retouching; Inpainting; Scratch removal
- G06T 5/60: using machine learning, e.g. neural networks
- G06T 7/269: using gradient-based methods
- G06T 2207/10016: Video; Image sequence
- G06T 2207/20081: Training; Learning
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Certain aspects involve video inpainting in which content is propagated from a user-provided reference video frame to other video frames depicting a scene. One example method includes one or more processing devices that performs operations that include accessing a scene depicting a reference object that includes an annotation identifying a target region to be modified in one or more video frames. The operations also includes computing a target motion of a target pixel that is subject to a motion constraint. The motion constraint is based on a three-dimensional model of the reference object. Further, operations include determining color data of the target pixel to correspond to the target motion. The color data includes a color value and a gradient. Operations also include determining gradient constraints using gradient values of neighbor pixels. Additionally, the processing devices updates the color data of the target pixel subject to the gradient constraints.

## Claims

### Claim 1

A method in which one or more processing devices performs operations comprising:
accessing a scene depicting a reference object that includes an annotation identifying a target region to be modified in one or more video frames;
computing a target motion of a target pixel that is subject to a motion constraint, wherein the motion constraint is based on a reference frame;
determining color data of the target pixel that corresponds to the target motion, wherein the color data comprises a color value;
determining gradient constraints using gradient values of neighbor pixels; and
updating the color data of the target pixel subject to the gradient constraints.

### Claim 2 (depends on 1)

The method of claim 1, wherein the reference frame comprises a reference object, and further comprising:
determining the motion constraint based on a three-dimensional (“3D”) model that is defined by a set of sparse feature points.

### Claim 3 (depends on 1)

The method of claim 1, wherein the target region comprises a boundary that is defined by boundary pixels, and further comprising:
determining the motion constraint based on (i) a boundary motion for the boundary of the target region in the reference frame and (ii) confidence values assigned to each of the boundary pixels, wherein the confidence values are based on a texture associated with a region that includes the respective boundary pixel.

### Claim 4 (depends on 1)

The method of claim 1, further comprising determining the gradient constraints in four cardinal directions.

### Claim 5 (depends on 1)

The method of claim 1, wherein determining the gradient constraints comprises:
computing a forward-flow-traced gradient constraint in four cardinal directions;
computing a backward-flow-traced gradient constraint in the four cardinal directions; and
computing a traced-color constraint that corresponds to the target pixel.

### Claim 6 (depends on 5)

The method of claim 5, further comprising:
computing a gradient weighting function;
adjusting each of the forward-flow-traced gradient constraints by applying the gradient weighting function; and
adjusting each of the backward-flow-traced gradient constraints by applying the gradient weighting function.

### Claim 7 (depends on 5)

The method of claim 5, further comprising:
computing a per-color-channel weighting function;
adjusting each of the forward-flow-traced gradient constraints by applying the per-color-channel weighting function; and
adjusting each of the backward-directional gradient constraints by applying the per-color-channel weighting function.

### Claim 8 (depends on 5)

The method of claim 5, further comprising:
computing a screened weighting function; and
adjusting the traced-color constraint by applying the screened weighting function.

### Claim 9 (depends on 5)

The method of claim 5, further comprising:
computing a gradient weighting function, a per-color-channel weighting function, and a screened weighting function;
adjusting each of the forward-flow-traced gradient constraints by applying both of the gradient weighting function and the per-color-channel weighting function;
adjusting each of the backward-flow-traced gradient constraints by applying both of the gradient weighting function and the per-color-channel weighting function; and
adjusting the traced-color constraint by applying the gradient weighting function.

### Claim 10 (depends on 1)

The method of claim 1, wherein determining the gradient constraints comprises:
computing a forward-flow-traced gradient constraint using an expression:
ωgrad(f, 1,0)·ωchannel(f, 1,0)·∥(V(fx, fy, ft)−V(fx+1, fy, ft)−T(px,py,pt)−T(px+1, py, pt))∥2=0,
wherein ωgrad(f, 1, 0) represents a forward-flow-traced gradient weighting function, ωchannel(f, 1, 0) represents a forward-flow-traced per-channel weighting function, V(fx, fy, ft) represents a forward-flow-traced input video frame at time ft, location (fx, fy), and wherein T(px,py,pt) represents a target image that includes a target pixel p at time pt, location (px, py).

### Claim 11 (depends on 1)

The method of claim 1, wherein determining the gradient constraints comprises:
computing a backward-directional gradient constraint using an expression:
ωgrad(b, −1, 0)·ωchannel(b, 1, 0)·∥(V(bx, by, bt)−V(bx+1, by, bt)−T(px,py,pt)−T(px+1, py, pt))∥2=0,
wherein ωgrad(b, −1, 0) represents a backward-directional gradient weighting function, ωchannel(b, −1, 0) represents a backward-directional per-color-channel weighting function, V(bx, by, bt) represents a backward-flow-traced input video frame at time bt, location (bx, by), and wherein T(px,py,pt) represents a target image that includes a target pixel p at time pt, location (px, py).

### Claim 12 (depends on 1)

The method of claim 1, wherein determining the gradient constraints comprises:
computing a traced-color constraint that corresponds to the target pixel using an expression:
ωscreen(f)·∥(T(px,py,pt)−mix(V(bx, by, bt)), V(fx, fy, ft)))∥2=0,
wherein ωscreen (f) represents a screened weighting function, T (px, py, pt) represents a target image that includes a target pixel p at time pt, location (px, py), and mix (V(bx, by, bt),V(fx, fy, ft)) represents a mixing function that is configured to combine color values for a backward-flow-traced input video frame V(bx, by, bt) at time bt, location (bx, by) and a forward-flow-traced input video frame V(fx, fy, ft) at time ft, location (fx, fy).

### Claim 13 (depends on 1)

The method of claim 1, further comprising:
computing a gradient weighting function using an expression:
w
grad
⁡
(
r
,
x
,
y
)
=
exp
⁡
(
-

(
V
⁡
(
r
x
,
r
y
,
r
t
)
-
V
⁡
(
r
x
+
x
,
r
y
+
y
,
r
t
)
)

2
σ
2
)
,
wherein ωgrad (r, x, y) represents the gradient weighting function, V(rx, ry, rt) represents a reference input video frame at time rt, location (rx, ry), and σ controls a shape of the gradient weighting function; and
adjusting at least one gradient constraint of the gradient constraints by applying the gradient weighting function.

### Claim 14 (depends on 1)

The method of claim 1, further comprising:
computing a per-color-channel weighting function using an expression:
w
channel
⁡
(
r
,
x
,
y
)
⁡
[
c
]
=
{
1
⁢
⁢
0.1
<
V
⁡
(
r
x
+
x
,
r
y
+
y
,
r
t
)
⁡
[
c
]
<
.9
⁢
⁢
and
⁢
⁢
0.1
<
V
⁡
(
r
x
,
r
y
,
r
t
)
⁡
[
c
]
<
.9
0.0001
⁢
⁢
otherwise
wherein ωchannel (r, x, y)[c] represents the per-color-channel weighting function, and V (rx, ry, rt) [c] represents a reference input video frame at time rt, location (rx, ry) for a color channel [c]; and
adjusting at least one gradient constraint of the gradient constraints by applying the per-color-channel weighting function.

### Claim 15 (depends on 1)

The method of claim 1, further comprising:
computing a screened weighting function using an expression:
ωscreen(r)=exist(f,b)−Σx,yωgrad(r,x,y),
wherein ωscreen (r) represents the screened weighting function, a value of exist(f, b) corresponds to an existence of either f, b, or both, and ωgrad(r,x,y) represents a gradient weighting function; and
adjusting at least one gradient constraint of the gradient constraints by applying the screened weighting function.

### Claim 16

A computing system comprising:
a processing device; and
a non-transitory computer-readable medium communicatively coupled to the processing device and storing program code, the processing device configured to execute the program code and thereby performing operations comprising:
accessing a scene depicting a reference object that includes an annotation identifying a target region to be modified in one or more video frames;
computing a target motion of a target pixel based on a model of the reference object;
determining color data of the target pixel that corresponds to the target motion, wherein the color data comprises a color value and a gradient;
determining gradient constraints using gradient values of neighbor pixels, wherein the neighbor pixels are adjacent to the target pixel and correspond to four cardinal directions; and
updating the color data of the target pixel subject to the gradient constraints.

### Claim 17 (depends on 16)

The computing system of claim 16, wherein the operations further comprise:
computing a forward-flow-traced gradient constraint in the four cardinal directions;
computing a backward-flow-traced gradient constraint in the four cardinal directions;
computing a traced-color constraint that corresponds to the target pixel;
computing a gradient weighting function, a per-color-channel weighting function, and a screened weighting function;
adjusting each of the forward-flow-traced gradient constraints by applying both of the gradient weighting function and the per-color-channel weighting function;
adjusting each of the backward-directional gradient constraints by applying both of the gradient weighting function and the per-color-channel weighting function; and
adjusting the traced-color constraint by applying the gradient weighting function.

### Claim 18 (depends on 16)

The computing system of claim 16, the operations further comprising:
computing the forward-flow-traced gradient constraints, in each of the four cardinal directions, using an expression:
ωgrad(f, −1, 0)·ωchannel(f, 1, 0)·∥(V(fx, fy, ft)−V(fx+1, fy, ft)−T(px,py,pt)−T(px+1, py, pt))∥2=0;
computing the backward-directional gradient constraints, in each of the four cardinal directions, using an expression:
ωgrad(b, −1, 0)·ωchannel(b, 1, 0)·∥(V(bx, by, bt)−V(bx+1, by, bt)−T(px,py,pt)−T(px+1, py, pt))∥2=0;
computing a traced-color constraint that corresponds to a target pixel using an expression:
ωscreen(f)·∥T(px,py,pt)−mix(V(px, py, pt)−mix(V(bx, by, bt), V(fx, fyft)))∥2=0; and
wherein ωgrad(f, 1,0) represents a forward-flow-traced gradient weighting function, ωchannel(f, 1, 0) represents a forward-flow-traced per-channel weighting function, V(fx, fy, ft) represents a forward-flow-traced input video frame at time ft, location (fx, fy), and wherein T(px,py,pt) represents a target image that includes a target pixel p at time pt, location (px,py), ωgrad(b, −1, 0) represents a backward-flow-traced gradient weighting function, ωchannel(b, −1, 0) represents a backward-flow-traced per-color-channel weighting function, V (bx, by, bt) represents a backward-flow-traced input video frame at time bt, location (bx, by), ωscreen(f) represents a screened weighting function, and mix (V(bx, by, bt), V(fx, fy, ft)) represents a mixing function that is configured to combine color values for the backward-flow-traced input video frame and the forward-flow-traced input video frame.

### Claim 19

A non-transitory computer-readable medium having program code of a video editing tool stored thereon, wherein the program code, when executed by one or more processing devices, configures the one or more processing devices to perform operations comprising:
accessing a scene depicting a reference object that includes an annotation identifying a target region to be modified in one or more video frames;
computing a target motion of a target pixel that is subject to a motion constraint, wherein the motion constraint is based on a 3D model of the reference object;
determining color data of the target pixel that corresponds to the target motion, wherein the color data comprises a color value and a gradient;
determining gradient constraints using gradient values of neighbor pixels; and
updating the color data of the target pixel subject to the gradient constraints.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, the operations further comprising:
computing a forward-flow-traced gradient constraint in four cardinal directions;
computing a backward-flow-traced gradient constraint in the four cardinal directions;
computing a traced-color constraint that corresponds to the target pixel;
computing a gradient weighting function, a per-color-channel weighting function, and a screened weighting function;
adjusting each of the forward-flow-traced gradient constraints by applying both of the gradient weighting function and the per-color-channel weighting function;
adjusting each of the backward-flow-traced gradient constraints by applying both of the gradient weighting function and the per-color-channel weighting function; and
adjusting the traced-color constraint by applying the gradient weighting function.
