CN111429539A - Color matching constraint method based on color matching engine, storage medium and terminal - Google Patents
Color matching constraint method based on color matching engine, storage medium and terminal Download PDFInfo
- Publication number
- CN111429539A CN111429539A CN202010210696.6A CN202010210696A CN111429539A CN 111429539 A CN111429539 A CN 111429539A CN 202010210696 A CN202010210696 A CN 202010210696A CN 111429539 A CN111429539 A CN 111429539A
- Authority
- CN
- China
- Prior art keywords
- color
- constraint
- color matching
- nodes
- colors
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T11/00—2D [Two Dimensional] image generation
- G06T11/001—Texturing; Colouring; Generation of texture or colour
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
The invention relates to a color matching constraint method based on a color matching engine, a storage medium and a terminal, wherein the color matching constraint method comprises the following steps: s1, constructing element nodes, and constructing constraint nodes in the directed graph after merging the element nodes; s2 traversing all the constraint items which cannot be solved at present, and judging whether the nodes to be matched with colors exist or not; s3, if there is no node to be matched, it is judged whether the global constraint is satisfied, and the color scheme is output according to the judgment result. The invention has the advantages that: and expressing the design constraints by using a set of rule engines, constructing an algorithm graph in a directed acyclic graph mode, sequentially traversing all nodes, trying available colors meeting the constraints for the nodes, and finally outputting a plurality of sets of color schemes meeting the constraint conditions. The method is implemented by using a structure of a directed acyclic graph, and comprises the following steps: the node relation and the constraint structure can be clearly visualized so as to check the node relation and the constraint structure, and in addition, the node relation and the constraint structure can be conveniently traversed.
Description
Technical Field
The invention relates to the field of automatic color matching, in particular to a color matching constraint method based on a color matching engine, a storage medium and a terminal.
Background
The publicity is a necessary marketing means for all merchants, for example, the merchants can publicize to promote the sale of commodities when putting products on shelves, opening business, discounting sales promotion and the like; in the process of merchant propaganda, off-line propaganda posters and propaganda lists, on-line propaganda drawings, product special price drawings and the like are mostly adopted for propaganda; regardless of the propaganda mode, the product pictures and some word descriptions need to be matched, the propaganda means (such as propaganda posters, propaganda lists, propaganda diagrams and product special price diagrams) need to perform the drawing and color matching process of the pictures and words in the manufacturing process, but at present, the drawing and color matching process is manually designed by designers according to own experience, and the designers determine which element uses what color, however, at present, the manual design is low in efficiency and long in time consumption, and batch and automatic drawing and color matching cannot be realized.
Therefore, a software algorithm (color matching engine) is needed to realize the automatic design of the drawing color matching, but there are many color schemes which may meet the algorithm requirements in the process of realizing the drawing color matching through the software algorithm, but all the color schemes are not in accordance with the aesthetic screening of the color matching result, so that some results which meet the design requirements but are not in accordance with the general aesthetic result need to be eliminated, and the drawing color matching process is needed to realize the output of the optimized color scheme through some color matching constraints, and how to realize the color matching constraints is a problem which needs to be solved at present stage.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a color matching constraint method based on a color matching engine, a storage medium and a terminal, wherein an optimized color matching scheme can be obtained through color matching constraint.
The purpose of the invention is realized by the following technical scheme: a color matching constraint method based on a color matching engine, the color matching constraint method comprising:
s1, constructing element nodes, and constructing constraint nodes in the directed graph after merging the element nodes;
s2, traversing all constraint items which cannot be solved at present, and judging whether a node to be matched with colors exists or not;
and S3, if the node to be color-matched does not exist, judging whether the global constraint is met, and outputting the color scheme according to the judgment result.
The color matching constraint method further includes the step of determining a color palette to be used before starting step S2, and includes:
if the node to be matched with the color exists, setting the color of the current node as the current color, solving all the constraint conditions capable of being solved, and judging whether all the constraint conditions can be successfully passed;
if all the constraint conditions cannot be successfully passed, taking out the next color from the color plate as the current color, and judging whether the current color plate has available colors;
if all constraints are successfully passed, the step S2 is repeated.
The judging whether the available color exists in the current color plate comprises the following steps:
if the current color plate has available colors, repeating the steps of setting the colors for the current nodes as the current colors, solving all the constraint conditions capable of being solved and judging whether all the constraint conditions can be successfully passed;
and if the current color plate has no available color, clearing the color matching states of all the nodes, repeating the step S2, taking out the next color plate as the color plate used for current color matching, and judging whether the residual color plates exist.
The judging whether the residual color plates exist or not comprises the following steps:
if the residual color plates exist, returning to the step of taking out the next color from the color plates as the current color;
and if no color plates remain, outputting the color scheme at the moment.
The constructing corresponding element nodes for all the elements and the constraint nodes in the directed graph after the element nodes are combined comprises the following steps:
s11, constructing corresponding element nodes for all the elements;
s12, grouping and combining nodes in the same group according to the existing labels, wherein the combined node represents that the same color is needed;
and S13, constructing constraint nodes in the algorithm directed acyclic graph.
The constraint nodes in the construction algorithm directed graph comprise:
analyzing the element intersection relationship, and establishing different color constraints for the intersected elements;
establishing a priority intra-group constraint and a priority inter-group constraint for each priority group;
the black and white constraint is used for the text.
If the node to be matched with the color does not exist, judging whether the global constraint is met, and outputting the color scheme according to the judgment result comprises the following steps:
if the global constraint is met, completing one-time color matching, collecting color information of all element nodes, outputting a set of color matching schemes, and judging whether more color matching schemes are needed; if not, outputting the color scheme, and if so, returning to the step of taking the next color from the color plate as the current color;
and if the global constraint is not satisfied, returning to the step of taking the next color from the color plate as the current color.
The constraint conditions comprise fixed constraint conditions and controllable constraint conditions;
the fixed constraint conditions comprise that the colors of adjacent elements cannot be the same, the stroke color of the character is consistent with the color of the character, and the colors distributed to the overlapped elements cannot be the same;
the controllable constraint conditions comprise the control of the number of colors allowed to appear in a color result, the control of the hue relation of all colors in color matching, the control of the contrast relation of all colors in color matching, the control of whether input colors are required to be used or not, the setting of color consistency of character elements, the setting of a sequencing mode for judging the color priority of the character elements and the setting of whether only black and white characters are allowed to be used or not.
A storage medium having stored thereon a computer program for performing the steps of a color matching engine based color matching constraint method when the computer program is run.
A terminal comprising a memory, a processor, and a control program based on color matching constraints of a color matching engine stored on the memory and operable on the processor, the control program based on color matching constraints of a color matching engine being operable to perform the steps of one method of color matching constraints based on a color matching engine.
The invention has the following advantages: a color matching constraint method based on a color matching engine, a storage medium and a terminal use a set of rule engines to express design constraints, construct an algorithm graph in a directed acyclic graph mode, sequentially traverse all nodes, try available colors meeting the constraints for the nodes, and finally output a plurality of sets of color matching schemes meeting constraint conditions. The advantage of using a rules engine is that it is decoupled from the specific implementation of the design constraints to ensure high scalability, and if additional design constraints are added, it can be easily modified or expressed by the rules engine. The method is implemented by using a structure of a directed acyclic graph, and comprises the following steps: the node relation and the constraint structure can be clearly visualized so as to be convenient to check, and in addition, the node relation and the constraint structure can be conveniently traversed;
by setting 3 fixed constraints and 7 controllable constraints to cover most design goals, it is not necessary for the user to know many underlying algorithm details, and the design concerns can be extracted from the perspective of the designer, i.e. simple and flexible.
Drawings
FIG. 1 is a schematic flow diagram of the present invention;
FIG. 2 is a traversal diagram of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that the terms "upper", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings or orientations or positional relationships that the products of the present invention conventionally use, which are merely for convenience of description and simplification of description, but do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention.
The invention will be further described with reference to the accompanying drawings, but the scope of the invention is not limited to the following.
As shown in fig. 1 and 2, a color matching constraint method based on a color matching engine includes:
s1, constructing element nodes, and constructing constraint nodes in the directed graph after merging the element nodes;
s2, traversing all constraint items which cannot be solved at present, and judging whether a node to be matched with colors exists or not;
and S3, if the node to be color-matched does not exist, judging whether the global constraint is met, and outputting the color scheme according to the judgment result.
Further, before color matching constraint, a color palette list, a complete template (including background/picture/text background) and configuration constraint items need to be input, the template is converted to obtain priorities for labeling elements and groups for labeling the colors of the elements using the same color, and corresponding element nodes are constructed for all the elements by labeling the groups for labeling the colors of the elements using the same color.
The color matching constraint method further includes the step of determining a color palette to be used before starting step S2, and includes:
if the node to be matched with the color exists, setting the color of the current node as the current color, solving all the constraint conditions capable of being solved, and judging whether all the constraint conditions can be successfully passed;
if all the constraint conditions cannot be successfully passed, taking out the next color from the color plate as the current color, and judging whether the current color plate has available colors;
if all constraints are successfully passed, the step S2 is repeated.
The judging whether the available color exists in the current color plate comprises the following steps:
if the current color plate has available colors, repeating the steps of setting the colors for the current nodes as the current colors, solving all the constraint conditions capable of being solved and judging whether all the constraint conditions can be successfully passed;
and if the current color plate has no available color, clearing the color matching states of all the nodes, repeating the step S2, taking out the next color plate as the color plate used for current color matching, and judging whether the residual color plates exist.
Furthermore, in order to efficiently find out a solution meeting the constraint, the dimension reduction is carried out through element nodes, and the constraint model is simplified by combining the same-color element nodes; as a constraint of eq (a, B), a simplification rule of eq methods is provided; thus, the model can automatically reduce the dimension according to the simplification rule, two nodes AB are combined into one node D, and the problem is changed from color matching of three elements ABC into color matching of two nodes CD.
The judging whether the residual color plates exist or not comprises the following steps:
if the residual color plates exist, returning to the step of taking out the next color from the color plates as the current color;
and if no color plates remain, outputting the color scheme at the moment.
The constructing corresponding element nodes for all the elements and the constraint nodes in the directed graph after the element nodes are combined comprises the following steps:
s11, constructing corresponding element nodes for all the elements;
if all background/picture/text background elements are converted into element nodes, wherein the background is BG 1- > N _ BG1, the picture is IMAGE 1- > N _ IMAGE1, the text is T1.text- > N _ T1_ text, T2- > N _ T2_ text, T3.text- > N _ T3_ text, and the text background is T3.bg- > N _ T3_ BG;
s12, grouping and combining nodes in the same group according to the existing labels, wherein the combined node represents that the same color is needed;
newly building a node corresponding to the group-text-priority-1 group: n _ GroupTextPriority1, containing N _ T1_ text; newly building a node corresponding to the group-text-priority-2 group: n _ GroupTextPriority2, containing N _ T2_ text and N _ T3_ text;
and S13, constructing constraint nodes in the algorithm directed acyclic graph.
Furthermore, the directed acyclic graph is a directional graph, such as a tree structure graph; directed acyclic graphs are used because we attempt to express this relationship using an undirected multigraph model (without self-loops, there is at most one connection between nodes): each element needing coloring is a Node, the color matching constraint among the elements is recorded as the relationship Edge (non-direction) among the elements, and the constraint is recorded on the Edge; however, the undirected multi-graph model can only express the constraint between at most two elements, and all the constraints need to be converted into single-element constraints or constraints between two elements before entering the algorithm; but if a more general model is needed to support the constraint among multiple elements, the constraint is needed to be stripped from the Edge and is recorded separately by using a constraint list, so that after modification, the Node and the Edge are not attached with the constraint, and the constraint is only used for representing the relevance; each constraint needs to wait until all the nodes on which it depends are matched with colors, and then whether the constraint is met can be checked, and if the directional relation is represented by a directed graph, the above problem cannot exist.
Wherein step S13 specifically includes:
s131, analyzing the intersection relationship of the elements, and establishing different color constraints for the intersected elements;
intersecting elements of BG1 include [ IMAGE1, T1.text, T2.text, T3.BG ] which establishes an unequal constraint for nodes corresponding to N _ BG1 and elements in the list;
the intersecting element of the IMAGE has [ BG ] to establish an unequal constraint for the nodes corresponding to the N _ IMAGE1 and the elements in the list, and the N _ BG1 is skipped because the intersecting relation of the N _ BG1 is completely processed;
t1. the intersecting element of text has [ BG ] as N _ GroupTextPriority1 and an unequal constraint is established between the node corresponding to the element in the list, and because the intersecting relation of N _ BG1 is completely processed, N _ BG1 is skipped;
text, since it is contained in N _ grouptextproperty 1, has been processed, skipping this element;
the intersecting element of the T3.BG has [ BG, T3.text ] which establishes an unequal constraint for the node corresponding to the N _ T3_ BG and the element in the list, and the N _ BG1 is skipped because the intersecting relation of the N _ BG1 is completely processed;
t3. the intersecting element of the text has [ T3.bg ] and establishes an unequal constraint for the node corresponding to the N _ T3_ text and the element in the list, and the N _ T3_ text is skipped because the intersecting relation of the N _ T3_ text is completely processed;
s132, establishing a priority intra-group constraint and a priority inter-group constraint for each priority group;
wherein the constraints within the priority groups (requiring the use of weakly consistent color schemes within each priority group) include: for the first group, no background element exists, nodes corresponding to all the character elements are associated with the weak consistent constraint, and the meaning is that all the character colors are consistent; for the second group, there are elements with background and also elements without background, and the weak consistent association with background (the weak consistent association of the text elements with background has a special case that the font is white) and the weak consistent association without background should be associated; wherein, the weakly consistent representation uses a color set belonging to the relationship of inclusion and inclusion, such as comparing T1 and T2, wherein T1 uses more colors, then colorSet (T1) contains colorSet (T2), one element carries background and stroke, then it can use at most 3 colors, and the set of three colors is the color set of the element.
The priority inter-group constraints include: knowing that the first group and the other groups adopt inconsistent color matching schemes according to rules corresponding to constraint conditions of character color consistency, wherein the available number of colors is + 1; in the invention, only two priority groups are provided, namely the first group and the second group adopt inconsistent color matching schemes to calculate the color sets used by all nodes in the first group and the second group, and at least one color in fewer sets is not in more sets;
and S133, using black and white constraint on the characters, wherein the available color which does not need the constraint is black and white.
As shown in fig. 2, wherein an ellipse represents a node requiring color matching and a rectangle represents a constraint rule (constraint condition); determining the color palette to be used before starting the traversal (generally, the first set of input color palettes is used as the color palette to be used); then, the process starts to traverse fig. 2, and color is matched for each node.
Finding out constraint conditions of least node dependence, namely resolve, and firstly sequencing all the constraints according to the number of parameter nodes;
the constraint condition 9 is left by the nodes 3, one node is dependent, the node 4 is a picture node, has the existing color and does not need color matching, so the constraint condition 9 can be solved as long as the node 3 finishes color matching;
the constraint condition 9 arranged at the first can be solved by matching 1 node with the color, and the dependency is the node 3; try to take the colors from the color palette in order for node 3; evaluating all the constraints from being incapable of resolve to being capable of resolve until a certain color has no other constraint condition capable of resolve, and indicating that the color is true;
then, under the condition that the node 3 finishes color matching, the constraint condition of the resolve which is the least node dependence is searched according to the sequence until the color matching of all the node dependence in all the node conditions is finished.
If the node to be matched with the color does not exist, judging whether the global constraint is met, and outputting the color scheme according to the judgment result comprises the following steps:
if the global constraint is met, completing one-time color matching, collecting color information of all element nodes, outputting a set of color matching schemes, and judging whether more color matching schemes are needed; if not, outputting the color scheme, and if so, returning to the step of taking the next color from the color plate as the current color;
and if the global constraint is not satisfied, returning to the step of taking the next color from the color plate as the current color.
Further, global constraint verification is performed on the color scheme completing color matching of all the nodes, wherein the global constraint verification comprises the following steps: judging whether the color scheme is used to a certain color, and if the color scheme is used to a certain color, passing the verification; and checking the number of used character colors, judging whether the constraint condition of character color consistency is exceeded or not (the minimum number of used character elements is 2), and if not, passing the check.
The constraint conditions comprise fixed constraint conditions and controllable constraint conditions;
the fixed constraint conditions comprise that the colors of adjacent elements cannot be the same, the stroke color of the character is consistent with the color of the character, and the colors distributed to the overlapped elements cannot be the same;
further, the adjacent representation means that two elements are continuously arranged in the picture; drawing on the canvas according to the layer sequence from bottom to top by one element, once the boundaries have intersection, deducting the intersection part of the lower layer, recording as the area of the upper layer, and once completely deducted, removing the node from the element list; when the pure color and the pure color are adjacent, no collision constraint needs to be established; when the picture is adjacent to the solid color, no collision constraint needs to be established.
The layers of the overlapping representation elements must be adjacent and spatially overlapping; drawing on the canvas according to the layer sequence from bottom to top, once the boundaries have intersection, deducting the intersection part of the lower layer, recording as that the upper layer has the block area, and once completely deducted, removing the node from the element list.
The controllable constraint conditions comprise the control of the number of colors allowed to appear in a color result, the control of the hue relation of all colors in color matching, the control of the contrast relation of all colors in color matching, the control of whether input colors are required to be used or not, the setting of color consistency of character elements, the setting of a sequencing mode for judging the color priority of the character elements and the setting of whether only black and white characters are allowed to be used or not.
Further, the number of colors is generally up to 4, 5, 6, 10 out of candidate colors;
the color correlation system is different between a matching mode and a diffraction mode; the matching mode is that proper colors are matched from a set color list according to rules, and the colors are used for forming a color plate for subsequent color matching; the derivation mode is to derive a color according to a certain rule to obtain a group of color sets, and to take proper colors according to the rule to form a color plate for subsequent color matching.
In the matching mode, the Color palette is scored according to the rule of scoreColor (scoring a Color in the matching mode, wherein one Color is preferentially taken from the corresponding hue interval, and then the Color palette is allowed to return to the value interval of the same hue), and n colors with the highest scores are taken out, wherein n is controlled by Color Ampount;
in the derivation mode for controlling the H-domain deflection angle in the HSB model, hue (hue ) allows deflection [0, 3, 6] in the same color, hue allows deflection [30, 36, 42] in the similar color, hue allows deflection [114, 120,126] in the different color, hue allows deflection [168, 174, 180 ];
the color contrast relation is normalized to 0-1 interval by taking S and L values in an HS L model in a matching mode, and Euclidean distance calculation is carried out;
whether input colors must be used or not is controlled in a derivation mode to ensure that the input colors are added to the color plate and appear in the final result, the input colors are realized in a global constraint mode, a color scheme is added, the used color set is taken out, and whether the target color input color is contained in the set is judged.
Setting color consistency expression of the character elements, wherein the character elements are sorted according to priority, the characters with the same priority use the consistent color in the element group, then packing unimportant groups again, applying inter-group constraint, the more unstable the character element with the higher priority, and the character element with the higher priority can be different from other character elements in color;
setting a sorting mode for judging the color priority of the character elements to express, wherein the character priority groups can be sorted according to the size of the font, and the priority is higher when the font is larger; or sorting may be performed according to whether or not highlighting; and (4) sorting according to (highlight, word size), firstly comparing whether the word size is highlighted or not, then comparing the word size, wherein the higher the highlight, the larger the word size and the higher the priority.
Another embodiment of the present invention includes a storage medium having a computer program stored thereon, the computer program when executed performs the steps of a color matching engine-based color matching constraint method.
Yet another embodiment of the present invention encompasses a terminal comprising a memory, a processor, and a control program based on color matching engine color matching constraints stored on the memory and executable on the processor, wherein the control program based on color matching engine color matching constraints is operative to perform the steps of the method for color matching engine based color matching constraints.
The method of the invention is to screen some color matching results which are not fit for expectation, and not give an absolute score, so the user needs to choose from a plurality of color matching schemes, so the user does not give an absolute score, because there is no unified standard to score a design, the result is difficult to quantify; in addition, if only one "optimal solution" meeting the target weight is finally obtained through scoring, namely, calculating the whole model after the target function is given, and the optimal solution is probably not the optimal solution (the needed color scheme) needed by people, the invention only needs to screen some color matching results which are less than the expected color matching results through the color matching constraint, outputs all the results meeting the expectation, and the user only needs to select by self.
The foregoing is illustrative of the preferred embodiments of this invention, and it is to be understood that the invention is not limited to the precise form disclosed herein and that various other combinations, modifications, and environments may be resorted to, falling within the scope of the concept as disclosed herein, either as described above or as apparent to those skilled in the relevant art. And that modifications and variations may be effected by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (10)
1. A color matching constraint method based on a color matching engine is characterized in that: the color matching constraint method comprises the following steps:
s1, constructing element nodes, and constructing constraint nodes in the directed graph after merging the element nodes;
s2, traversing all constraint items which cannot be solved at present, and judging whether a node to be matched with colors exists or not;
and S3, if the node to be color-matched does not exist, judging whether the global constraint is met, and outputting the color scheme according to the judgment result.
2. A color matching constraint method based on a color matching engine as defined in claim 1, wherein: the color matching constraint method further includes the step of determining a color palette to be used before starting step S2, and includes:
if the node to be matched with the color exists, setting the color of the current node as the current color, solving all the constraint conditions capable of being solved, and judging whether all the constraint conditions can be successfully passed;
if all the constraint conditions cannot be successfully passed, taking out the next color from the color plate as the current color, and judging whether the current color plate has available colors;
if all constraints are successfully passed, the step S2 is repeated.
3. A color matching constraint method based on a color matching engine as defined in claim 2, wherein: the judging whether the available color exists in the current color plate comprises the following steps:
if the current color plate has available colors, repeating the steps of setting the colors for the current nodes as the current colors, solving all the constraint conditions capable of being solved and judging whether all the constraint conditions can be successfully passed;
and if the current color plate has no available color, clearing the color matching states of all the nodes, repeating the step S2, taking out the next color plate as the color plate used for current color matching, and judging whether the residual color plates exist.
4. A color matching constraint method based on a color matching engine as defined in claim 3, wherein: the judging whether the residual color plates exist or not comprises the following steps:
if the residual color plates exist, returning to the step of taking out the next color from the color plates as the current color;
and if no color plates remain, outputting the color scheme at the moment.
5. A color matching constraint method based on a color matching engine as defined in claim 1, wherein: the constructing element nodes and the combining element nodes to construct the constraint nodes in the directed graph comprises the following steps:
s11, constructing corresponding element nodes for all the elements;
s12, grouping and combining nodes in the same group according to the existing labels, wherein the combined node represents that the same color is needed;
and S13, constructing constraint nodes in the algorithm directed acyclic graph.
6. A color matching constraint method based on a color matching engine as defined in claim 5, wherein: the construction algorithm directed acyclic graph constraint node comprises:
analyzing the element intersection relationship, and establishing different color constraints for the intersected elements;
establishing a priority intra-group constraint and a priority inter-group constraint for each priority group;
the black and white constraint is used for the text.
7. A color matching constraint method based on a color matching engine as defined in claim 2, wherein: if the node to be matched with the color does not exist, judging whether the global constraint is met, and outputting the color scheme according to the judgment result comprises the following steps:
if the global constraint is met, completing one-time color matching, collecting color information of all element nodes, outputting a set of color matching schemes, and judging whether more color matching schemes are needed; if not, outputting the color scheme, and if so, returning to the step of taking the next color from the color plate as the current color;
and if the global constraint is not satisfied, returning to the step of taking the next color from the color plate as the current color.
8. A color matching constraint method based on a color matching engine as defined in claim 2, wherein: the constraint conditions comprise fixed constraint conditions and controllable constraint conditions;
the fixed constraint conditions comprise that the colors of adjacent elements cannot be the same, the stroke color of the character is consistent with the color of the character, and the colors distributed to the overlapped elements cannot be the same;
the controllable constraint conditions comprise the control of the number of colors allowed to appear in a color result, the control of the hue relation of all colors in color matching, the control of the contrast relation of all colors in color matching, the control of whether input colors are required to be used or not, the setting of color consistency of character elements, the setting of a sequencing mode for judging the color priority of the character elements and the setting of whether only black and white characters are allowed to be used or not.
9. A storage medium, characterized by: the storage medium has stored thereon a computer program which when executed performs the steps of a color matching engine based color matching constraint method according to any of claims 1-8.
10. A terminal, characterized by: comprising a memory, a processor and a control program based on color matching engine color matching constraints stored on said memory and executable on said processor, said control program based on color matching engine color matching constraints being operative to perform the steps of a method according to any of claims 1-8 for color matching engine based color matching constraints.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010210696.6A CN111429539B (en) | 2020-03-24 | 2020-03-24 | Color matching constraint method based on color matching engine, storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010210696.6A CN111429539B (en) | 2020-03-24 | 2020-03-24 | Color matching constraint method based on color matching engine, storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111429539A true CN111429539A (en) | 2020-07-17 |
CN111429539B CN111429539B (en) | 2023-06-13 |
Family
ID=71549022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010210696.6A Active CN111429539B (en) | 2020-03-24 | 2020-03-24 | Color matching constraint method based on color matching engine, storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111429539B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113362428A (en) * | 2021-06-30 | 2021-09-07 | 北京百度网讯科技有限公司 | Method, apparatus, device, medium and product for configuring color |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070018980A1 (en) * | 1997-07-02 | 2007-01-25 | Rolf Berteig | Computer graphics shader systems and methods |
CN102930564A (en) * | 2011-09-08 | 2013-02-13 | 微软公司 | Visual shader designer |
CN106202352A (en) * | 2016-07-05 | 2016-12-07 | 华南理工大学 | The method that indoor furniture style based on Bayesian network designs with colour match |
CN109584326A (en) * | 2018-11-07 | 2019-04-05 | 厦门欢乐逛科技股份有限公司 | Poster Automatic color matching method, medium, computer equipment and device |
-
2020
- 2020-03-24 CN CN202010210696.6A patent/CN111429539B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070018980A1 (en) * | 1997-07-02 | 2007-01-25 | Rolf Berteig | Computer graphics shader systems and methods |
CN102930564A (en) * | 2011-09-08 | 2013-02-13 | 微软公司 | Visual shader designer |
US20130063460A1 (en) * | 2011-09-08 | 2013-03-14 | Microsoft Corporation | Visual shader designer |
CN106202352A (en) * | 2016-07-05 | 2016-12-07 | 华南理工大学 | The method that indoor furniture style based on Bayesian network designs with colour match |
CN109584326A (en) * | 2018-11-07 | 2019-04-05 | 厦门欢乐逛科技股份有限公司 | Poster Automatic color matching method, medium, computer equipment and device |
Non-Patent Citations (1)
Title |
---|
张文骁: "基于着色树的自动着色***的设计与实现" * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113362428A (en) * | 2021-06-30 | 2021-09-07 | 北京百度网讯科技有限公司 | Method, apparatus, device, medium and product for configuring color |
CN113362428B (en) * | 2021-06-30 | 2023-09-15 | 北京百度网讯科技有限公司 | Method, apparatus, device, medium, and product for configuring color |
Also Published As
Publication number | Publication date |
---|---|
CN111429539B (en) | 2023-06-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11055557B2 (en) | Automated extraction of product attributes from images | |
CN111400924B (en) | Automatic color matching method based on color matching engine, storage medium and terminal | |
US8542950B2 (en) | Finding iconic images | |
US9007647B2 (en) | Methods and apparatus to identify images in print advertisements | |
CN111340054A (en) | Data labeling method and device and data processing equipment | |
US7672958B2 (en) | Method and system to identify records that relate to a pre-defined context in a data set | |
US11288845B2 (en) | Information processing apparatus for coloring an image, an information processing program for coloring an image, and an information processing method for coloring an image | |
CN111667337A (en) | Commodity evaluation ordering method and system | |
WO2020136959A1 (en) | Cartoon generation system and cartoon generation method | |
CN107833088A (en) | Content providing, device and smart machine | |
CN114387608B (en) | Table structure identification method combining convolution and graph neural network | |
CN111369294B (en) | Software cost estimation method and device | |
CN117788109A (en) | Method for generating commodity label based on large language model and electronic equipment | |
CN111429539B (en) | Color matching constraint method based on color matching engine, storage medium and terminal | |
CN111340782A (en) | Image marking method, device and system | |
CN113268188B (en) | Task processing method, device, equipment and storage medium | |
US20230384910A1 (en) | Using Attributes for Font Recommendations | |
CN112052332A (en) | Retrieval method, retrieval device, electronic equipment and readable storage medium | |
US8688711B1 (en) | Customizable relevancy criteria | |
CN114547459B (en) | Cross-border electronic commerce data processing method and system | |
CN116109992A (en) | Goods shelf commodity identification method and system | |
McCann et al. | Knowledge systems in merchandising: Advertising design | |
US8719275B1 (en) | Color coded radars | |
JPS6136868A (en) | Information retriever | |
CN113779482A (en) | Method and device for generating front-end code |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |