IP Library › Granted Patent US 11,687,220
Granted Patent B2
US 11,687,220 · App. 17/444,439 · Granted Jun 27, 2023

Interactive image recoloring

Inventors: Kun Duan (Los Angeles, CA); Yunchao Gong (Playa Vista, CA); Nan Hu (San Jose, CA)
Assignee: Snap Inc.
G06F3/04845G06F3/0488G06F3/04883G06T7/11G06T7/12G06T7/13G06T7/162G06T11/001G06T11/203G06T2200/24G06T2207/10024G06T2207/20028G06T2207/20092
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,687,220
App. No.
17/444,439
Granted
Jun 27, 2023
Kind
B2
Abstract

Disclosed are systems, methods, and computer-readable storage media to perform an interactive image recolorization process. The method includes receiving user input including a stroke drawn on an image presented on a client device. The stroke comprises a user-specified color. The method further includes determining a region of interest in the image. The method further includes recolorizing the region of interest on the image based on the user-specified color and causing presentation of a result of the recolorization on the client device.

Claims (77)

1. A method comprising:

on a client device, causing presentation of a user interface comprising an image and an input element comprising multiple selectable colors;

detecting a selected color from the multiple selectable colors;

detecting a user input as a single uninterrupted stroke drawn on the image;

in response to the single uninterrupted stroke, determining a region of interest in the image;

performing a graphical model inference method to recolorize the region of interest by:

performing a comparison of luminance values of neighboring pixels; and

determining a recolorization color based on the comparison;

filling the region of interest with the recolorization color to produce a recolorized image; and

causing presentation of the recolorized image on the client device.

2. The method of claim 1 , comprising expanding the single uninterrupted stroke to generate an expanded stroke mask.

3. The method of claim 2 , comprising refining the expanded stroke mask to determine a precise boundary of the region of interest.

4. The method of claim 3 , wherein refining of the expanded stroke mask comprises:

computing a convex hull of the expanded stroke mask;

dilating the convex hull by a predetermined amount to generate an enlarged convex hull mask; and

segmenting the image based on the enlarged convex hull mask.

5. The method of claim 3 , wherein refining of the expanded stroke mask further comprises simulating one or more additional strokes on the image.

6. The method of claim 5 , wherein simulating of the one or more additional strokes on the image comprises:

performing bilateral filtering on the image to remove high-frequency edges;

performing edge detection on the image to generate an edge map; and

dilating the edge map such that edges of the edge map are thickened.

7. The method of claim 1 , further comprising generating an expanded stroke mask by performing operations comprising:

identifying one or more contour points on the single uninterrupted stroke; and

applying a flood fill algorithm to the image using the one or more contour points as seeds, resulting in the expanded stroke mask.

8. The method of claim 1 , comprising generating an expanded stroke mask by performing operations comprising:

identifying one or more contour points on a single uninterrupted stroke;

identifying contour pixels, each pixel of the contour pixels having a color within a threshold color difference to a neighboring pixel; and

replacing the color of connected pixels with a user-specified color resulting in the expanded stroke mask.

9. The method of claim 1 , comprising:

prior to recolorizing the region of interest of the image, downsampling the region of interest; and

subsequent to recolorizing the region of interest, upsampling the recolorized region of interest.

10. The method of claim 9 , comprising combining color channels of the upsampled region of interest with an original luminance channel of the region of interest.

11. A system comprising:

one or more processors; and

a non-transitory computer readable storage medium comprising instructions that when executed by the one or more processors cause the one or more processors to perform operations comprising:

on a client device, causing presentation of a user interface comprising an image and an input element comprising multiple selectable colors;

detecting a selected color from the multiple selectable colors;

detecting a user input as a single uninterrupted stroke drawn on the image;

in response to the single uninterrupted stroke,

determining a region of interest in the image;

performing a graphical model inference method to recolorize the region of interest by:

performing a comparison of luminance values of neighboring pixels; and

determining a recolorization color based on the comparison;

filling the region of interest with the recolorization color to produce a recolorized image; and

causing presentation of the recolorized image on the client device.

12. The system of claim 11 , wherein the operations caused by instructions executed by the one or more processors further include: expanding the single uninterrupted stroke to generate an expanded stroke mask.

13. The system of claim 12 , wherein the operations caused by instructions executed by the one or more processors further include: refining the expanded stroke mask to determine a precise boundary of the region of interest.

14. The system of claim 13 , wherein refining of the expanded stroke mask comprises:

computing a convex hull of the expanded stroke mask;

dilating the convex hull by a predetermined amount to generate an enlarged convex hull mask; and

segmenting the image based on the enlarged convex hull mask.

15. The system of claim 13 , wherein refining of the expanded stroke mask further comprises simulating one or more additional strokes on the image.

16. The system of claim 15 , wherein simulating of the one or more additional strokes on the image comprises:

performing bilateral filtering on the image to remove high-frequency edges;

performing edge detection on the image to generate an edge map; and

dilating the edge map such that edges of the edge map are thickened.

17. The system of claim 11 , wherein the operations further include generating an expanded stroke mask by performing operations comprising:

identifying one or more contour points on the single uninterrupted stroke; and

applying a flood fill algorithm to the image using the one or more contour points as seeds resulting in the expanded stroke mask.

18. The system of claim 11 , wherein the operations caused by instructions executed by the one or more processors further include:

generating an expanded stroke mask by performing operations comprising:

identifying one or more contour points on the single uninterrupted stroke;

identifying contour pixels, wherein each pixel in the contour pixels having a color within a threshold color difference to a neighboring pixel; and

replacing the color of contour pixels with a user-specified color resulting in the expanded stroke mask.

19. The system of claim 11 , wherein the operations caused by instructions executed by the one or more processors further include:

prior to recolorizing the region of interest of the image, downsampling the region of interest; and

subsequent to recolorizing the region of interest, upsampling the recolorized region of interest.

20. A machine-readable non-transitory storage medium having instruction data executable by a machine to cause the machine to perform operations comprising:

on a client device, causing presentation of a user interface comprising an image and an input element comprising multiple selectable colors;

detecting a selected color from the multiple selectable colors;

detecting a user input as a single uninterrupted stroke drawn on the image;

in response to the single uninterrupted stroke, determining a region of interest in the image;

performing a graphical model inference method to recolorize the region of interest by:

performing a comparison of luminance values of neighboring pixels; and

determining a recolorization color based on the comparison;

filling the region of interest with the recolorization color to produce a recolorized image; and

causing presentation of the recolorized image on the client device.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 15, 2023
From: DUAN, KUN; GONG, YUNCHAO; HU, NAN
To: SNAP INC.
Reel/Frame 063640/0378 →
Continuity (4)
Continuation 16659073 · Oct 21, 2019
Continuation 16204857 · Nov 29, 2018
Continuation 15594083 · May 12, 2017
Related Publication 20220019343A1 · Jan 20, 2022
Cited By (1)
US 12,517,637