IP Library › Granted Patent US 12,517,637
Granted Patent B2
US 12,517,637 · App. 18/205,216 · Granted Jan 6, 2026

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 12,517,637
App. No.
18/205,216
Granted
Jan 6, 2026
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 (63)

1 . A method comprising:

on a computing device, causing presentation of a user interface comprising an image;

detecting an input as a stroke drawn on the image;

determining a region of interest in the image based on the stroke;

performing a 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; and

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

2 . The method of claim 1 , wherein the user interface further comprises multiple selectable colors and the method further comprises detecting a selected color from the multiple selectable colors.

3 . The method of claim 1 , further comprising causing presentation of the recolorized image on the computing device.

4 . The method of claim 1 , comprising expanding the stroke to generate a mask.

5 . The method of claim 4 , comprising refining the mask to determine a precise boundary of the region of interest.

6 . The method of claim 5 , wherein refining of the mask comprises:

computing a convex hull of the 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.

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

8 . The method of claim 7 , 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.

9 . The method of claim 1 , further comprising generating a mask by performing operations comprising:

identifying one or more contour points on the stroke; and

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

10 . The method of claim 2 , comprising generating a mask by performing operations comprising:

identifying one or more contour points on the 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 the selected color resulting in the mask.

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 computing device, causing presentation of a user interface comprising an image;

detecting an input as a stroke drawn on the image;

determining a region of interest in the image based on the stroke;

performing a 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; and

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

12 . The system of claim 11 , wherein the user interface further comprises multiple selectable colors and the method further comprises detecting a selected color from the multiple selectable colors.

13 . The system of claim 11 , further comprising causing presentation of the recolorized image on the computing device.

14 . The system of claim 11 , comprising expanding the stroke to generate a mask.

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

refining the mask to determine a precise boundary of the region of interest.

16 . The system of claim 15 , wherein refining of the mask comprises:

computing a convex hull of the 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.

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

18 . The system of claim 17 , 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.

19 . The system of claim 11 , wherein the operations further include generating a mask by performing operations comprising:

identifying one or more contour points on the stroke; and

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

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 computing device, causing presentation of a user interface comprising an image;

detecting an input as a stroke drawn on the image;

determining a region of interest in the image based on the stroke;

performing a 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; and

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

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 31, 2023
From: DUAN, KUN; GONG, YUNCHAO; HU, NAN
To: SNAP INC.
Reel/Frame 064437/0439 →
Continuity (5)
Continuation 17444439 · Aug 4, 2021
Continuation 16659073 · Oct 21, 2019
Continuation 16204857 · Nov 29, 2018
Continuation 15594083 · May 12, 2017
Related Publication 20230305689A1 · Sep 28, 2023
References Cited (42)
US 8200014B2 · Wilensky et al. · 2012 [cited by applicant]
US 8542923B2 · Wilensky et al. · 2013 [cited by applicant]
US 8913074B2 · Levin · 2014 [cited by examiner]
US 10168879B1 · Duan et al. · 2019 [cited by applicant]
US 10509553B1 · Duan · 2019 [cited by examiner]
US 11106343B1 · Duan · 2021 [cited by examiner]
US 11687220B2 · Duan · 2023 [cited by examiner]
US 20060008139A1 · Hirota et al. · 2006 [cited by applicant]
US 20070247679A1 · Pettigrew · 2007 [cited by examiner]
US 20100085372A1 · Levin · 2010 [cited by examiner]
US 20100232700A1 · Ito et al. · 2010 [cited by applicant]
US 20110175916A1 · Noris et al. · 2011 [cited by applicant]
US 20120075331A1 · Mallick et al. · 2012 [cited by applicant]
US 20130019208A1 · Kotler et al. · 2013 [cited by applicant]
US 20130121565A1 · Wang · 2013 [cited by examiner]
US 20150248390A1 · Gormish et al. · 2015 [cited by applicant]
US 20150248740A1 · Gormish et al. · 2015 [cited by applicant]
US 20150248760A1 · Barrus et al. · 2015 [cited by applicant]
US 20150339051A1 · Yang · 2015 [cited by examiner]
US 20220019343A1 · Duan et al. · 2022 [cited by applicant]
“U.S. Appl. No. 15/594,083, Notice of Allowance mailed Aug. 29, 2018”, 8 pgs. [cited by applicant]
“U.S. Appl. No. 16/204,857, Examiner Interview Summary mailed Jul. 30, 2019”, 3 pgs. [cited by applicant]
“U.S. Appl. No. 16/204,857, Non Final Office Action mailed Apr. 30, 2019”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 16/204,857, Notice of Allowance mailed Aug. 15, 2019”, 7 pgs. [cited by applicant]
“U.S. Appl. No. 16/204,857, Response filed Jul. 29, 2019 to Non-Final Office Action mailed Apr. 30, 2019”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 16/659,073, Advisory Action mailed Mar. 25, 2021”, 2 pgs. [cited by applicant]
“U.S. Appl. No. 16/659,073, Final Office Action mailed Jan. 12, 2021”, 16 pgs. [cited by applicant]
“U.S. Appl. No. 16/659,073, Non Final Office Action mailed Aug. 7, 2020”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 16/659,073, Notice of Allowance mailed Apr. 28, 2021”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 16/659,073, Response filed Mar. 11, 2021 to Final Office Action mailed Jan. 12, 2021”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 16/659,073, Response filed Apr. 12, 2021 to Advisory Action mailed Mar. 25, 2021”, 11 pgs. [cited by applicant]
“U.S. Appl. No. 16/659,073, Response filed Oct. 30, 2020 to Non Final Office Action mailed Aug. 7, 2020”, 9 pgs. [cited by applicant]
“U.S. Appl. No. 17/444,439, Non Final Office Action mailed Aug. 4, 2022”, 18 pgs. [cited by applicant]
“U.S. Appl. No. 17/444,439, Notice of Allowance mailed Feb. 13, 2023”, 10 pgs. [cited by applicant]
“U.S. Appl. No. 17/444,439, Preliminary Amendment filed Sep. 30, 2021”, 8 pgs. [cited by applicant]
“U.S. Appl. No. 17/444,439, Response filed Nov. 21, 2022 to Non Final Office Action mailed Aug. 4, 2022”, 9 pgs. [cited by applicant]
“Background Algorithm in a nutshell”, [Online]. Retrieved from the Internet: <URL:https://grabcut.weebly.com/background--algorithm.html>, (accessed Dec. 19, 2017), 2 pgs. [cited by applicant]
“Interactive foreground extraction using grabout algorithm”, [Online] Retrieved from the Internet <URL: https://docs.opencv.org/trunk/d8/d83/tutorial_py_grabcut.html>, (accessed Dec. 19, 2017), 3 pgs. [cited by applicant]
“YCbCr”, Wikipedia, [Online] Retrieved from the Internet: <URL:https://en.wikipedia.org/wiki/YCbCr>, (accessed Dec. 19, 2017), 4 pgs. [cited by applicant]
Levin, A, et al., “Colorization using optimization”, ACM SIGGRAPH 2004 Conf. Proc., (2004), 689-694. [cited by applicant]
Levin, Anat, “Colorizaton Using Optimization”, [Online]. Retrieved from the Internet :<URL:http://www.cs.huji.ac.il/˜yweiss/Colorization/>, (accessed Dec. 19, 2017), 7 pgs. [cited by applicant]
Zhang, Richard, et al., “Colorful image colorization”, arXiv:1603.08511v5 [cs.CV], (Oct. 5, 2016), 29 pgs. [cited by applicant]