Implementation method, device and system based on image color extraction and migration and medium
By extracting and migrating the typical color characteristics of the target image, the problem of lack of systematicity and scientificity in the color implementation method of traditional printing product design is solved, and the consistency and visual attractiveness of the product color style are achieved.
Patent Information
- Application Number
- CN202411540314.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-03-18
AI Technical Summary
The traditional printing product design color implementation method is highly subjective, time-consuming, and lacks systematicity and scientificity, which makes it difficult to maintain consistent color styles of products and cannot meet customer needs.
By obtaining material images of the same topic for preprocessing, the typical color proportion of the target image is extracted, several color scheme images are generated, the color characteristics are transferred to the target image, and qualified color characteristic images are selected according to the color quality indicators.
The original color characteristics of the target image are retained, the consistency of the product's color style is ensured, and the customer's needs for color consistency are met.
Smart Images

Figure CN119648812A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of product color design, and in particular to an implementation method, device, system and medium based on image color extraction and migration. Background Art
[0002] Traditional color implementation methods for printed product design typically involve designers extracting and reconstructing colors based on their personal experience or understanding of the design content. This process is highly subjective and time-consuming, lacking systematic and scientific methods for quantitatively analyzing and applying these colors. Furthermore, differences in designers' aesthetics, design requirements, and product application scenarios can lead to inconsistent product color styles and fail to meet customer needs. Color transfer is a key research area in computer vision. It involves applying the color scheme of one image or design to another to maintain color consistency and visual appeal. The application of this technology in the printing industry can firstly enable intelligent coloring of products and secondly enhance their aesthetics and market competitiveness. Summary of the Invention
[0003] In view of the above-mentioned deficiencies in the prior art, the purpose of the present invention is to provide an implementation method based on image color extraction and migration. The present invention obtains the typical color distribution of the target image for color migration and then selects a color feature image that meets the standard, thereby retaining the original color characteristics of the target image and ensuring the consistency of the product color style.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] A first aspect of the present invention provides an implementation method based on image color extraction and migration, comprising the following steps:
[0006] Obtaining material images of the same theme, and preprocessing the material images to obtain a color scheme;
[0007] Extract the typical color ratio of the target image through the algorithm;
[0008] Generate a plurality of color scheme diagrams according to the color scheme and the typical color proportions;
[0009] Acquiring color features of the plurality of color scheme images, and migrating the plurality of color features to the target image to form a plurality of color feature images;
[0010] Select qualified color feature images based on color quality indicators.
[0011] In one embodiment, obtaining material images of the same theme and preprocessing the material images to obtain a color scheme includes:
[0012] Obtain several material images of the same theme, and extract several typical colors from each material image through an algorithm;
[0013] Determining the plurality of typical colors as cluster centers;
[0014] Calculating the color proportion of each material image according to the cluster center;
[0015] Determining the color type of each material image according to the color proportion;
[0016] Similar colors are eliminated according to the color type to form a color scheme.
[0017] In one embodiment, determining the color type of each material image according to the color proportion includes:
[0018] Calculating the color proportion of each material image according to the cluster center to obtain a color distribution result;
[0019] The color distribution results are sorted according to a preset sorting method to determine the quantity of each color type in each material image, where the color types include primary colors, secondary colors, and accent colors.
[0020] In one embodiment, eliminating similar colors according to the color type includes:
[0021] Determining whether the color difference between the color proportions in each color type is within a preset color difference threshold range;
[0022] If the color difference is within the preset color difference threshold range, the colors are similar and the similar colors are removed;
[0023] If the color difference is not within the preset color difference threshold range, it is not a similar color and the color is retained.
[0024] In one embodiment, extracting the typical color ratio of the target image through an algorithm includes:
[0025] Extracting typical colors of the target image by using the Kennard-Stone algorithm and determining the cluster center of the target image;
[0026] The typical color ratio of the target image is calculated based on the cluster centers.
[0027] In one embodiment, selecting a qualified color feature image according to a color quality index includes:
[0028] Calculating the chromaticity contrast value and the brightness contrast value of each color feature image and the target image;
[0029] Determining whether the color quality index is met according to the chromaticity contrast value and the brightness contrast value;
[0030] If the chromaticity contrast value and the brightness contrast value meet the color quality index, an image result is output.
[0031] In one embodiment, determining whether the color quality index is met according to the color contrast value and the brightness contrast value includes:
[0032] Calculating the sum of the chromaticity contrast value and the brightness contrast value of each color feature image to obtain a color quality index of the color feature image;
[0033] Calculating the sum of the chromaticity contrast value and the luminance contrast value of the target image to obtain a color quality index of the target image;
[0034] comparing a color quality index of the color feature image with a color quality index of a target image;
[0035] If the color quality index of the color feature image is greater than the color quality index of the target image, then the color feature image meets the color quality index.
[0036] A design device based on image color extraction and migration, the device comprising:
[0037] A color scheme module is used to obtain material images of the same theme and pre-process the material images to obtain a color scheme;
[0038] Color ratio module, used to extract the typical color ratio of the target image through algorithm;
[0039] A color scheme diagram module, used to generate a plurality of color scheme diagrams according to the color scheme and the typical color proportions;
[0040] A color feature module, configured to obtain color features of the plurality of color scheme images, and transfer the plurality of color features to the target image to form a plurality of color feature images;
[0041] The image screening module is used to select qualified color feature images according to color quality indicators.
[0042] A design system based on image color extraction and migration, the system comprising at least one processor; and
[0043] a memory communicatively connected to the at least one processor; wherein,
[0044] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the image-based color extraction and migration implementation method.
[0045] A non-volatile computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by one or more processors, the one or more processors can execute the implementation method based on image color extraction and migration.
[0046] Beneficial effects : The embodiments of the present invention disclose an implementation method, device, system and medium based on image color extraction and migration. Compared with the existing technology, the embodiments of the present invention obtain the typical color distribution of the target image to perform color migration and then select a color feature image that meets the standard, thereby retaining the original color characteristics of the target image and ensuring the consistency of the product color style. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0048] Figure 1 A flowchart of an implementation method based on image color extraction and migration provided by an embodiment of the present invention;
[0049] Figure 2 Another flow chart of an implementation method based on image color extraction and migration provided by an embodiment of the present invention;
[0050] Figure 3 A schematic diagram of the functional modules of a design device based on image color extraction and migration provided by an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of the hardware structure of a design system based on image color extraction and migration provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the technical problems, technical solutions and beneficial effects to be solved by the embodiments of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0053] Color transfer technology is an important branch of computer vision. It can automatically generate a new image with new colors by fusing the color information of the original image with that of a reference image while preserving the original image's colors. Color transfer technology can precisely control the color transfer process through algorithms and models, enabling more accurate, controllable, and intelligent color design. This application proposes designing product colors based on image primary color extraction and color transfer technology, which can preserve the color characteristics of the original theme and ensure a consistent color style for the product.
[0054] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of a method for image color extraction and migration provided by the present invention, which specifically includes the following steps:
[0055] S100, obtaining material images of the same theme, and preprocessing the material images to obtain a color scheme;
[0056] S200, extracting the typical color proportion of the target image through an algorithm;
[0057] S300, generating a plurality of color scheme diagrams according to the color scheme and the typical color proportions;
[0058] S400, obtaining color features of the plurality of color scheme images, and migrating the plurality of color features to the target image to form a plurality of color feature images;
[0059] S500: Selecting a qualified color feature image according to a color quality index.
[0060] In this embodiment, multiple material images of the same theme are collected, and each material image is required to be clear, properly exposed, and noise-free. The typical color of each material image is extracted through an algorithm, and the typical colors are processed to eliminate similar colors to form a color scheme. The target image is obtained, and the algorithm is used to calculate the typical color ratio of the target image. Several color scheme diagrams are generated according to the color scheme and the typical color ratio. Among them, the size of the color scheme diagram is consistent with the size of the target image. The height of the color scheme diagram is consistent with the target image, and multiple colors are displayed in the form of rectangles. Each rectangle maintains a uniform height but different widths. These rectangles are arranged in a preset order, for example, in order from large to small width, and arranged from left to right. Spliced together to form a complete color scheme diagram. The width of each rectangle is obtained by calculating the color ratio. The color features of the color scheme diagram are obtained through the algorithm, and the wasserstein distance (distance metric) is used to calculate the cost matrix. The wasserstein distance formula is:
[0061]
[0062] Among them, r and c are two distributions, P and M are the probabilities of the two distributions. In essence, the Wasserstein distance is to find the minimum cost of moving P to M.
[0063] Furthermore, the optimal transmission problem can be formalized as a linear programming problem or a convex optimization problem. The basic form of the optimal transmission theory is as follows:
[0064] minimize∫∫cx,y,dπ(x,y)
[0065] Here, c(x,y) is the cost function, x and y come from two probability distributions, and π is a feasible transfer scheme. Color transfer based on optimal transfer theory is to find an optimal solution that maps from one color distribution to another while minimizing a certain cost. In image processing, this means transferring the color style of one image to another while preserving the content (such as shape and texture) of the latter.
[0066] The optimal transfer theory is used to transfer the color features to the target image, forming several color feature images. Finally, the color feature images are screened according to the color quality index to generate an image that is consistent with the product color style.
[0067] In one embodiment, the step S100 includes:
[0068] Obtain several material images of the same theme, and extract several typical colors from each material image through an algorithm;
[0069] Determining the plurality of typical colors as cluster centers;
[0070] Calculating the color proportion of each material image according to the cluster center;
[0071] Determining the color type of each material image according to the color proportion;
[0072] Similar colors are eliminated according to the color type to form a color scheme.
[0073] In this embodiment, several source images of the same theme are obtained and the Kennard-Stone algorithm is used to extract k representative colors from each source image. First, the color of each pixel in the source image is converted from the RGB (red, green, and blue) color space to a digital computation space, such as the LAB (luminance, red-green, yellow-blue) color space, to reduce the nonlinear effects of color. The color features of each pixel in the source image are extracted using the L, A, and B channels of the LAB color space. K pixels are randomly selected as the initial sample set, and the Kennard-Stone algorithm is used for iterative optimization. The colors of the resulting K sample points are the representative colors in the source image. The number k is user-defined, but it is recommended to be no less than 15 to ensure that colors that are not significant but serve as embellishments in the image can be extracted. The conventional Kmeans algorithm is not used in this application to extract representative colors because the colors extracted by this algorithm do not necessarily correspond to the actual colors in the image, which can affect color accuracy. The identified representative colors are used as cluster centers, with each representative color corresponding to a cluster center. The color contribution of each source image is then calculated based on the cluster centers. The number of each color type in each source image is determined by color proportion. For each color type, similar colors are removed through screening. After removing similar colors, a color combination is randomly extracted from each color type to generate a color scheme. Whether colors are similar is determined by the size of the color difference. When the color difference between two colors (L1A1B1, L2A2B2) is less than a threshold, they are considered similar and are removed. The color difference ΔE is calculated as follows:
[0074]
[0075] In one embodiment, determining the color type of each material image according to the color proportion includes:
[0076] Calculating the color proportion of each material image according to the cluster center to obtain a color distribution result;
[0077] The color distribution results are sorted according to a preset sorting method to determine the quantity of each color type in each material image, where the color types include primary colors, secondary colors, and accent colors.
[0078] In this embodiment, the Kmeans algorithm is used to calculate the color proportion of each cluster center for each image to obtain a color distribution result. The color proportion is calculated by calculating the ratio of the number of pixels in each cluster to the total number of pixels in the image after clustering. It represents the proportion of each typical color in the image and has a direct impact on the image's color distribution and color style. The color proportion of each source image is calculated based on the cluster center to obtain a color distribution result. The color distribution results are sorted according to a preset sorting method. For example, the sorting is performed from high to low to determine the primary color (the first two colors in the sorting result), secondary colors (the third to sixth colors in the sorting result), and accent colors (the remaining colors) for each image, and each is saved as three data files. The primary, secondary, and accent colors of a single image together constitute the image's color hierarchy and visual effect. Generally speaking, the primary color occupies the largest area in the image and determines the overall style of the work. The secondary colors occupy a secondary position in the image, serving to complement the primary color and enhance the richness and harmony of the image. The accent colors are smaller in area but more visually striking, primarily used to highlight and guide the viewer's attention. This image color classification method helps designers plan and organize colors systematically to ensure the overall harmony and unity of the design style.
[0079] In one embodiment, the filtering and eliminating similar colors from the color type includes:
[0080] Determining whether the color difference between the color proportions in each color type is within a preset color difference threshold range;
[0081] If the color difference is within the preset color difference threshold range, the colors are similar and the similar colors are removed;
[0082] If the color difference is not within the preset color difference threshold range, it is not a similar color and the color is retained.
[0083] In this embodiment, a preset color difference threshold is determined, and the color difference threshold is used to determine whether the colors are similar. It is determined whether the color difference between the color proportions in each color type is within the preset color difference threshold range. If the color difference is within the preset color difference threshold range, the colors are similar and the similar colors are eliminated. If the color difference is not within the preset color difference threshold range, the colors are not similar and the colors are retained. The indicator of whether the colors are similar is the color difference. Colors with a color difference less than the color difference threshold are considered similar colors. The color difference threshold range can be adjusted according to the number of colors. If the number of colors is large, the threshold is lowered. After calculation, three filtered main color, auxiliary color and embellishment color data files are obtained to ensure that the color style of the generated color migration image is consistent with the original theme.
[0084] In one embodiment, step S200 includes:
[0085] Extracting typical colors of the target image by using the Kennard-Stone algorithm and determining the cluster center of the target image;
[0086] The typical color ratio of the target image is calculated based on the cluster centers.
[0087] In this embodiment, the target image is converted from the RGB color space to a LAB color space, and the colors in the target image are quantized into a finite number of sample points. Each sample point represents a color in the image. Two initial sample points are randomly selected as cluster centers. The distances from all sample points to the current cluster center are calculated. The Kennard-Stone algorithm is used to select a new cluster center, and the sample point farthest from the current cluster center is selected as the new cluster center. The newly selected sample point is merged with the current cluster center to form a new cluster center. The cluster center finally obtained is the typical color of the image. The Kmeans algorithm is used to calculate the proportion of typical colors of the target image based on the cluster centers. The number of cluster centers is S, and S can be determined according to the color richness of the target image. For colorful images, the S value can be set slightly larger. The number of randomly selected colors in the generated color scheme diagram is selected according to the number of cluster centers of the target image.
[0088] In one embodiment, step S500 includes:
[0089] Calculating the chromaticity contrast value and the brightness contrast value of each color feature image and the target image;
[0090] Determining whether the color quality index is met according to the chromaticity contrast value and the brightness contrast value;
[0091] If the chromaticity contrast value and the brightness contrast value meet the color quality index, an image result is output.
[0092] In this embodiment, the chromaticity contrast and brightness contrast values of the color feature image and the target image are calculated respectively. The chromaticity contrast value is calculated by calculating the color difference of the pixels of each image, and then the average value is calculated to represent the chromaticity contrast value of the entire image. The brightness contrast can be quantified by calculating the difference in brightness between the two images. The brightness contrast value is quantified by calculating the difference in brightness between the images, and the average value is calculated to represent the brightness contrast value of the entire image. For each color feature image and the target image, the color and brightness differences of all pixels are calculated, and the chromaticity contrast value and brightness contrast value between each color feature image and the target image are output. The color quality index is determined based on the chromaticity contrast value and brightness contrast value. If the sum of the chromaticity contrast value and the brightness contrast value is greater than that of the target image, the color quality index is met and the output result is qualified. Images that do not meet the conditions are eliminated.
[0093] In one embodiment, determining whether the color quality index is met according to the color contrast value and the brightness contrast value includes:
[0094] Calculating the sum of the chromaticity contrast value and the brightness contrast value of each color feature image to obtain a color quality index of the color feature image;
[0095] Calculating the sum of the chromaticity contrast value and the luminance contrast value of the target image to obtain a color quality index of the target image;
[0096] comparing a color quality index of the color feature image with a color quality index of a target image;
[0097] If the color quality index of the color feature image is greater than the color quality index of the target image, then the color feature image meets the color quality index.
[0098] In this embodiment, the sum of the chromaticity contrast value c_k and the brightness contrast value v_k of each color feature image is calculated to obtain the color quality index T1 of the color feature image. The sum of the chromaticity contrast value c_k and the brightness contrast value v_k of the target image is calculated to obtain the color quality index T2 of the target image. The color quality index T is calculated by the formula:
[0099] T=c_k+v_k
[0100] Where c_k is the chromaticity contrast value, and v_k is the luminance contrast value. The T1 value of the color feature image is compared with the T2 value of the target image. Images whose color quality index of the color feature image is greater than that of the target image are considered qualified output results, and images that do not meet the requirements are eliminated.
[0101] Specifically, c_k and v_k are common image color quality evaluation indicators. The brightness contrast value v_k is the variance value of the image brightness channel V. The chromaticity contrast c_k is calculated as follows: Where hs represents the hue channel variance, and ss represents the saturation channel variance. Before calculation, the RGB image must be converted to the HSV color space. Hue represents the hue, the dominant wavelength of the color, usually expressed as an angle, ranging from 0° to 360°; Saturation represents the saturation, the purity of the color, with achromatic colors having a saturation of 0, ranging from 0% to 100%; and Value represents the brightness, the lightness or darkness of the color, which is proportional to the brightness of the color, ranging from 0% to 100%. The variance calculation formula is:
[0102]
[0103] Where X represents the hue, lightness or saturation value, X i represents the i-th sample value, represents the mean of all sample values; n is the number of samples.
[0104] See also Figure 2 , Figure 2 This is a flow chart of another embodiment of the method for image color extraction and migration provided by the present invention, which specifically includes the following steps:
[0105] S1 collects images of the same subject;
[0106] S2 extracts typical colors;
[0107] S3 extracts the ratio of typical color quantities;
[0108] S4 (1) obtains the main color data set and eliminates similar data;
[0109] (2) Obtain auxiliary color data sets and eliminate similar data;
[0110] (3) Obtain the dot color dataset and eliminate similar data;
[0111] S5 acquires the target image;
[0112] S6 calculates typical color ratios;
[0113] S7 generates color patterns;
[0114] S8 color style migration;
[0115] S9 calculates image color quality indicators;
[0116] S10 determines whether it is qualified.
[0117] The present invention collects several images of the same theme, processes the images, extracts the typical colors of the images through an algorithm, obtains the quantity ratio of the typical colors through the algorithm, distinguishes the main color, auxiliary color and embellishment color based on the color quantity comparison, and proposes similar colors among the colors based on the screening. The screened colors are saved as three data files and a color scheme is formed. The target image is obtained, the typical color ratio of the target image is calculated using an algorithm, and multiple color scheme diagrams are generated based on the typical color ratio and the color scheme. The color features of the color scheme diagram are transferred to the target image using the optimal transfer theory to form multiple color feature images. Then, the color feature images that are consistent with the color style of the target image are screened out by judging whether they meet the image color quality index, thereby retaining the color features of the original target image and ensuring the consistency of the product color style.
[0118] A design device based on image color extraction and migration, the device comprising:
[0119] A color scheme module 11 is used to obtain material images of the same theme and pre-process the material images to obtain a color scheme;
[0120] A color ratio module 12 is used to extract the typical color ratio of the target image through an algorithm;
[0121] A color scheme diagram module 13 is configured to generate a plurality of color scheme diagrams according to the color scheme and the typical color proportions;
[0122] A color feature module 14 is configured to obtain color features of the plurality of color scheme images, and transfer the plurality of color features to the target image to form a plurality of color feature images;
[0123] The image screening module 15 is used to select qualified color feature images according to color quality indicators.
[0124] like Figure 3 As shown, the color scheme module 11, the color ratio module 12, the color scheme diagram module 13, the color feature module 14 and the image screening module 15 are connected in sequence. The module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions. It is more suitable for the execution process of the design based on image color extraction and migration than the program. For the specific implementation of each module, please refer to the corresponding method embodiment above, which will not be repeated here.
[0125] Another embodiment of the present invention provides a design system based on image color extraction and migration, the system comprising at least one processor; and
[0126] a memory communicatively connected to the at least one processor; wherein,
[0127] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the image-based color extraction and migration implementation method.
[0128] One or more processors 110 and memory 120, Figure 4 In the description, a processor 110 is used as an example. The processor 110 and the memory 120 may be connected via a bus or other means. Figure 4 The bus connection is taken as an example.
[0129] The processor 110 is used to implement various control logics of the control system 10. It can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a single-chip microcomputer, an ARM (Acorn RICS Machine) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. In addition, the processor 110 can also be any traditional processor, microprocessor, or state machine. The processor 110 can also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP, and / or any other such configuration.
[0130] Memory 120, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as program instructions corresponding to the method for implementing image color extraction and migration in the embodiments of the present invention. Processor 110 executes the non-volatile software programs, instructions, and modules stored in memory 120 to execute various functional applications and data processing of control system 10, thereby implementing the method for implementing image color extraction and migration in the aforementioned method embodiments.
[0131] The memory 120 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the control system 10. Furthermore, the memory 120 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some embodiments, the memory 120 may optionally include a memory remotely located relative to the processor 110. Such remote memory may be connected to the control system 10 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0132] One or more units are stored in the memory 120, and when executed by one or more processors 110, perform the implementation method based on image color extraction and migration in any of the above method embodiments, for example, perform the above described Figure 1 Method steps S100 to S500.
[0133] An embodiment of the present invention provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are executed by one or more processors, for example, to execute the above-described Figure 1 Method steps S100 to S500.
[0134] As an example, non-volatile storage media can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) as external cache memory. By way of illustration and not limitation, RAM can be obtained in many forms such as synchronous RAM (SRAM), dynamic RAM, (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The disclosed memory components or memories of the operating environment described herein are intended to include one or more of these and / or any other suitable types of memory.
[0135] In summary, the present invention discloses an implementation method, device, system, and medium based on image color extraction and migration, including: obtaining material images of the same theme, preprocessing the material images to obtain a color scheme; extracting the typical color proportions of the target image through an algorithm; generating several color scheme diagrams based on the color scheme and the typical color proportions; obtaining the color features of the several color scheme diagrams, migrating the several color features to the target image to form several color feature images; and selecting qualified color feature images based on color quality indicators. The present invention retains the original color features of the target image by obtaining the typical color distribution of the target image, performing color migration, and then selecting a color feature image that meets the standard. This ensures the consistency of the product color style.
[0136] Of course, those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware (such as a processor, controller, etc.) through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes in the above-described method embodiments. The storage medium can be a memory, a magnetic disk, a floppy disk, a flash memory, an optical storage device, etc.
[0137] It should be understood that the application of the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method based on image color extraction and migration, characterized in that: The steps include: Obtaining material images of the same theme, and preprocessing the material images to obtain a color scheme; Extract the typical color proportion of the target image through the algorithm; Generate a plurality of color scheme diagrams according to the color scheme and the typical color proportions; Acquire color features of the plurality of color scheme images, and transfer the plurality of color features to the target image to form a plurality of color feature images; Select qualified color feature images according to color quality indicators.
2. The method for image color extraction and migration according to claim 1, characterized in that: The step of obtaining material images of the same theme and preprocessing the material images to obtain a color scheme includes: Obtain several material images of the same theme, and extract several typical colors from each material image through an algorithm; Determining the several typical colors as cluster centers; Calculating the color proportion of each material image according to the cluster center; Determine the color type of each material image according to the color proportion; Similar colors are eliminated according to the color type to form a color scheme.
3. The method for image color extraction and migration according to claim 2 is characterized in that: Determining the color type of each material image by the color proportion includes: Calculating the color proportion of each material image according to the cluster center to obtain a color distribution result; The color distribution results are sorted according to a preset sorting method to determine the quantity of each color type in each material image, where the color types include primary colors, secondary colors, and decorative colors.
4. The method for image color extraction and migration according to claim 2 is characterized in that: The removing similar colors according to the color type comprises: Determine whether the color difference between the color proportions in each color type is within a preset color difference threshold range; If the color difference is within the preset color difference threshold range, the colors are similar and similar colors are eliminated; If the color difference is not within the preset color difference threshold range, it is not a similar color and the color is retained.
5. The method for image color extraction and migration according to claim 1 is characterized in that: The typical color proportion of the target image is extracted by an algorithm, including: Extracting typical colors of the target image by using the Kennard-Stone algorithm and determining the cluster center of the target image; The typical color ratio of the target image is calculated according to the cluster center.
6. The method for image color extraction and migration according to claim 1 is characterized in that: The step of selecting a qualified color feature image according to the color quality index includes: Calculating the chromaticity contrast value and the brightness contrast value between each color feature image and the target image; Determining whether the color quality index is met according to the chromaticity contrast value and the brightness contrast value; If the chromaticity contrast value and the brightness contrast value meet the color quality index, an image result is output.
7. The method for image color extraction and migration according to claim 6 is characterized in that: The determining whether the color quality index is met according to the color contrast value and the brightness contrast value includes: Calculating the sum of the chromaticity contrast value and the brightness contrast value of each color feature image to obtain a color quality index of the color feature image; Calculating the sum of the chromaticity contrast value and the brightness contrast value of the target image to obtain a color quality index of the target image; Comparing the color quality index of the color feature image with the color quality index of the target image; If the color quality index of the color feature image is greater than the color quality index of the target image, then the color feature image meets the color quality index.
8. A design device based on image color extraction and migration, characterized in that: The device comprises: A color scheme module is used to obtain material images of the same theme and pre-process the material images to obtain a color scheme; Color ratio module, used to extract the typical color ratio of the target image through algorithm; A color scheme diagram module, used to generate a plurality of color scheme diagrams according to the color scheme and the typical color proportions; A color feature module, used for acquiring color features of the plurality of color scheme images, transferring the plurality of color features to the target image, and forming a plurality of color feature images; The image screening module is used to select qualified color feature images according to color quality indicators.
9. A design system based on image color extraction and migration, characterized in that: The system includes at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the implementation method based on image color extraction and migration as described in any one of claims 1-7.
10. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions, which, when executed by one or more processors, enable the one or more processors to execute the implementation method based on image color extraction and migration as described in any one of claims 1-7.
Citation Information
Cited By
Display color clone calibration method and device, electronic terminal and storage medium
CN119943002A