IP Library › Granted Patent US 10,168,879
Granted Patent B1
US 10,168,879 · App. 15/594,083 · Granted Jan 1, 2019

Interactive image recoloring

Inventors: Kun Duan (Marina del Rey, CA); Yunchao Gong (Playa Vista, CA); Nan Hu (San Jose, CA)
Assignee: Snap Inc.
G06F3/04845G06T7/11G06T7/13G06T11/001G06T11/203G06T2200/24
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 10,168,879
App. No.
15/594,083
Granted
Jan 1, 2019
Kind
B1
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 single stroke drawn on an image presented on a client device. The method further includes expanding the single stroke drawn on the image to generate an expanded stroke mask and refining the expanded stroke mask to determine a precise boundary that defines a region of interest on the image. The method further includes recolorizing the region of interest on the image in accordance with a user-specified color and causing presentation of a result of the recolorization on the client device.

Claims (73)

1. A system comprising:

a processor;

a user interface coupled to the processor and including a display;

a communication module coupled to the processor; and

memory coupled to the processor and storing instructions that, when executed by the processor, cause the system to perform operations comprising:

causing presentation of an image on a client device;

receiving user input including a single stroke drawn on the image;

expanding the single stroke drawn on the image to generate an expanded stroke mask;

refining the expanded stroke mask to determine a precise boundary that defines a region of interest in the image;

recolorizing the region of interest on the image, the recolorizing including replacing an original color of the region of interest with an alternative color, the recolorizing of the region of interest resulting in a recolorized image; and

causing presentation of the recolorized image on the client device.

2. The system of claim 1 , wherein the expanding of the single stroke comprises:

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

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

3. The system of claim 1 , wherein the expanding of the single stroke comprises:

identifying one or more contour points on the single stroke;

for each pixel of the image corresponding to the one or more contour points of the single stroke, identifying connected pixels having a color within a threshold color difference to the pixel; and

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

4. The system of claim 1 , wherein the 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 system of claim 4 , wherein the segmenting of the image comprises applying a graph cut algorithm to the image.

6. The system of claim 4 , wherein the segmenting of the image comprises assigning a label to each pixel in the image based on a similarity to one or more objects in a foreground of the image defined by the enlarged convex hull mask, the assigning of the label to each pixel in the image resulting in the precise boundary that defines the region of interest.

7. The system of claim 1 , wherein the operations further comprise:

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.

8. The system of claim 7 , wherein the operations further comprise:

combining color channels of the upsampled region of interest with an original luminance channel of the region of interest.

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

10. The system of claim 7 , wherein the 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 the edges are thickened.

11. The system of claim 1 , wherein:

the user input further includes a user-specified color; and

the recolorization of the region of interest comprises replacing the original color of the region of interest with the user-specified color.

12. The system of claim 11 , wherein the single stroke comprises a single contoured mark.

13. A method comprising:

causing presentation of an image on a client device;

receiving user input including a single stroke drawn on the image;

expanding the single stroke drawn on the image to generate an expanded stroke mask;

refining the expanded stroke mask to determine a precise boundary that defines a region of interest in the image;

recolorizing the region of interest on the image, the recolorizing including replacing an original color of the region of interest with an alternative color, the recolorizing of the region of interest resulting in a recolorized image; and

causing presentation of the recolorized image on the client device.

14. The method of claim 13 , wherein the expanding of the single stroke comprises:

identifying one or more contour points on the single stroke;

for each pixel of the image corresponding to the one or more contour points of the single stroke, identifying connected pixels having a color within a threshold color difference to the pixel; and

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

15. The method of claim 13 , wherein the 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.

16. The method of claim 15 , wherein the segmenting of the image comprises assigning a label to each pixel in the image based on a similarity to one or more objects in a foreground of the image defined by the enlarged convex hull mask, the assigning of the label to each pixel in the image resulting in the precise boundary that defines the region of interest.

17. The method of claim 13 , wherein the operations further comprise:

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

subsequent to recolorizing the region of interest, upsampling the recolorized region of interest; and

combining color channels of the upsampled region of interest with an original luminance channel of the region of interest.

18. The method of claim 13 , further comprising simulating one or more additional strokes on the image, the simulating of the one or more additional strokes on the image comprising:

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 the edges are thickened.

19. A non-transitory computer-readable medium storing instructions that, when executed by a computer system, cause the computer system to perform operations comprising:

causing presentation of an image on a client device;

receiving user input including a single stroke drawn on the image;

expanding the single stroke drawn on the image to generate an expanded stroke mask;

refining the expanded stroke mask to determine a precise boundary that defines a region of interest on the image;

recolorizing the region of interest on the image, the recolorizing including replacing an original color of the region of interest with an alternative color, the recolorizing of the region of interest resulting in a recolorized image; and

causing presentation of the recolorized image on the client device.

20. The non-transitory computer-readable medium of claim 19 , wherein the operations further comprise:

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

subsequent to recolorizing the region of interest, upsampling the recolorized region of interest; and

combining color channels of the recolorized region of interest with an original luminance channel of the region of interest.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 27, 2018
From: DUAN, KUN; GONG, YUNCHAO; HU, NAN
To: SNAP INC.
Reel/Frame 047590/0167 →
Cited By (2)
US 12,469,188 US 12,517,637