A method and system for automatically generating patterns based on cellular automata
Through the automatic pattern generation method based on cellular automata, the problems of pattern generation complexity and cultural characteristics in the existing technology are solved, the combination of randomness and cultural style is achieved, and new patterns with formal beauty are generated.
Patent Information
- Application Number
- CN202411808090.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2044-12-10
AI Technical Summary
Existing pattern generation methods are difficult to generate complex and more random patterns, and ignore the unique cultural connotations and style characteristics of the patterns, resulting in the weakening of cultural attributes.
An automatic pattern generation method based on cellular automata is adopted. By collecting existing patterns, extracting the smallest pattern unit and performing genetic coding annotation, the probabilistic update mechanism of cellular automata is combined to randomly generate cell survival states, and the style transfer model is used to optimize the pattern style and color.
It generates complex and formally beautiful patterns, retains the randomness and cultural characteristics of the patterns, and adapts to modern aesthetic needs.
Smart Images

Figure CN119810227B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a method for automatically generating patterns based on cellular automata. Background Art
[0002] Traditional patterns contain rich cultural connotations and powerful artistic creativity. Entering the digital age, the rapid development of computer-generated technology provides new opportunities for the innovation and development of traditional patterns.
[0003] Among existing pattern generation methods, most use machine learning to learn the style of existing patterns and then generate new patterns with strong regularity through translation and replication. However, this has certain limitations and it is difficult to obtain complex and more random patterns.
[0004] In addition, existing technical research tends to overlook the unique cultural connotations and style characteristics of the patterns, and focuses too much on the structural level, resulting in the weakening of cultural attributes in the process of pattern inheritance. Summary of the Invention
[0005] In view of this, the present invention provides a method for automatically generating patterns based on cellular automata, which is used to at least solve the problem in the prior art that it is difficult to generate complex and more random patterns.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for automatically generating patterns based on cellular automata comprises the following steps:
[0008] S1. Collect existing patterns, extract the smallest pattern units from the existing pattern configurations, and organize and classify all the smallest pattern units according to the three dimensions of primitives, composition, and color to obtain different basic patterns;
[0009] S2. Genetically label each basic pattern, obtain the gene sequence corresponding to each basic pattern, and aggregate all gene sequences to form a gene library;
[0010] S3. Divide the pattern canvas to be generated into a grid, treat each divided cell as a cell, set the cell survival state of each cell at the initial time t0; q-1 The cell survival status at the moment is combined with the cellular automaton probabilistic update mechanism to automatically update t q The cell survival probability at the time is randomly generated based on the cell survival probability; the cell survival state includes: if the current cell is alive, it means that the current cell is filled with a pattern; if the current cell is dead, it means that the current cell is not filled with a pattern; q = 1, 2, 3...f, where f is the number of moments in the preset automatically generated time period;
[0011] S4. Select the cell survival state at any time, retrieve the gene sequence from the gene library and decode it to obtain the corresponding basic pattern, and fill the basic pattern obtained after decoding into the cell according to the cell survival state selected in S3 to form a new pattern.
[0012] Preferably, in S1, after the existing patterns are collected, the patterns with poor quality or repeated patterns are eliminated, and the remaining existing patterns are subjected to composition analysis to divide the smallest pattern units.
[0013] Preferably, in S3, according to t q-1 The cell survival status at the moment is combined with the cellular automaton probabilistic update mechanism to automatically update t q The cell survival probability at the moment, and the specific contents of randomly generating the cell survival state according to the cell survival probability include:
[0014] In each 3*3 grid, perform the following steps:
[0015] Get the cell survival status C of each cell at the initial time t0 ij , and record the living cells as 1 and the dead cells as 0; where i is the row number of the cell and j is the column number of the cell;
[0016] Obtain the total number of survival and death status counts of other cells around each cell, and obtain the cell survival probability at the next moment according to the following rules:
[0017] (1) If the current cell is alive and there are 2 or 3 cells around it that are alive, then the probability that the current cell will still be alive at the next moment is 90%, and the probability of death is 10%;
[0018] (2) If the current cell is alive and there are less than 2 or more than 3 cells around it that are alive, then the probability that the current cell will still be alive at the next moment is 5%, and the probability of death is 95%;
[0019] (3) If the current cell dies and there are 3 cells in the surrounding state, then the probability that the current cell will still be alive at the next moment is 90%, and the probability of death is 10%;
[0020] The cell survival status at the next moment is randomly updated based on the cell survival probability combined with random numbers.
[0021] Preferably, style transfer is also included, including:
[0022] Import the gene library constructed in S2 as training samples into the style transfer model to complete the learning of sample style and color;
[0023] The pattern automatically generated in S4 is input into the trained style transfer model to generate a style-transferred pattern.
[0024] Preferably, the specific content of style transfer includes:
[0025] Style transfer is achieved by optimizing the total loss function to minimize the difference between the target generated image and the style image to be transferred;
[0026] Among them, the total loss function is:
[0027] L total =α m,n L content +(1-α m,n )L style +γL tv
[0028]
[0029] Among them, α m,n 、(1-α m,n ) and γ are the weight coefficients of the content loss function, style loss function and smoothness loss function respectively; D m,n is the complexity at pixel point (m, n);
[0030] The content loss function is used to keep the image content unchanged:
[0031]
[0032] in, is the activation value of the target generated image at (m, n) in the lth layer of the convolutional neural network, is the activation value of the style image to be transferred at (m, n) in the lth layer of the convolutional neural network;
[0033] The style loss function is:
[0034]
[0035] in, represents the Frobenius norm, w k is the style loss weight of the lth layer of the convolutional neural network, which is used to balance the style transfer effects of different layers and different regions. Generate the Gram matrix of the target image in the lth layer of the convolutional neural network, is the Gram matrix of the style image to be transferred in the lth layer of the convolutional neural network;
[0036] The style information of the style image to be transferred is captured by the Gram matrix, which is:
[0037]
[0038] in, Represents the Gram matrix of the pixel point at the mth row and nth column of the lth layer, and are the activation values of the lth layer respectively; the Gram matrix captures the style information of the image by calculating the inner product between all feature maps in a given layer;
[0039] The smoothness of the image is optimized through the smoothness loss function:
[0040]
[0041] Among them, x m,n is the pixel value at pixel point (m, n).
[0042] A pattern automatic generation system based on cellular automata, comprising: a data processing module, a gene library construction module, a cell renewal module and a pattern filling module;
[0043] The data processing module is used to collect existing patterns, extract the smallest pattern units from the existing pattern configurations, and sort and classify all the smallest pattern units according to the three dimensions of primitives, composition and color to obtain different basic patterns;
[0044] The gene library construction module is used to perform gene coding annotation on each basic pattern, obtain the gene sequence corresponding to each basic pattern, and collect all the gene sequences to form a gene library;
[0045] The cell update module is used to divide the pattern canvas to be generated into grids, and each divided cell is regarded as a cell. The cell survival state of each cell at the initial time t0 is set; according to t q-1 The cell survival status at the moment is combined with the cellular automaton probabilistic update mechanism to automatically update t q The cell survival probability at the time is randomly generated based on the cell survival probability; the cell survival state includes: if the current cell is alive, it means that the current cell is filled with a pattern; if the current cell is dead, it means that the current cell is not filled with a pattern; q = 1, 2, 3...f, where f is the number of moments in the preset automatically generated time period;
[0046] The pattern filling module is used to select the cell survival state at any time, retrieve the gene sequence from the gene library and decode it to obtain the corresponding basic pattern, and fill the decoded basic pattern into the cell according to the selected cell survival state to form a new pattern.
[0047] Preferably, it also includes a style transfer module;
[0048] The style transfer module is used to import the gene library constructed by the gene library construction module into the style transfer model as a training sample to complete the learning of the sample style and color; the patterns automatically generated in the pattern filling module are input into the trained style transfer model to generate the style-transferred pattern.
[0049] It can be seen from the above technical solutions that, compared with the prior art, the present invention discloses a method for automatically generating patterns based on cellular automata, which has the following beneficial effects:
[0050] The present invention provides a method for automatically generating patterns based on cellular automaton technology. By setting local rules, such as the life and death state of a cell depends on the state of its surrounding cells, a complex and formally beautiful pattern generation process is simulated, providing a controllable and random generation method for the distribution of patterns in the composition. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 This is a flow chart of a method for automatically generating patterns based on cellular automata disclosed in the present invention;
[0053] Figure 2 The cell survival status of each cell at any time disclosed in the embodiments of the present invention;
[0054] Figure 3 The cell survival state of each cell at the next moment is obtained according to the probabilistic update mechanism of cellular automata disclosed in the embodiment of the present invention;
[0055] Figure 4 A pattern formed after filling the basic pattern disclosed in the embodiment of the present invention;
[0056] Figure 5 A pattern formed after filling the basic pattern disclosed in the embodiment of the present invention;
[0057] Figure 6 The pattern is formed by adding a single basic pattern disclosed in the embodiment of the present invention. DETAILED DESCRIPTION
[0058] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0059] The present invention provides a method for automatically generating patterns based on cellular automata, such as Figure 1 As shown, the following steps are included:
[0060] S1. Collect existing patterns, extract the smallest pattern units from the existing pattern configurations, and organize and classify all the smallest pattern units according to the three dimensions of primitives, composition, and color to obtain different basic patterns;
[0061] S2. Genetically label each basic pattern, obtain the gene sequence corresponding to each basic pattern, and aggregate all gene sequences to form a gene library;
[0062] S3. Divide the pattern canvas to be generated into a grid, treat each divided cell as a cell, set the cell survival state of each cell at the initial time t0; q-1 The cell survival status at the moment is combined with the cellular automaton probabilistic update mechanism to automatically update t q The cell survival probability at the time is randomly generated based on the cell survival probability; the cell survival state includes: if the current cell is alive, it means that the current cell is filled with a pattern; if the current cell is dead, it means that the current cell is not filled with a pattern; q = 1, 2, 3...f, where f is the number of moments in the preset automatically generated time period;
[0063] S4. Select the cell survival state at any time, retrieve the gene sequence from the gene library and decode it to obtain the corresponding basic pattern, and fill the basic pattern obtained after decoding into the cell according to the cell survival state selected in S3 to form a new pattern.
[0064] It should be noted that:
[0065] In this embodiment, the traditional pattern of the Yao ethnic group is used as the existing pattern configuration, and then a new pattern based on the Yao ethnic group pattern is automatically generated.
[0066] After a detailed classification and analysis of Yao traditional patterns and symbols, the smallest pattern units were extracted from the Yao traditional patterns. Each smallest pattern unit was analyzed from three dimensions: primitive, composition, and color. Errors, duplications, or low-quality patterns were eliminated to obtain basic patterns with high applicability, and the basic patterns were classified.
[0067] In this embodiment, basic patterns are categorized into two main types: strips and circles. Strips mainly include straight lines, wavy lines, and zigzag lines, and are used to express natural elements such as mountains, rivers, and clouds. Circular patterns mainly include full circles, semicircles, and dots, and symbolize celestial bodies such as the sun, moon, and stars.
[0068] Since the field of computer image generation has relatively strict requirements on the format of pattern data, the basic patterns are genetically processed into a vector graphic format to meet the format generation requirements of the computer system and ensure that the pattern genes can be effectively identified and recombined by the generation algorithm. That is, each basic pattern is genetically coded and labeled separately so that each basic pattern corresponds to a set of gene sequences. By obtaining the gene sequence corresponding to each basic pattern, the corresponding basic pattern can be generated.
[0069] This example uses cellular automata (CA) theory to generate the pattern position space. By setting simple local rules, such as the life and death status of a cell depending on the status of its surrounding cells, it can simulate the complex pattern generation process. This step provides a controllable and somewhat random method for the distribution of patterns within the pattern.
[0070] A cellular automaton is a mathematical model used to simulate the dynamic behavior of complex systems. It consists of a set of cells that update their state in discrete time steps according to a set of rules. The most famous example of a cellular automaton is Conway's "Game of Life," which demonstrates how complex patterns can emerge from simple rules.
[0071] After generating the pattern position space based on the cellular automaton pattern position space, the basic patterns of different categories are loaded into the designated positions according to the previous grouping logic. This process of this embodiment takes into account the interaction between the patterns and the harmony of the overall pattern, ensuring the complete communication of the beauty and meaning of the final pattern. In actual application, the initial pattern position space can be set as needed, that is, the cell survival state of each cell at the initial time t0. The cells begin to randomly change according to their initial survival state and through the cellular automaton probabilistic update mechanism. After pausing the change, the randomly generated pattern position space can be obtained.
[0072] In order to further implement the above technical solution, in S1, after the existing patterns are collected, the patterns with poor quality or repeated patterns are eliminated, and the remaining existing patterns are subjected to composition analysis to divide the smallest pattern units.
[0073] In order to further implement the above technical solution, S3 is based on t q-1 The cell survival status at the moment is combined with the cellular automaton probabilistic update mechanism to automatically update tq The cell survival probability at the moment, and the specific contents of randomly generating the cell survival state according to the cell survival probability include:
[0074] In each 3*3 grid, perform the following steps:
[0075] Get the cell survival status C of each cell at the initial time t0 ij , and record the living cells as 1 and the dead cells as 0; where i is the row number of the cell and j is the column number of the cell;
[0076] Obtain the total number of survival and death status counts of other cells around each cell, and obtain the cell survival probability at the next moment according to the following rules:
[0077] (1) If the current cell is alive and there are 2 or 3 cells around it that are alive, then the probability that the current cell will still be alive at the next moment is 90%, and the probability of death is 10%;
[0078] (2) If the current cell is alive and there are less than 2 or more than 3 cells around it that are alive, then the probability that the current cell will still be alive at the next moment is 5%, and the probability of death is 95%;
[0079] (3) If the current cell dies and there are 3 cells in the surrounding state, then the probability that the current cell will still be alive at the next moment is 90%, and the probability of death is 10%;
[0080] The cell survival status at the next moment is randomly updated based on the cell survival probability combined with random numbers.
[0081] It should be noted that:
[0082] Based on the original classic cellular automaton rules, the present invention adds a probabilistic factor, so that the life and death state of cells is no longer deterministic, but is randomly updated according to a certain probability. This enhanced model will make the generated patterns more unpredictable and random, while retaining a certain degree of controllability.
[0083] In this embodiment, the cell survival state of each cell at any time is set as Figure 2 As shown, the setting method of the cell survival status of each cell at any time is carried out under the three preset composition modes of "complex but not chaotic", "dynamic rhythm" and "orderly rhythm" mentioned above. In each mode, there are preset multiple basic composition methods that conform to its style, namely, cell survival status.
[0084] According to the cellular automaton probabilistic update mechanism, the cell survival state of each cell at the next moment is obtained as follows: Figure 3 As shown, according to Figure 3The cell survival state shown in the figure is shown in the figure. Different basic patterns are selected to fill in the surviving cells, such as Figure 4 or Figure 5 As shown in the figure, the basic pattern in each cell can be individually adjusted, deleted or added, such as Figure 6 shown.
[0085] To further implement the above technical solutions, style transfer is also included, specifically including:
[0086] Import the gene library constructed in S2 as training samples into the style transfer model to complete the learning of sample style and color;
[0087] The pattern automatically generated in S4 is input into the trained style transfer model to generate a style-transferred pattern.
[0088] In this embodiment, a style transfer method is adopted to transfer the color style of the traditional costumes and handicrafts of the Yao ethnic group to the pattern design. By analyzing the color usage habits of the Yao culture, a color scheme that can express specific emotional colors is selected, so that the designed pattern not only retains the traditional characteristics of the Yao culture, but also adapts to modern aesthetic needs. This embodiment adopts the painting style transfer technology, and realizes the migration of the Yao color style to modern pattern design through the improvement and optimization of the convolutional neural network. First, by analyzing the color usage habits of the Yao culture, this embodiment selects a color scheme that can express specific emotions and cultural characteristics as the target style. Subsequently, reference is made to the open source project (NeuralStyle), which minimizes the difference between the content image and the style image by optimizing a loss function, thereby realizing style transfer. This embodiment makes necessary modifications and optimizations to the project to adapt to the characteristics of the Yao style patterns.
[0089] To further implement the above technical solutions, the specific contents of style transfer include:
[0090] Style transfer is achieved by optimizing the total loss function to minimize the difference between the target generated image and the style image to be transferred;
[0091] Among them, the total loss function is:
[0092] L total =α m,n L content +(1-α m,n )L style +γL tv
[0093]
[0094] Among them, α m,n 、(1-α m,n) and γ are the weight coefficients of the content loss function, style loss function and smoothness loss function respectively; D m,n is the complexity at pixel point (m, n);
[0095] The content loss function is used to keep the image content unchanged:
[0096]
[0097] in, is the activation value of the target generated image at (m, n) in the lth layer of the convolutional neural network, is the activation value of the style image to be transferred at (m, n) in the lth layer of the convolutional neural network;
[0098] The style loss function is:
[0099]
[0100] in, represents the Frobenius norm, w k is the style loss weight of the lth layer of the convolutional neural network, which is used to balance the style transfer effects of different layers and different regions. Generate the Gram matrix of the target image in the lth layer of the convolutional neural network, is the Gram matrix of the style image to be transferred in the lth layer of the convolutional neural network;
[0101] The style information of the style image to be transferred is captured by the Gram matrix, which is:
[0102]
[0103] in, Represents the Gram matrix of the pixel point at the mth row and nth column of the lth layer, and are the activation values of the lth layer respectively; the Gram matrix captures the style information of the image by calculating the inner product between all feature maps in a given layer;
[0104] The smoothness of the image is optimized through the smoothness loss function:
[0105]
[0106] Among them, x m,n is the pixel value at pixel point (m, n).
[0107] A pattern automatic generation system based on cellular automata, comprising: a data processing module, a gene library construction module, a cell renewal module and a pattern filling module;
[0108] The data processing module is used to collect existing patterns, extract the smallest pattern units from the existing pattern configurations, and sort and classify all the smallest pattern units according to the three dimensions of primitives, composition and color to obtain different basic patterns;
[0109] The gene library construction module is used to perform gene coding annotation on each basic pattern, obtain the gene sequence corresponding to each basic pattern, and collect all the gene sequences to form a gene library;
[0110] The cell update module is used to divide the pattern canvas to be generated into grids, and each divided cell is regarded as a cell. The cell survival state of each cell at the initial time t0 is set; according to t q-1 The cell survival status at the moment is combined with the cellular automaton probabilistic update mechanism to automatically update t q The cell survival probability at the time is randomly generated based on the cell survival probability; the cell survival state includes: if the current cell is alive, it means that the current cell is filled with a pattern; if the current cell is dead, it means that the current cell is not filled with a pattern; q = 1, 2, 3...f, where f is the number of moments in the preset automatically generated time period;
[0111] The pattern filling module is used to select the cell survival state at any time, retrieve the gene sequence from the gene library and decode it to obtain the corresponding basic pattern, and fill the decoded basic pattern into the cell according to the selected cell survival state to form a new pattern.
[0112] In order to further implement the above technical solutions, a style transfer module is also included;
[0113] The style transfer module is used to import the gene library constructed by the gene library construction module into the style transfer model as a training sample to complete the learning of the sample style and color; the patterns automatically generated in the pattern filling module are input into the trained style transfer model to generate the style-transferred pattern.
[0114] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for automatically generating patterns based on cellular automata, characterized in that: The following steps are involved: S1. Collect existing patterns, extract the smallest pattern units from the existing pattern configurations, and organize and classify all the smallest pattern units according to the three dimensions of primitives, composition, and color to obtain different basic patterns; S2. Genetically label each basic pattern, obtain the gene sequence corresponding to each basic pattern, and aggregate all gene sequences to form a gene library; S3. Divide the pattern canvas into grids, treat each grid as a cell, and set the initial time. The cell viability status of each cell is according to The cell survival status at the moment is automatically updated by combining the cellular automaton probabilistic update mechanism The cell survival probability at the moment, randomly generates the cell survival state according to the cell survival probability, and the specific contents include: In each In the grid, perform the following steps: Get the initial time The cell viability status of each cell , and record the living cells as 1 and the dead cells as 0; is the row number of the cell, is the column number where the cell is located; Obtain the total number of survival and death status counts of other cells around each cell, and obtain the cell survival probability at the next moment according to the following rules: (1) If the current cell is alive and there are 2 or 3 surviving cells around it, then the probability that the current cell will still be alive at the next moment is 90%, and the probability of death is 10%; (2) If the current cell is alive and there are less than 2 or more than 3 cells around it that are alive, then the probability that the current cell will still be alive at the next moment is 5%, and the probability of death is 95%; (3) If the current cell dies and there are 3 cells in the surrounding state, then the probability that the current cell will still be alive at the next moment is 90%, and the probability of death is 10%; Randomly update the cell survival status at the next moment based on the cell survival probability combined with random numbers; The cell survival status includes: if the current cell is alive, it means that the current cell is filled with a pattern; if the current cell is dead, it means that the current cell is not filled with a pattern; q =1,2,3…… f , f The number of moments in the preset automatically generated time period; S4. Select the cell survival state at any time, retrieve the gene sequence from the gene library and decode it to obtain the corresponding basic pattern, and fill the decoded basic pattern into the cell according to the cell survival state selected in S3 to form a new pattern.
2. The method for automatically generating patterns based on cellular automata according to claim 1, characterized in that: In S1, after the existing patterns are collected, the patterns with poor quality or repetition are eliminated, and the remaining existing patterns are subjected to composition analysis to divide the smallest pattern units.
3. The method for automatically generating patterns based on cellular automata according to claim 1, characterized in that: It also includes style transfer, including: Import the gene library constructed in S2 as training samples into the style transfer model to complete the learning of sample style and color; The pattern automatically generated in S4 is input into the trained style transfer model to generate a style-transferred pattern.
4. The method for automatically generating patterns based on cellular automata according to claim 3, characterized in that: The specific content of style transfer includes: Style transfer is achieved by optimizing the total loss function to minimize the difference between the target generated image and the style image to be transferred; Among them, the total loss function is: ; ; in, 、 and are the weight coefficients of the content loss function, style loss function, and smoothness loss function respectively; Pixel The complexity of the place; The content loss function is used to keep the image content unchanged: ; in, The target generated image is the convolutional neural network Layer The activation value at is the style image to be transferred in the convolutional neural network Layer The activation value at ; The style loss function is: ; in, represents the Frobenius norm, For convolutional neural network l The style loss weight of the layer is used to balance the style transfer effects of different layers and different regions. Generating images for the target in convolutional neural networks The Gram matrix of the layer, The style image to be transferred is in the convolutional neural network Gram matrix of the layer; The style information of the style image to be transferred is captured by the Gram matrix, which is: ; in, Indicates the The Gram matrix of the pixel point in the mth row and the nth column of the layer, and They are The activation value of the layer; the Gram matrix captures the style information of the image by calculating the inner product between all feature maps in a given layer; The smoothness of the image is optimized through the smoothness loss function: ; in, Pixel The pixel value at .
5. A system for automatically generating patterns based on cellular automata, based on a method for automatically generating patterns based on cellular automata according to any one of claims 1 to 4, characterized in that: include: Data processing module, gene library construction module, cell renewal module and pattern filling module; The data processing module is used to collect existing patterns, extract the smallest pattern units from the existing pattern configurations, and sort and classify all the smallest pattern units according to the three dimensions of primitives, composition and color to obtain different basic patterns; The gene library construction module is used to perform gene coding annotation on each basic pattern, obtain the gene sequence corresponding to each basic pattern, and collect all the gene sequences to form a gene library; The cell update module is used to divide the pattern canvas into grids, treat each divided cell as a cell, and set the initial time The cell survival status of each cell under The cell survival status at the moment is automatically updated by combining the cellular automaton probabilistic update mechanism The cell survival probability at the moment, randomly generates the cell survival state according to the cell survival probability; wherein the cell survival state includes: if the current cell is alive, it means that the current cell is filled with a pattern; if the current cell is dead, it means that the current cell is not filled with a pattern; q =1,2,3…… f , f The number of moments in the preset automatically generated time period; The pattern filling module is used to select the cell survival state at any time, retrieve the gene sequence from the gene library and decode it to obtain the corresponding basic pattern, and fill the decoded basic pattern into the cell according to the selected cell survival state to form a new pattern.
6. The automatic pattern generation system based on cellular automata according to claim 5, characterized in that: Also includes a style transfer module; The style transfer module is used to import the gene library constructed by the gene library construction module as training samples into the style transfer model to complete the learning of sample style and color; The patterns automatically generated in the pattern filling module are input into the trained style transfer model to generate style-transferred patterns.
Citation Information
Patent Citations
Method for designing ceramic decorative patterns
CN102275455A
Hunan embroidery image gene construction and Hunan embroidery image digital processing method
CN107045551A