CN-122023210-A - Color scheme generation method, device, equipment and storage medium
Abstract
The application discloses a color scheme generation method, a device, equipment and a storage medium. The color scheme generating method comprises the steps of carrying out standardized pretreatment on a color source image, carrying out pixel sampling and cluster analysis on the standardized color source image to obtain color spectrum information of the color source image, and identifying emotion labels contained in the color spectrum information through a pre-trained image semantic understanding model to obtain a color scheme corresponding to the color source image. Through the mode, the method and the device can generate an accurate color matching scheme based on semantics.
Inventors
- ZHENG ZIRONG
- WANG XIGUANG
- WANG YUEMIAO
Assignees
- 佳都科技集团股份有限公司
- 广州佳都智通科技有限公司
- 广东华之源信息工程有限公司
- 广州华佳软件有限公司
- 广州佳都城轨智慧运维服务有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251205
Claims (10)
- 1. A color scheme generation method, comprising: carrying out standardized pretreatment on the color source image; Performing pixel sampling and cluster analysis on the standardized color source image to obtain color spectrum information of the color source image; and identifying emotion labels contained in the chromatographic information through a pre-trained image semantic understanding model so as to obtain a color matching scheme corresponding to the color source image.
- 2. The color scheme generating method according to claim 1, wherein said pixel sampling of said normalized color source image comprises: the standardized color source image is subjected to pixel sampling through a color sampler; And setting a weight value corresponding to each color based on the occurrence frequency of each color after sampling.
- 3. The color scheme generating method according to claim 2, wherein the performing cluster analysis on the normalized color source image to obtain color spectrum information of the color source image includes: clustering the main color, the auxiliary color and the background color by a cluster analyzer according to the hue distribution in the color wheel neighborhood of each color and the distance between the color wheel neighborhood and the target hue value; and fusing the color values of the various colors after clustering and the weight values corresponding to the colors to obtain the chromatographic information.
- 4. The color scheme generating method according to claim 1, wherein the identifying, by the pre-trained image semantic understanding model, the emotion tag contained in the color spectrum information to obtain the color scheme corresponding to the color source image includes: extracting high-level visual features and emotion semantic information from the chromatographic information through the pre-trained image semantic understanding model; Identifying emotion of the color source image based on the high-level visual features and the emotion semantic information, and marking a corresponding emotion label; And carrying out semantic mapping on the emotion labels based on a color psychology database to obtain a color scheme of the color source image.
- 5. The color scheme generating method according to claim 4, wherein after said obtaining the color scheme of the color source image, further comprising: And adjusting the color proportion and the color level of the color scheme based on the style type of the user side.
- 6. The color scheme generating method according to claim 1, wherein the performing standardized preprocessing on the color source image includes: receiving the color source images in different formats through an image uploading interface; and automatically adjusting the brightness, contrast and white balance of the color source image through a color normalizer.
- 7. The color scheme generation method according to claim 1, wherein after the color scheme corresponding to the color source image is obtained, further comprising: converting the color scheme into a universal mode through a format converter; Respectively generating a dark color mode color scheme and a high contrast mode color scheme corresponding to the color scheme; the color schemes of the general mode, the dark mode and the high contrast mode are derived.
- 8. A color scheme generating apparatus, comprising: the preprocessing module is used for carrying out standardized preprocessing on the color source image; The clustering module is used for carrying out pixel sampling and cluster analysis on the standardized color source image to obtain the color spectrum information of the color source image; And the color matching generation module is used for identifying emotion labels contained in the chromatographic information through a pre-trained image semantic understanding model so as to obtain color matching schemes corresponding to the color source images, wherein the color matching schemes support migration to different types of user terminals.
- 9. A computer device comprising a memory and at least one processor, the memory having instructions stored therein; the at least one processor invokes the instructions in the memory to cause the computer device to perform the color scheme generation method of any one of claims 1-7.
- 10. A computer readable storage medium having instructions stored thereon, which when executed by a processor, implement the color scheme generation method of any one of claims 1-7.
Description
Color scheme generation method, device, equipment and storage medium Technical Field The present application relates to the field of color matching of products, and in particular, to a method, an apparatus, a device, and a storage medium for generating a color matching scheme. Background In the prior art, the color taking algorithm mainly adopts clustering modes such as k-means/media cut/history peak and the like. These approaches are able to identify the dominant colors in the image, but the relationship between the colors cannot be understood so that several very close hues occur, lacking a hierarchy, the algorithm does not know which part of the image is the dominant object and which is the background. The prior art is difficult to distinguish colors from background or text due to lack of semantic mapping, so that the obtained palette cannot be directly applied, and meanwhile, the prior art lacks dynamic hierarchical design or conflicts with an original system based on brand base colors. Disclosure of Invention The application mainly provides a color scheme generation method, a device, equipment and a storage medium, which are used for solving the problem of poor image color extraction effect. In order to solve the technical problems, the technical scheme adopted by the application is that a color matching scheme generation method is provided, and the color matching scheme generation method comprises the steps of carrying out standardized pretreatment on color source images, carrying out pixel sampling and cluster analysis on the standardized color source images to obtain chromatographic information of the color source images, and identifying emotion labels contained in the chromatographic information through a pre-trained image semantic understanding model to obtain the color matching scheme corresponding to the color source images, wherein the color matching scheme supports migration to different types of user terminals. In some embodiments, the pixel sampling the normalized color source image includes pixel sampling the normalized color source image by a color sampler, and setting a weight value corresponding to each color based on the frequency of occurrence of each color after sampling. In some embodiments, the performing cluster analysis on the standardized color source image to obtain color spectrum information of the color source image includes performing clustering on primary colors, auxiliary colors and background colors through a cluster analyzer according to hue distribution in a color wheel neighborhood of each color and distances between the color distribution and a target chromaticity value, and fusing color values of each color after clustering and weight values corresponding to each color to obtain the color spectrum information. In some embodiments, the identifying the emotion tag contained in the color spectrum information through the pre-trained image semantic understanding model to obtain a color scheme comprises extracting high-level visual features and emotion semantic information from the color spectrum information through the pre-trained image semantic understanding model, identifying the emotion of the color source image based on the high-level visual features and the emotion semantic information, marking the corresponding emotion tag, and performing semantic mapping of the emotion tag based on a color psychology database to obtain the color scheme of the color source image. In some embodiments, after the color scheme of the color source image is obtained, the method further comprises adjusting the color proportion and the color level of the color scheme based on the style type of the user side. In some embodiments, the standardized preprocessing of the color source image comprises receiving the color source image in different formats through an image uploading interface, and automatically adjusting the brightness, contrast and white balance of the color source image through a color normalizer. In some embodiments, after the color matching scheme corresponding to the color source image is obtained, the method further comprises the steps of converting the color matching scheme into a general mode through a format converter, respectively generating a dark color mode color matching scheme and a high contrast mode color matching scheme corresponding to the color matching scheme, and deriving the color matching schemes of the general mode, the dark color mode and the high contrast mode. In order to solve the technical problems, the other technical scheme adopted by the application is to provide a color matching scheme generating device which comprises a preprocessing module, a clustering module and a color matching generation module, wherein the preprocessing module is used for carrying out standardized preprocessing on color source images, the clustering module is used for carrying out pixel sampling and cluster analysis on the standardized color source images to obtain color spectr