US2022327749A1PendingUtilityA1

Method and electronic device for processing images

Assignee: BEIJING DAJIA INTERNET INFORMATION TECH CO LTDPriority: Mar 27, 2020Filed: Jun 21, 2022Published: Oct 13, 2022
Est. expiryMar 27, 2040(~13.7 yrs left)· nominal 20-yr term from priority
G06T 11/10G06T 11/60G06T 7/90G06T 2207/30196G06T 2207/20084G06T 2207/10024G06T 2207/20221G06T 11/40G06T 5/50G06T 11/001G06T 5/94Y02D10/00
63
PatentIndex Score
0
Cited by
0
References
0
Claims

Abstract

A method for processing images may include: acquiring a first mask image based on a portrait image, wherein the first mask image represents a hair area in the portrait image; acquiring a first portrait image including the hair area based on the first mask image and a color lookup table; acquiring a second portrait image including a non-hair area based on the first mask image; and acquiring a target image by interpolating and blending the first portrait image with the second portrait image.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
         1 . A method for processing images executed by an electronic device, the method comprising:
 acquiring a first processed image based on a portrait image, wherein the first processed image represents a hair area in the portrait image;   acquiring a first portrait image based on the first processed image and a color set, wherein the color set comprises a plurality of color values, colors corresponding to the color values are of the same color system as a target dye color but with different grayscale values, the first portrait image comprises the hair area with the target dye color, and the target dye color is selected by a terminal user;   acquiring a second portrait image based on the first processed image, wherein the second portrait image comprises a non-hair area in the portrait image; and   acquiring a target image based on the first portrait image and the second portrait image.   
     
     
         2 . The method according to  claim 1 , wherein said acquiring the first processed image based on the portrait image comprises:
 acquiring a second processed image based on the portrait image, wherein the second processed image represents the hair area in the portrait image;   calculating a target color value based on a color value of each pixel in the second processed image; and   acquiring the first processed image by replacing the color value of each pixel in the second processed image with the target color value.   
     
     
         3 . The method according to  claim 2 , wherein said calculating the target color value based on the color value of each pixel in the second processed image comprises:
 acquiring a convolution kernel operator, wherein the convolution kernel operator is configured to perform weighted averaging on pixel values in a particular area in the second processed image; and   determining the target color value based on the color value of each pixel in the second processed image and the convolution kernel operator.   
     
     
         4 . The method according to  claim 2 , wherein said calculating the target color value based on the color value of each pixel in the second processed image comprises:
 acquiring a third processed image, wherein the third processed image represents a hair area in a previous image of the portrait image;   acquiring an image weight value of the third processed image; and   determining the target color value based on the image weight value, the color value of each pixel in the second processed image, and a color value of each pixel in the third processed image.   
     
     
         5 . The method according to  claim 1 , wherein the color set is generated based on a standard lookup table and the target dye color by replacing a first grayscale value of a color value in the color set with a second grayscale value of a color value corresponding to the target dye color, wherein the first grayscale value and the second grayscale value match each other. 
     
     
         6 . The method according to  claim 1 , wherein said acquiring the first portrait image based on the first processed image and the color set comprises:
 extracting a third portrait image from the portrait image based on the first processed image, wherein the third portrait image comprises the hair area in the portrait image; and   acquiring the first portrait image by rendering the third portrait image based on the color set.   
     
     
         7 . The method according to  claim 1 , wherein said acquiring the first portrait image based on the first processed image and the color set comprises:
 acquiring a fourth portrait image by rendering the portrait image based on the color set; and   extracting the first portrait image from the fourth portrait image based on the first processed image.   
     
     
         8 . The method according to  claim 7 , wherein the color set comprises a plurality of key color values, and said acquiring the fourth portrait image by rendering the portrait image based on the color set comprises:
 acquiring a key color value corresponding to each pixel in the portrait image by searching the color set; and   acquiring the fourth portrait image by rendering each pixel in the portrait image based on the key color value.   
     
     
         9 . The method according to  claim 8 , wherein the color set uses an R color component, a G color component, and a B color component as coordinates axes, and said acquiring the key color value corresponding to each pixel in the portrait image by searching the color set comprises:
 acquiring a color value of each pixel in the portrait image, wherein the color value comprises an R color component value, a G color component value, and a B color component value;   determining target coordinates in the color set based on the R color component value, the G color component value, and the B color component value;   acquiring a key color value corresponding to the target coordinates from the color set.   
     
     
         10 . The method according to  claim 8 , further comprising:
 acquiring color coordinates closest to the target coordinates in the case that the color set do not comprise the target coordinates;   determining a key color value corresponding to the color coordinates.   
     
     
         11 . The method according to  claim 10 , wherein said acquiring the fourth portrait image by rendering each pixel in the portrait image based on the key color value comprises:
 acquiring the fourth portrait image by interpolating and blending the key color value with a color value of each pixel in the portrait image.   
     
     
         12 . The method according to  claim 1 , wherein the first processed image is a mask image. 
     
     
         13 . The method according to  claim 1 , wherein said acquiring the target image based on the first portrait image and the second portrait image comprises:
 acquiring the target image by interpolating and blending the first portrait image with the second portrait image.   
     
     
         14 . An electronic device, comprising:
 a processor; and   a memory configured to store at least one computer program comprising at least one instruction executable by the processor;   wherein the at least one instruction, when executed by the processor, causes the processor to perform a method comprising:
 acquiring a first processed image based on a portrait image, wherein the first processed image represents a hair area in the portrait image; 
 acquiring a first portrait image based on the first processed image and a color set, wherein the color set comprises a plurality of color values, colors corresponding to the color values are of the same color system as a target dye color but with different grayscale values, the first portrait image comprises the hair area with the target dye color, and the target dye color is selected by a terminal user; 
 acquiring a second portrait image based on the first processed image, wherein the second portrait image comprises a non-hair area in the portrait image; and 
 acquiring a target image based on the first portrait image and the second portrait image. 
   
     
     
         15 . The electronic device according to  claim 14 , wherein said acquiring the first processed image based on the portrait image comprises:
 acquiring a second processed image based on the portrait image, wherein the second processed image represents the hair area in the portrait image;   calculating a target color value based on a color value of each pixel in the second processed image; and   acquiring the first processed image by replacing the color value of each pixel in the second processed image with the target color value.   
     
     
         16 . The electronic device according to  claim 15 , wherein said calculating the target color value based on the color value of each pixel in the second processed image comprises:
 acquiring a convolution kernel operator, wherein the convolution kernel operator is configured to perform weighted averaging on pixel values in a particular area in the second processed image; and   determining the target color value based on the color value of each pixel in the second processed image and the convolution kernel operator.   
     
     
         17 . The electronic device according to  claim 15 , wherein said calculating the target color value based on the color value of each pixel in the second processed image comprises:
 acquiring a third processed image, wherein the second processed image represents a hair area in a previous image of the portrait image;   acquiring an image weight value of the third processed image; and   determining the target color value based on the image weight value, the color value of each pixel in the second processed image, and a color value of each pixel in the third processed image.   
     
     
         18 . The electronic device according to  claim 14 , wherein the color set is generated based on a standard lookup table and the target dye color by replacing a first grayscale value of a color value in the color set with a second grayscale value of a color value corresponding to the target dye color, wherein the first grayscale value and the second grayscale value match each other. 
     
     
         19 . The electronic device according to  claim 14 , wherein said acquiring the first portrait image based on the first processed image and the color set comprises:
 extracting a third portrait image from the portrait image based on the first processed image, wherein the third portrait image comprises the hair area in the portrait image; and   acquiring the first portrait image by rendering the third portrait image based on the color set.   
     
     
         20 . Anon-transitory storage medium storing at least one computer program comprising at least one instruction, wherein the at least one instruction, when executed by a processor of an electronic device, causes the electronic device to perform a method comprising:
 acquiring a first processed image based on a portrait image, wherein the first processed image represents a hair area in the portrait image;   acquiring a first portrait image based on the first processed image and a color set, wherein the color set comprises a plurality of color values, colors corresponding to the color values are of the same color system as a target dye color but with different grayscale values, the first portrait image comprises the hair area with the target dye color, and the target dye color is selected by a terminal user;   acquiring a second portrait image based on the first processed image, wherein the second portrait image comprises a non-hair area in the portrait image; and   acquiring a target image based on the first portrait image and the second portrait image.

Join the waitlist — get patent alerts

Track US2022327749A1 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.