# US 2021/0343070 A1 · Method, apparatus and electronic device for processing image

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

- Number: US 2021/0343070 A1
- Document ID: US20210343070A1
- Status: Published application
- Kind: A1
- Application number: 17/378,518
- Filed: 2021-07-16
- Published: 2021-11-04
- Earliest claimed: 2018-09-28
- Assignees: Beijing Dajia Internet Information Technology Co., Ltd.
- Applicants: Beijing Dajia Internet Information Technology Co., Ltd.
- Inventors: Lei Zhang; Wen Zheng; Wenbo Zhang; Qiang Li; Hongmin Xu
- Web page: https://patentgrep.com/patent/US20210343070A1

## CPC

- G06T 13/80: Two-dimensional [2D] animation, e.g. using sprites
- G06T 15/205: {Image-based rendering}
- G06N 3/04: Architecture, e.g. interconnection topology
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06T 5/50: using two or more images, e.g. averaging or subtraction
- G06T 5/60: using machine learning, e.g. neural networks
- G06T 5/94: based on local image properties, e.g. for local contrast enhancement
- G06T 7/90: Determination of colour characteristics
- G06T 2207/20081: Training; Learning
- G06T 2207/20084: Artificial neural networks [ANN]
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The application discloses a method, an apparatus and an electronic device for processing an image. The method includes: acquiring an image with a first rendering style and an image with a second rendering style; generating at least one first intermediate gradient image based on the image with the first rendering style and the image with the second rendering style; wherein the at least one first intermediate gradient image comprises an image in a gradient process from the image with the first rendering style to the image with the second rendering style; and generating a first gradient video based on the image with the first rendering style, the at least one first intermediate gradient image, and the image with the second rendering style.

## Claims

### Claim 1

A method for processing an image, comprising:
acquiring an image with a first rendering style and an image with a second rendering style;
generating at least one first intermediate gradient image based on the image with the first rendering style and the image with the second rendering style; wherein the at least one first intermediate gradient image comprises an image in a gradient process from the image with the first rendering style to the image with the second rendering style; and
generating a first gradient video based on the image with the first rendering style, the at least one first intermediate gradient image, and the image with the second rendering style.

### Claim 2 (depends on 1)

The method according to claim 1, wherein said acquiring the image with the second rendering style comprises:
acquiring first color information of each pixel in the image with the first rendering style;
searching for second color information corresponding to the first color information of each pixel in a relationship table of color transformation for transforming the first rendering style into the second rendering style; and
generating the image with the second rendering style based on the second color information corresponding to the first color information of each pixel.

### Claim 3 (depends on 2)

The method according to claim 2, said generating the image with the second rendering style comprises:
generating a blank image of same resolution as the image with the first rendering style;
determining a location of each pixel in the blank image based on a location of each pixel in the image with the first rendering style; and
generating the image with the second rendering style by filling respective locations of the pixels in the blank image with the second color information corresponding to the first color information of the pixels.

### Claim 4 (depends on 2)

The method according to claim 2, further comprises: determining the relationship table of color transformation for transforming the first rendering style into the second rendering style;
said determining the relationship table of color transformation comprises:
searching for the relationship table of color transformation corresponding to the first rendering style and the second rendering style in a correspondence among an original rendering style, a target rendering style, and a relationship table of color transformation, with the first rendering style as the original rendering style and the second rendering style as the target rendering style.

### Claim 5 (depends on 1)

The method according to claim 1, wherein said acquiring the image with the second rendering style comprises:
acquiring a preset image with the second rendering style;
generating a reference image;
performing at least one round of optimal iteration on the reference image through an iterative optimization algorithm, based on the image with the first rendering style and the preset image with the second rendering style; and
determining a reference image on which the optimal iteration has been performed as the image with the second rendering style, in response to a difference between a rendering style of the reference image and the second rendering style being less than a first threshold and a difference between image content of the reference image and image content of the image with the first rendering style being less than a second threshold.

### Claim 6 (depends on 1)

The method according to claim 1, wherein said generating the at least one first intermediate gradient image comprises:
for each same location in the image with the first rendering style and the image with the second rendering style, acquiring first color information of a pixel in the location in the image with the first rendering style and second color information of a pixel in the location in the image with the second rendering style, and determining at least one piece of target color information of a pixel in the location based on the first color information, the second color information, a first rendering style coefficient, and a second rendering style coefficient;
generating at least one candidate image based on the at least one piece of target color information of a pixel in each location; and
determining the at least one first intermediate gradient image based on the at least one candidate image.

### Claim 7 (depends on 6)

The method according to claim 6, wherein said determining the at least one first intermediate gradient image comprises:
determining the at least one candidate image as the at least one first intermediate gradient image;
or,
determining the at least one first intermediate gradient image by acquiring a local processing manner based on the first rendering style and the second rendering style and processing the at least one candidate image based on the local processing manner.

### Claim 8 (depends on 7)

The method according to claim 7, wherein said acquiring the local processing manner comprises:
searching for the local processing manner corresponding to the first rendering style and the second rendering style in a correspondence among an original rendering style, a target rendering style, and a local processing manner, with the first rendering style as the original rendering style and the second rendering style as the target rendering style.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising:
acquiring an image with a third rendering style based on the image with the second rendering style;
generating at least one second intermediate gradient image based on the image with the second rendering style and the image with the third rendering style; wherein the at least one second intermediate gradient image comprises an image in a gradient process from the image with the second rendering style to the image with the third rendering style;
generating a second gradient video based on the image with the second rendering style, the at least one second intermediate gradient image, and the image with the third rendering style; and
generating a third gradient video by combining the first gradient video and the second gradient video.

### Claim 10

An electronic device, comprising:
a processor; and
a memory configured to store an instruction executed by the processor; wherein
in response to the instruction being executed, the processor is configured to:
acquire an image with a first rendering style and an image with a second rendering style;
generate at least one first intermediate gradient image based on the image with the first rendering style and the image with the second rendering style; wherein the at least one first intermediate gradient image comprises an image in a gradient process from the image with the first rendering style to the image with the second rendering style; and
generate a first gradient video based on the image with the first rendering style, the at least one first intermediate gradient image, and the image with the second rendering style.

### Claim 11 (depends on 10)

The electronic device according to claim 10, wherein the processor is configured to:
acquire first color information of each pixel in the image with the first rendering style;
search for second color information corresponding to the first color information of each pixel in a relationship table of color transformation for transforming the first rendering style into the second rendering style; and
generate the image with the second rendering style based on the second color information corresponding to the first color information of each pixel.

### Claim 12 (depends on 11)

The electronic device according to claim 11, wherein the processor is configured to:
generate a blank image of same resolution as the image with the first rendering style;
determine a location of each pixel in the blank image based on a location of each pixel in the image with the first rendering style; and
generate the image with the second rendering style by filling respective locations of the pixels in the blank image with the second color information corresponding to the first color information of the pixels.

### Claim 13 (depends on 11)

The electronic device according to claim 11, wherein the processor is configured to:
determine the relationship table of color transformation for transforming the first rendering style into the second rendering style;
wherein the processor is further configured to:
search for the relationship table of color transformation corresponding to the first rendering style and the second rendering style in a correspondence among an original rendering style, a target rendering style, and a relationship table of color transformation, with the first rendering style as the original rendering style and the second rendering style as the target rendering style.

### Claim 14 (depends on 10)

The electronic device according to claim 10, wherein the processor is configured to:
acquire a preset image with the second rendering style;
generate a reference image;
perform at least one round of optimal iteration on the reference image through an iterative optimization algorithm, based on the image with the first rendering style and the preset image with the second rendering style; and
determine a reference image on which the optimal iteration has been performed as the image with the second rendering style, in response to a difference between a rendering style of the reference image and the second rendering style being less than a first threshold and a difference between image content of the reference image and image content of the image with the first rendering style being less than a second threshold.

### Claim 15 (depends on 10)

The electronic device according to claim 10, wherein the processor is configured to:
for each same location in the image with the first rendering style and the image with the second rendering style, acquire first color information of a pixel in the location in the image with the first rendering style and second color information of a pixel in the location in the image with the second rendering style, and determine at least one piece of target color information of a pixel in the location based on the first color information, the second color information, a first rendering style coefficient, and a second rendering style coefficient;
generate at least one candidate image based on the at least one piece of target color information of a pixel in each location; and
determine the at least one first intermediate gradient image based on the at least one candidate image.

### Claim 16 (depends on 15)

The electronic device according to claim 15, wherein the processor is configured to:
determine the at least one candidate image as the at least one first intermediate gradient image;
or,
determine the at least one first intermediate gradient image by acquiring a local processing manner based on the first rendering style and the second rendering style and processing the at least one candidate image based on the local processing manner.

### Claim 17 (depends on 16)

The electronic device according to claim 16, wherein the processor is configured to:
search for the local processing manner corresponding to the first rendering style and the second rendering style in a correspondence among an original rendering style, a target rendering style, and a local processing manner, with the first rendering style as the original rendering style and the second rendering style as the target rendering style.

### Claim 18 (depends on 10)

The electronic device according to claim 10, wherein the processor is configured to:
acquire an image with a third rendering style based on the image with the second rendering style;
generate at least one second intermediate gradient image based on the image with the second rendering style and the image with the third rendering style; wherein the at least one second intermediate gradient image comprises an image in a gradient process from the image with the second rendering style to the image with the third rendering style;
generate a second gradient video based on the image with the second rendering style, the at least one second intermediate gradient image, and the image with the third rendering style; and
generate a third gradient video by combining the first gradient video and the second gradient video.

### Claim 19

A non-temporary computer readable storage medium, wherein in response to an instruction in the storage medium being executed by a processor of an electronic device, the electronic device is enabled to:
acquire an image with a first rendering style and an image with a second rendering style;
generate at least one first intermediate gradient image based on the image with the first rendering style and the image with the second rendering style; wherein the at least one first intermediate gradient image comprises an image in a gradient process from the image with the first rendering style to the image with the second rendering style; and
generate a first gradient video based on the image with the first rendering style, the at least one first intermediate gradient image, and the image with the second rendering style.
