# US 12,112,405 B2 · Theme icon generation method and apparatus, and computer device

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

- Number: US 12,112,405 B2
- Document ID: US12112405B2
- Status: Granted
- Kind: B2
- Application number: 17/788,463
- Filed: 2020-11-12
- Published: 2023-02-09
- Granted: 2024-10-08
- Earliest claimed: 2019-12-24
- Assignees: Petal Cloud Technology Co., Ltd.
- Applicants: Petal Cloud Technology Co., Ltd.
- Inventors: Wenjie Zhang; Weicai Zhong
- Web page: https://patentgrep.com/patent/US12112405B2

## CPC

- G06T 11/00: Two-dimensional [2D] image generation
- G06T 11/10: Texturing; Colouring; Generation of textures or colours (retouching, inpainting or scratch removal G06T5/77)
- G06T 7/11: Region-based segmentation
- G06T 7/136: involving thresholding
- G06T 7/194: involving foreground-background segmentation
- G06T 7/90: Determination of colour characteristics
- G06T 11/40: Filling planar surfaces by adding surface attributes, e.g. adding colours or textures
- G06T 2210/62: Semi-transparency
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A theme icon generation method includes obtaining an application icon, where the application icon includes a transparent region and an opaque region, and the opaque region includes an icon background and a first logo graphic; segmenting a first logo graphic from the opaque region; adjusting a size of the first logo graphic to generate a second logo graphic; and fusing the second logo graphic with a theme template to generate a theme icon.

## Claims

### Claim 1

A method comprising:
obtaining an application icon comprising a transparent region and an opaque region, wherein the opaque region comprises an icon background and a first logo graphic;
segmenting the first logo graphic from the opaque region;
adjusting a first size of the first logo graphic to generate a second logo graphic; and
obtaining application information corresponding to the application icon, wherein the application information comprises at least one of an application category, an icon background color, or a company to which an application belongs;
matching, based on the application information, a theme template from a theme template library;
detecting a graphic complexity of the second logo graphic;
superimposing, when the graphic complexity is less than a third preset threshold, the second logo graphic on the theme template to generate a theme icon;
performing, when the graphic complexity is greater than or equal to the third preset threshold, a Poisson blending on the second logo graphic and the theme template to generate the theme icon; and
fusing the second logo graphic with the theme template to generate the theme icon.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
performing a binarization processing on the application icon to determine the opaque region; and
performing an image segmentation processing on the opaque region to generate the first logo graphic.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
obtaining a theme reference icon;
segmenting a reference logo graphic from the theme reference icon; and
further adjusting, based on a second size of the reference logo graphic, the first size of the first logo graphic.

### Claim 4 (depends on 3)

The method of claim 3, wherein adjusting the first size of the first logo graphic based on the second size of the reference logo graphic comprises:
comparing the first size of the first logo graphic with the second size of the reference logo graphic to obtain a comparison result; and
scaling, based on the comparison result and using an interpolation algorithm, the first logo graphic to make a third size of the second logo graphic to be the same as the second size of the reference logo graphic.

### Claim 5 (depends on 4)

The method of claim 4, wherein after scaling the first logo graphic, the method further comprises:
generating a color histogram corresponding to the reference logo graphic; and
determining, based on a color quantity in the color histogram and a hue distribution in the color histogram, a color gradient status of the reference logo graphic.

### Claim 6 (depends on 5)

The method of claim 5, wherein determining the color gradient status of the reference logo graphic based on the color quantity and the hue distribution in the color histogram comprises:
determining, when the color quantity is less than or equal to a first preset threshold, that the reference logo graphic is monochrome, and that no color gradient exists;
determining, when the color quantity is greater than the first preset threshold, and a color difference between two colors is less than a second preset threshold, that color gradient exists in the reference logo graphic; and
determining, when the color quantity is greater than the first preset threshold, and a color difference between any two colors is greater than or equal to the second preset threshold, that the reference logo graphic comprises a plurality of colors, and that no color gradient exists.

### Claim 7

An apparatus, comprising:
a memory configured to store instructions; and
a processor coupled to the memory, wherein the instructions cause the processor to be configured to:
obtain an application icon comprising a transparent region and an opaque region, wherein the opaque region comprises an icon background and a first logo graphic;
segment the first logo graphic from the opaque region;
adjust a first size of the first logo graphic to generate a second logo graphic; and
obtain application information corresponding to the application icon, wherein the application information comprises at least one of an application category, an icon background color, or a company to which an application belongs;
match, based on the application information, a theme template from a theme template library;
detect a graphic complexity of the second logo graphic;
superimpose the second logo graphic on the theme template when the graphic complexity is less than a third preset threshold to generate a theme icon;
perform a Poisson blending on the second logo graphic and the theme template when the graphic complexity is greater than or equal to the third preset threshold to generate the theme icon; and
fuse the second logo graphic with the theme template to generate the theme icon.

### Claim 8 (depends on 7)

The apparatus of claim 7, wherein the instructions further cause the processor to be configured to:
perform a binarization processing on the application icon to determine the opaque region; and
perform an image segmentation processing on the opaque region to generate the first logo graphic.

### Claim 9 (depends on 7)

The apparatus of claim 7, wherein the instructions further cause the processor to be configured to:
obtain a theme reference icon;
segment a reference logo graphic from the theme reference icon; and
further adjust, based on a second size of the reference logo graphic, the first size of the first logo graphic.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the instructions further cause the processor to be configured to adjust the first size of the first logo graphic based on the second size of the reference logo graphic by:
comparing the first size of the first logo graphic with the second size of the reference logo graphic to obtain a comparison result; and
scaling, based on the comparison result and using an interpolation algorithm, the first logo graphic to make a third size of the second logo graphic to be the same as the second size of the reference logo graphic.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein after scaling the first logo graphic, the instructions further cause the processor to be configured to:
generate a color histogram corresponding to the reference logo graphic; and
determine, based on a color quantity in the color histogram and a hue distribution in the color histogram, a color gradient status of the reference logo graphic.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the instructions further cause the processor to be configured to determine the color gradient status of the reference logo graphic based on the color quantity and the hue distribution in the color histogram by:
determining that the reference logo graphic is monochrome and a color gradient does not exist in the reference logo graphic when the color quantity is less than or equal to a first preset threshold;
determining that the color gradient exists in the reference logo graphic when the color quantity is greater than the first preset threshold and a color difference between two colors is less than a second preset threshold; and
determining that the reference logo graphic comprises a plurality of colors and does not comprise the color gradient when the color quantity is greater than the first preset threshold, and a color difference between any two colors is greater than or equal to the second preset threshold.

### Claim 13

A computer program product comprising computer-executable instructions that are stored on a non-transitory computer-readable storage medium and that, when executed by a processor, cause an apparatus to:
obtain an application icon comprising a transparent region and an opaque region, wherein the opaque region comprises an icon background and a first logo graphic;
segment the first logo graphic from the opaque region;
adjust a first size of the first logo graphic to generate a second logo graphic; and
obtain application information corresponding to the application icon, wherein the application information comprises at least one of an application category, an icon background color, or a company to which an application belongs;
match, based on the application information, a theme template from a theme template library;
detect a graphic complexity of the second logo graphic;
superimpose the second logo graphic on the theme template when the graphic complexity is less than a third preset threshold to generate a theme icon;
perform a Poisson blending on the second logo graphic and the theme template when the graphic complexity is greater than or equal to the third preset threshold to generate the theme icon; and
fuse the second logo graphic with the theme template to generate the theme icon.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the computer-executable instructions further cause the apparatus to:
perform a binarization processing on the application icon to determine the opaque region; and
perform an image segmentation processing on the opaque region to generate the first logo graphic.

### Claim 15 (depends on 13)

The computer program product of claim 13, wherein the computer-executable instructions further cause the apparatus to:
obtain a theme reference icon;
segment a reference logo graphic from the theme reference icon; and
further adjust, based on a second size of the reference logo graphic, the first size of the first logo graphic.

### Claim 16 (depends on 15)

The computer program product of claim 15, wherein the computer-executable instructions further cause the apparatus to be configured to adjust the first size of the first logo graphic based on the second size of the reference logo graphic by:
comparing the first size of the first logo graphic with the second size of the reference logo graphic to obtain a comparison result; and
scaling, based on the comparison result and using an interpolation algorithm, the first logo graphic to make a third size of the second logo graphic to be the same as the second size of the reference logo graphic.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein after scaling the first logo graphic, the computer-executable instructions further cause the apparatus to:
generate a color histogram corresponding to the reference logo graphic; and
determine, based on a color quantity in the color histogram and a hue distribution in the color histogram, a color gradient status of the reference logo graphic.

### Claim 18 (depends on 17)

The computer program product of claim 17, wherein the computer-executable instructions further cause the apparatus to be configured to determine the color gradient status of the reference logo graphic based on the color quantity and the hue distribution in the color histogram by:
determining that the reference logo graphic is monochrome and a color gradient does not exist in the reference logo graphic when the color quantity is less than or equal to a first preset threshold;
determining that the color gradient exists in the reference logo graphic when the color quantity is greater than the first preset threshold and a color difference between two colors is less than a second preset threshold; and
determining that the reference logo graphic comprises a plurality of colors and does not comprise the color gradient when the color quantity is greater than the first preset threshold, and a color difference between any two colors is greater than or equal to the second preset threshold.
