A silk thread texture image intelligent generation method and system for decorative tapestry
By simulating the reflection of light from silk threads, extracting texture features, and conducting adversarial training, the optimal coverage path and silk thread direction are planned, solving the problems of low efficiency and poor texture effect in traditional methods, and realizing the generation of high-quality silk thread texture images for industrial production.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGHAI QIYUAN TEXTILE CO LTD
- Filing Date
- 2025-06-13
- Publication Date
- 2026-06-12
AI Technical Summary
Traditional methods for generating silk thread texture images are inefficient, fail to meet diverse market demands, and generate textures that lack realism and naturalness, cannot accurately simulate the texture and luster of silk threads, and are difficult to generate complex patterns and high-quality textures.
By collecting physical property parameters of silk threads, simulating light reflection using a physical property simulation engine, and generating a dynamic light-sensing prediction model using a Monte Carlo ray tracing algorithm, texture features are extracted using a convolutional neural network and adversarial training is performed using a generative adversarial network, and an improved ant colony algorithm is used to plan the silk thread coverage path and optimize the silk thread direction using a differentiable rendering engine to generate control commands that conform to the process of industrial embroidery machines.
It improves the realism and three-dimensionality of silk thread texture images, enhances texture image quality, ensures the accuracy of silk thread coverage paths and embroidery quality, and achieves efficient industrial production.
Smart Images

Figure CN120655805B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent generation technology of silk thread texture images, and in particular to a method and system for intelligent generation of silk thread texture images for decorative tapestries. Background Technology
[0002] In the production of decorative tapestries, the generation of silk thread texture images is a crucial step in determining the quality and visual effect of the tapestry. However, traditional methods for generating silk thread texture images have many limitations.
[0003] Traditional methods are mainly divided into hand-drawing and early computer-aided design. Hand-drawing has significant drawbacks: it is not only inefficient but also requires extremely high levels of skill and experience from the artist, making large-scale production difficult. Furthermore, hand-drawn textures are limited in variety, failing to meet the diverse demands of the market. While early computer-aided design methods could improve efficiency to some extent, the generated textures lacked realism and naturalness, failing to accurately simulate the texture and luster of silk threads, and thus failing to meet the demands of modern industry for complex patterns and high quality.
[0004] With the development of technology, image generation models have made significant progress, capable of generating high-quality, realistic images, and have been successfully applied in numerous fields. However, these general-purpose image generation models have shortcomings when processing silk thread texture images, failing to fully consider factors such as the material properties and weaving methods of the silk thread, resulting in a significant difference between the generated images and the actual silk thread texture. In addition, traditional methods are inadequate in handling complex silk thread texture variations and spatial deformations, making it difficult to generate texture images with rich details and a sense of depth. Summary of the Invention
[0005] In view of this, the present invention proposes an intelligent method and system for generating silk thread texture images for decorative tapestries, in order to solve the problems of low efficiency and poor effect in the generation of silk thread texture images in the prior art.
[0006] The specific technical solution of this invention is as follows:
[0007] A method for intelligently generating silk thread texture images for decorative tapestries, comprising:
[0008] Step 1: Collect basic physical property parameters of different types of yarns, use a physical property simulation engine to simulate the light reflection of yarn materials under different lighting conditions, and build a light reflection database of yarn materials; based on the Monte Carlo ray tracing algorithm, predict the dynamic light perception changes of yarn layers of different densities under light irradiation according to the yarn reflection data in the light reflection database, and generate a dynamic light perception prediction model.
[0009] Step 2: Use a convolutional neural network to decompose the original pattern of the decorative tapestry into multiple sub-images of different resolutions, extract micro-texture features and macro-morphological features respectively, calculate the correlation matrix between them, and generate a texture feature map with cross-scale correlation based on the correlation matrix.
[0010] Step 3: Input the texture feature map into the generative adversarial network, combine it with the output parameters of the dynamic light-sensing prediction model for adversarial training, and generate a multi-layered virtual texture image of silk threads with physical property awareness.
[0011] Step 4: Perform pixel gradient analysis on the virtual texture image, use an improved ant colony algorithm to plan the optimal coverage path of the silk thread on the tapestry, establish a nonlinear mapping relationship between path density and texture sharpness, consider the tension of the silk thread, and generate a vector diagram of the silk thread direction including tension compensation parameters.
[0012] Step 5: Iteratively optimize the vector diagram of the silk thread direction using a differentiable rendering engine, dynamically adjust the cross angle of the silk threads according to the preset friction coefficient of the fabric surface, and output the final control instruction set that conforms to the process constraints of industrial embroidery machines.
[0013] Specifically, in step 1, firstly, based on the light absorption and reflection ratio characteristics of the filament material, combined with the color differences in the reflection of different wavelengths of light, and the influence of curvature on the light reflection angle, the effect of elastic modulus on the propagation path of light between filament layers is comprehensively considered to generate comprehensive light reflection data under different lighting conditions; then, using the Monte Carlo ray tracing algorithm, light reflection data is obtained through multiple samplings, and combined with the influence of filament density on light perception and the relationship between light reflection data and light perception contribution, a dynamic light perception change curve is finally generated.
[0014] Specifically, in step 2, when extracting the micro-texture features and macro-morphological features of the original pattern of the decorative tapestry through a convolutional neural network, different sizes of convolutional kernels are used to focus on details and overall structure respectively. Small convolutional kernels slide on the sub-image to capture the details of fine textures and fiber arrangement; large convolutional kernels slide on the sub-image to extract the overall outline and shape.
[0015] Specifically, in step 2, the correlation matrix between micro-texture features and macro-morphological features is calculated to describe the strength of the relationship between the two features at each corresponding position. During the calculation, the mean values of micro-texture features and macro-morphological features are calculated respectively, and the degree of difference between the two at each position is measured based on this. Finally, based on the above correlation matrix, the micro-texture features and macro-morphological features are fused to generate a texture feature map with cross-scale correlation.
[0016] Specifically, in step 3, a Generative Adversarial Network (GAN) is used for training: the generator receives randomly generated noise data as input and combines it with texture feature maps and dynamic light perception prediction model parameters to try to generate a virtual texture image that is as close as possible to the real image; the discriminator receives the virtual texture image generated by the generator and the real image as input, and continuously improves its judgment ability by learning to distinguish the differences between the two; the generator and the discriminator continuously optimize through mutual game, improving the realism of the generated virtual texture image by minimizing the generator's loss function, and enhancing its judgment accuracy by minimizing the discriminator's loss function, thus achieving a balance between the two.
[0017] Specifically, the texture feature map T is input into the generative adversarial network (GAN), and adversarial training is performed using the output parameters L of the dynamic light perception prediction model. Let the loss functions of the generator G and the discriminator D be respectively... and :
[0018] ,
[0019] ,
[0020] in, It is random noise; is the distribution of random noise; x is the real image data; It is the distribution of real images.
[0021] Specifically, in step 4, pixel gradient analysis is first performed on the virtual texture image to calculate the gradient value of each pixel. By analyzing the changes in texture pixel values in the virtual texture image, the edge and detail information in the virtual texture image is determined. Then, an improved ant colony algorithm is used to plan the optimal silk thread coverage path. After that, a nonlinear mapping relationship between path density and texture sharpness is established. According to the visual effect requirements, the path density is dynamically adjusted to achieve precise control of texture sharpness. Finally, the generated silk thread direction vector not only clarifies the laying direction and density of the silk thread, but also includes tension compensation information for different path segments to ensure the uniformity and stability of the silk thread in the actual laying process.
[0022] Specifically, in step 5, the rendering result is first compared with the preset target, and the difference between the two is calculated. Then, the parameters of the yarn direction vector diagram are adjusted using the rendering difference value through the backpropagation algorithm, so that the rendering result gradually approaches the preset target. At the same time, the influence of the fabric surface friction coefficient on the yarn crossing angle is considered, and the yarn crossing angle is dynamically adjusted to adapt to fabric surfaces with different friction characteristics. After multiple iterations and optimizations, the final control instruction set is output. This instruction set is presented in the form of executable code for industrial embroidery machines, and the needle is precisely controlled through digital instructions.
[0023] Specifically, let the rendering result be... The preset target is loss function It can be represented as:
[0024] ,
[0025] in, V represents the dimension of the rendered result; V is the vector diagram showing the direction of the silk threads. It is a parameter that adjusts the influence of the friction coefficient; It is the coefficient of friction of the fabric surface. Angle of intersection with silk thread The relevant function is used to dynamically adjust the cross angle of the threads based on the coefficient of friction.
[0026] A smart image generation system for silk thread textures used in decorative tapestries, comprising:
[0027] The dynamic light sensing prediction module is used to predict dynamic light sensing changes under different lighting conditions and build a prediction model based on the physical property parameters of the silk thread using the Monte Carlo ray tracing algorithm.
[0028] The texture feature map generation module is used to extract the micro-texture features and macro-morphological features of the original pattern using a convolutional neural network, and fuse them to generate a cross-scale related texture feature map.
[0029] The image generation module is used to input the texture feature map and the output parameters of the dynamic light perception prediction model into the generative adversarial network to generate a multi-layered virtual texture image with physical property awareness.
[0030] The path planning module is used to perform pixel gradient analysis on virtual texture images, calculate the optimal silk thread coverage path using an improved ant colony algorithm, and generate a silk thread direction vector map including tension compensation parameters.
[0031] The instruction output module is used to iteratively optimize the vector diagram of the silk thread direction through a differentiable rendering engine, and dynamically adjust the cross angle of the silk threads according to the friction coefficient of the fabric surface, so as to output a set of control instructions that conform to the process constraints of industrial embroidery machines.
[0032] The beneficial effects of this invention are as follows:
[0033] 1. By using a dynamic light-sensing prediction model, the dynamic light-sensing changes of different density filament layers under light illumination are simulated, enhancing the realism and three-dimensionality of the image;
[0034] 2. Convolutional neural networks are used to extract the correlation matrix between micro and macro features, generating texture feature maps with cross-scale correlation, thereby improving the quality and visual effect of texture images;
[0035] 3. Through adversarial training of generative adversarial networks, multi-layered virtual texture images of silk threads with physical property awareness are generated, making the texture images more consistent with the actual physical scene;
[0036] 4. An improved ant colony algorithm is used to calculate the optimal silk thread coverage path and establish a non-linear mapping relationship between path density and texture sharpness to ensure that the silk thread coverage can accurately present the details of the texture image.
[0037] 5. The vector graphics are iteratively optimized using a differentiable rendering engine. The cross angle of the threads is dynamically adjusted according to the preset friction coefficient of the fabric surface, and the final control instruction set that conforms to the process constraints of industrial embroidery machines is output to ensure the embroidery quality of the tapestry. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a flowchart illustrating the intelligent generation method for silk thread texture images used in decorative tapestries according to the present invention.
[0040] Figure 2 This is a schematic diagram of the intelligent generation system for silk thread texture images used in decorative tapestries according to the present invention. Detailed Implementation
[0041] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0042] This invention proposes an intelligent method for generating silk thread texture images for decorative tapestries, comprising five core steps: establishing a dynamic light-sensing prediction model, multi-scale texture feature fusion, intelligent texture synthesis, reverse path planning, and self-optimization output, to ensure that the generated texture images conform to both physical property perception and the process constraints of industrial embroidery machines.
[0043] Specifically, the method of the present invention includes: Step 1, collecting basic physical property parameters of different types of silk threads, using a physical property simulation engine to simulate the light reflection of silk thread materials under different lighting conditions, and constructing a light reflection database of silk thread materials; based on the Monte Carlo ray tracing algorithm, predicting the dynamic light perception changes of silk thread layers of different densities under light illumination based on the silk thread reflection data in the light reflection database, and generating a dynamic light perception prediction model; Step 2, using a convolutional neural network to decompose the original pattern of the decorative tapestry into multiple sub-images of different resolutions, extracting micro-texture features and macro-morphological features respectively, calculating the correlation matrix between them, and generating a texture feature map with cross-scale correlation based on the correlation matrix. Step 3: Input the texture feature map into the generative adversarial network and perform adversarial training by combining the output parameters of the dynamic light-sensing prediction model to generate a multi-layered virtual texture image of silk threads with physical property awareness; Step 4: Perform pixel gradient analysis on the virtual texture image, use an improved ant colony algorithm to plan the optimal coverage path of the silk threads on the tapestry, establish a nonlinear mapping relationship between path density and texture sharpness, consider the tension of the silk threads, and generate a silk thread direction vector map including tension compensation parameters; Step 5: Iteratively optimize the silk thread direction vector map through a differentiable rendering engine, dynamically adjust the silk thread crossing angle according to the preset fabric surface friction coefficient, and output the final control instruction set that conforms to the process constraints of industrial embroidery machines.
[0044] For step 1, parameters such as the curvature and elastic modulus of the filaments are collected. A light reflection database of the filament material is constructed using a physical property simulation engine. Based on the Monte Carlo ray tracing algorithm, the dynamic light perception change curves of filament layers with different densities are predicted, thereby establishing a dynamic light perception prediction model. Specifically, this includes the following sub-steps:
[0045] Step 1.1: Collect the basic physical property parameters of different types of yarns. These parameters form the basis for subsequent simulations and modeling. Specifically, the collected parameters include the yarn's material (M), color (C), curvature (B), and elastic modulus (E). Different materials determine the yarn's absorption and reflection characteristics; for example, silk and nylon yarns have significantly different light reflection effects. Color affects the yarn's reflection of different wavelengths of light; for instance, black yarn absorbs more light, while white yarn reflects more. Curvature and elastic modulus also play crucial roles in light reflection. Curvature changes the angle of light reflection on the yarn surface, while elastic modulus is related to the yarn's deformability and affects the propagation and reflection path of light between yarn layers.
[0046] Step 1.2: Using a physical property simulation engine, comprehensively simulate and record the light reflection of the filament material under different lighting conditions to construct a light reflection database for the filament material. The physical property parameters of the filament collected in Step 1.1 are input into the PhysX simulation engine. The PhysX simulation engine will simulate light reflection according to certain physical laws based on the physical properties of the filament reflected by these parameters. These physical laws are based on optical principles, considering factors such as the light absorption and reflection characteristics of material M, and the differences in reflection of different wavelengths of light by color C. Simulate different lighting conditions, such as different light intensities I and light angles. The light reflection data R of the silk thread under these conditions, such as illumination time t, was recorded and stored in a light reflection database. This database is an important basis for subsequent modeling, as it comprehensively considers the individual physical characteristics of the silk thread and the influence of different illumination conditions on light reflection.
[0047] When the only collected physical property parameters are the thread material M, color C, curvature B, and elastic modulus E, the light reflection data R can be expressed as:
[0048] ,
[0049] in, It is a light absorption and reflection ratio function determined by the material M; different materials M have different absorption and reflection characteristics. It is color C for different wavelengths The light reflection difference function reflects the effect of color on light reflection; It is a function of the curvature B affecting the angle of light reflection; the curvature changes the angle of light reflection on the surface of the thread. It is a function of the elastic modulus E that affects the propagation and reflection path of light between the filament layers, and is related to the deformability of the filament; It is related to light intensity I and light angle The illumination effect function related to illumination time t.
[0050] Step 1.3: Based on the reflection data of the threads in the light reflection database, and using the Monte Carlo ray tracing algorithm, predict the dynamic light perception changes of different density thread layers under light illumination, and generate corresponding dynamic light perception change curves, thereby establishing a dynamic light perception prediction model. The Monte Carlo ray tracing algorithm is a probabilistic statistical method that simulates the propagation path, multiple reflections, and scattering of light in different density thread layers by randomly selecting the propagation path and reflection direction of light, and through extensive sampling and statistics. This algorithm focuses on the propagation and interaction of light in different density thread layers, paying attention to the dynamic light perception changes of the entire thread layer system under light illumination, rather than just the reflection of individual threads. Through the simulation of this algorithm, the light perception changes of the thread layers can be predicted more accurately, and the generated dynamic light perception change curves can intuitively show the dynamic changes of light perception of different density thread layers under light illumination over time or other factors.
[0051] Let the linear density of the silk be... The dynamic light sensitivity L can be calculated by averaging multiple samples, as shown in the following formula:
[0052] ,
[0053] Where N is the number of Monte Carlo samplings; It is the light reflection data obtained from the i-th sampling; It is the linear density of the silk. The function affecting light perception; different wire densities will lead to different changes in light perception. It is data on light reflection. The function contributing to light perception reflects the influence of light reflection on light perception.
[0054] After establishing the dynamic light-sensing prediction model, the predicted results can be compared with actual data in the light reflection database. If there is a significant deviation between the model's predictions and the data in the database, the model can be adjusted and optimized. Through continuous verification and optimization, the dynamic light-sensing prediction model can more accurately reflect the dynamic light-sensing changes of different density filament layers under light illumination.
[0055] For step 2, a convolutional neural network (CNN) is used to perform multi-resolution decomposition of the original pattern of the decorative tapestry, extracting microscopic texture features and macroscopic morphological features, and calculating the correlation matrix between them. Based on the correlation matrix, a texture feature map with cross-scale correlation is generated. Specifically, this includes the following sub-steps:
[0056] Step 2.1: The original pattern is decomposed into multiple sub-images of different resolutions using a convolutional neural network (CNN). Microscopic texture features and macroscopic morphological features are extracted from these sub-images. Users can draw simple sketches using graphic design software or upload existing images, from which the system retrieves the original pattern. The original pattern includes microscopic texture features and macroscopic morphological features. Microscopic texture features reflect the detailed information of the pattern, such as the fine lines of the threads and the arrangement of fibers; macroscopic morphological features reflect the overall structure and shape of the pattern, such as the overall outline, shape, and layout of the tapestry pattern. CNNs have powerful feature extraction capabilities, extracting features at different scales by sliding convolutional kernels of different sizes across the sub-images. For example, small convolutional kernels focus on details and can extract microscopic texture features, while large convolutional kernels focus on the overall picture and can extract macroscopic morphological features.
[0057] Let the sub-image be S, and the micro-texture features be... and macroscopic morphological characteristics It can be extracted using the following formula:
[0058] ,
[0059] ,
[0060] Where J and K are the number of convolutional kernels used to extract micro and macro features, respectively; and These are the corresponding convolutional kernel weights; and They are respectively the size of and The convolution operation uses small convolution kernels to extract micro-texture features and large convolution kernels to extract macro-morphological features.
[0061] Step 2.2: Calculate the correlation matrix between microscopic texture features and macroscopic morphological features. Based on the correlation matrix, fuse the microscopic texture features and macroscopic morphological features to generate a texture feature map with cross-scale correlation. The correlation matrix reflects the relationship between the two types of features. The introduction of this cross-scale correlation allows the generated texture image to maintain reasonable correlation at both the microscopic and macroscopic levels, avoiding problems such as missing details or overall morphological inconsistency, and improving the realism and logicality of the texture.
[0062] The correlation matrix A between micro-texture features and macro-morphological features is calculated as follows:
[0063] ,
[0064] Where P and Q are the dimensions of the micro and macro feature matrices, respectively; The value at position (p, q) of the microscopic feature matrix; The value at position (p, q) in the macroscopic feature matrix; and These are the mean values of microscopic texture features and macroscopic morphological features, respectively. .
[0065] Based on the correlation matrix A, a texture feature map T with cross-scale correlation is generated:
[0066] .
[0067] For step 3, the texture feature map is input into the generative adversarial network and trained adversarially by combining the output parameters of the dynamic light perception prediction model. The generative adversarial network learns the distribution pattern of texture features and takes into account the influence of dynamic light perception. Finally, it generates a multi-layered virtual texture image of silk threads with physical property perception, making the texture image more consistent with the actual physical scene.
[0068] First, the texture feature map generated in step 2 is input into a Generative Adversarial Network (GAN). The GAN consists of a generator and a discriminator. The generator is responsible for generating virtual texture images based on the input texture feature map, while the discriminator is responsible for determining whether the generated images are realistic. Next, combining the dynamic light perception parameters output by the dynamic light perception prediction model in step 1, the generator's performance is continuously optimized through adversarial training between the generator and the discriminator. This enables the GAN to generate multi-layered virtual texture images of silk threads with physical property awareness. The dynamic light perception parameters include information on the light perception changes of the silk threads at different densities.
[0069] During adversarial training, the generator and discriminator continuously adjust the generated texture image through adversarial training. This ensures that the generated image not only possesses the texture features extracted in step 2 but also reflects the simulated physical light characteristics in step 1, ultimately generating a multi-layered virtual texture image with physical property awareness. Specifically, the generator attempts to generate textures that more closely resemble real images, while the discriminator continuously improves its judgment capabilities. The two work in a game of mutual competition, eventually reaching a balance and generating a high-quality virtual texture image. This combination makes the texture image not only realistic in texture but also reflects the realistic effects of lighting.
[0070] Specifically, the texture feature map T is input into the generative adversarial network (GAN), and adversarial training is performed using the output parameters L of the dynamic light perception prediction model. Let the loss functions of the generator G and the discriminator D be respectively... and :
[0071] ,
[0072] ,
[0073] in, It is random noise; is the distribution of random noise; x is the real image data; It is the distribution of real images. This application minimizes... To make the generated image realistic, minimize Improve the accuracy of judgment.
[0074] For step 4, pixel gradient analysis is performed on the virtual texture image. An improved ant colony algorithm is used to plan the optimal coverage path of the silk threads on the tapestry. Simultaneously, a non-linear mapping relationship between path density and texture sharpness is established. Finally, a vector diagram of the silk thread direction, including tension compensation parameters, is generated to guide actual embroidery or material laying operations, thereby achieving the desired visual effect, such as presenting a clear and realistic texture. Specifically, this includes the following sub-steps:
[0075] Step 4.1: Based on the virtual texture image generated in Step 3, analyze its pixel gradient distribution and calculate the gradient value of each pixel in the image. Pixel gradient reflects the changes in texture pixel values in the image, revealing the edges and details of the texture. At edges, pixel values change significantly, resulting in higher gradient values; while in flat areas, pixel values change only slightly, leading to lower gradient values. In-depth analysis of the pixel gradient distribution provides a comprehensive understanding of the texture's boundaries and shape, offering crucial information for subsequent planning of the silk thread coverage path.
[0076] Let the virtual texture image be Pixel gradient of pixel (x, y) The calculation is as follows:
[0077] .
[0078] Step 4.2 employs an improved ant colony algorithm to calculate the optimal silk-line coverage path based on the pixel gradient distribution. Specifically, based on the pixel gradient distribution analyzed in Step 4.1, the improved ant colony algorithm performs a comprehensive search in the complex path space. This algorithm comprehensively considers pixel gradient information to find the optimal silk-line coverage path that accurately represents the details of the texture image. During this process, the improved ant colony algorithm continuously evaluates the merits of each path, gradually approaching the optimal solution.
[0079] Ant colony optimization (ACO) is a global optimization algorithm that simulates the foraging behavior of ants. During the simulation, ants leave pheromones along their paths while searching for food. Subsequent ants choose paths based on pheromone concentration, with paths having higher pheromone concentrations being more likely to be chosen. After multiple iterations, most ants eventually choose the optimal path. The improved ACO algorithm is specifically optimized based on the traditional ACO algorithm to better suit the silk-covering path planning problem. For example, the pheromone update rules are optimized so that pheromones more accurately reflect the quality of paths; the ant transition probabilities are adjusted so that ants can explore the path space more efficiently during the search. These improvements increase the algorithm's search efficiency, enhance its ability to find the optimal path, and ensure that the silk-covering accurately represents the details of the texture image.
[0080] Here is one example, where the probability of an ant moving from node i to node j in the l-th iteration is given. for:
[0081] ,
[0082] in, It represents the pheromone concentration from node i to node j during the l-th iteration; It is a heuristic factor from node i to node j, and is related to the quality of the path; and It is a parameter that regulates the importance of pheromones and heuristic factors; It is the pixel gradient influence factor on the path from node i to node j; k represents the candidate node; This represents the set of all neighboring nodes that an ant is allowed to visit, triggered by node i. It represents the pheromone concentration from node i to node k during the l-th iteration; It is a heuristic factor from node i to node k, and is related to the quality of the path; It is the pixel gradient influence factor on the path from node i to node k.
[0083] Step 4.3 establishes a non-linear mapping relationship between path density and texture sharpness. Different path densities correspond to different texture sharpness effects. Based on this mapping relationship, a suitable path density is determined to achieve the desired texture sharpness effect. Path density refers to the distribution density of the lines in the image, that is, the number or coverage of lines per unit area. Texture sharpness reflects the clarity of the texture; the higher the sharpness, the clearer the texture and the more distinct the edges. For example, increasing path density may make the texture appear clearer and denser, better showcasing texture details, but it may also lead to an overly crowded texture, affecting the overall aesthetics. Conversely, decreasing path density may make the texture blurry and sparse, failing to fully represent the texture's characteristics. Through this mapping relationship, the coverage density of the lines can be dynamically adjusted according to the specific requirements of texture sharpness, thereby achieving precise control over texture sharpness and realizing the ideal visual effect.
[0084] Let the path density be Texture sharpness is The nonlinear mapping relationship can be expressed as:
[0085] ,
[0086] Among them, a, b, c, and d are coefficients determined experimentally.
[0087] Step 4.4 involves considering the tension of the silk threads during the planning process and generating a vector diagram of the silk thread direction, including tension compensation parameters. This vector diagram clearly defines the direction and laying method of the silk threads on the tapestry, accurately guiding the operation of industrial embroidery machines.
[0088] In actual embroidery, the tension of the silk thread can change due to various factors. If the tension is inappropriate, it may cause the thread to loosen or break, severely affecting the quality of the embroidery. Therefore, it is essential to fully consider the tension of the silk thread and set reasonable tension compensation parameters to ensure that the tension of the silk thread is uniform and appropriate during the actual embroidery process.
[0089] Here, the vector diagram V of the silk thread direction includes the silk thread direction. ,density Tension compensation parameters Information such as this can be represented as a multidimensional vector:
[0090]
[0091] For step 5, the vector diagram of the silk thread direction is iteratively optimized using a differentiable rendering engine. The cross angle of the silk threads is dynamically adjusted based on the preset fabric surface friction coefficient, outputting a final control instruction set that conforms to the process constraints of industrial embroidery machines. Specifically, this includes:
[0092] First, the silk thread direction vector map V generated in step 4 is iteratively optimized using the Mitsuba differentiable rendering engine. The Mitsuba differentiable rendering engine can render based on the input silk thread direction vector map and calculate the difference between the rendered result and the preset target (such as the desired texture image effect) in real time. By backpropagating the gradient in a differentiable manner, the parameters of the silk thread direction vector map are continuously adjusted so that the rendering result gradually approaches the expected effect, thereby achieving automatic optimization of the silk thread direction vector map.
[0093] During iterative optimization, the cross angle of the threads is dynamically adjusted based on the preset fabric surface friction coefficient. This takes into account the influence of the physical properties of the fabric surface on the embroidery effect, making the generated texture image more consistent with the expected result. The fabric surface friction coefficient affects the sliding and fixation of the threads during the embroidery process. By adjusting the cross angle, the coverage and texture quality of the threads on the fabric surface can be optimized. For example, for fabrics with a high friction coefficient, the cross angle may need to be reduced to prevent the threads from being unevenly arranged during embroidery; while for fabrics with a low friction coefficient, the cross angle may need to be increased to ensure that the threads adhere tightly to the fabric surface.
[0094] After multiple iterations and optimizations, the final control instruction set is output, conforming to the process constraints of industrial embroidery machines. This final control instruction set includes detailed information such as the direction, density, and crossing angle of the threads, and can be directly used in the actual embroidery operation of the industrial embroidery machine. The industrial embroidery machine can precisely control the movement and arrangement of the threads according to these instructions, thereby achieving the actual production of the thread texture image for decorative tapestries. This self-optimizing output process not only improves the quality of the embroidery pattern but also significantly increases production efficiency and reduces the risk of embroidery failure or poor quality due to process issues.
[0095] Let the rendering result be The preset target is loss function It can be represented as:
[0096] ,
[0097] in, It is the dimension of the rendered result; It is a parameter that adjusts the influence of the friction coefficient; It is the coefficient of friction of the fabric surface. Angle of intersection with silk thread The relevant functions are used to dynamically adjust the thread crossing angle based on the friction coefficient. The parameters of the thread direction vector diagram V are updated through a backpropagation algorithm, ultimately outputting a final control instruction set C that conforms to the process constraints of industrial embroidery machines.
[0098] .
[0099] The final control instruction set C is represented by G-code that can be executed by industrial embroidery machines. Through digital instructions such as coordinate positioning, speed parameters, and tension parameters, it achieves precise control over the needle trajectory, embroidery rhythm, and physical state of the silk thread.
[0100] This invention also proposes an intelligent generation system for silk thread texture images for decorative tapestries, comprising: a dynamic light-sensing prediction module, a texture feature map generation module, an image generation module, a path planning module, and an instruction output module.
[0101] The dynamic light perception prediction module includes: a parameter collection unit, used to collect basic physical property parameters such as material, color, curvature, and elastic modulus of different types of yarns; a database construction unit, which uses a physical property simulation engine to simulate the light reflection of yarn materials under different lighting conditions based on the collected yarn physical property parameters, and constructs a light reflection database of yarn materials; and a model building unit, based on the Monte Carlo ray tracing algorithm, predicts the dynamic light perception changes of yarn layers of different densities under light illumination based on the yarn reflection data in the light reflection database, generates dynamic light perception change curves, establishes a dynamic light perception prediction model, and verifies and optimizes the model.
[0102] The texture feature map generation module includes: a feature extraction unit, which uses a convolutional neural network to decompose the original pattern into multiple sub-images of different resolutions, and extracts micro-texture features and macro-morphological features respectively. The micro-texture features reflect the detailed information of the pattern, while the macro-morphological features reflect the overall structure and shape of the pattern.
[0103] The map generation unit calculates the correlation matrix between micro-texture features and macro-morphological features, and fuses the two features based on the correlation matrix to generate a texture feature map with cross-scale correlation.
[0104] The image generation module includes: an adversarial training unit, which inputs the texture feature map into the generative adversarial network and performs adversarial training by combining the output parameters of the dynamic light perception prediction model, so that the generative adversarial network learns the distribution law of texture features and takes into account the influence of dynamic light perception; and an image output unit, which generates a multi-layered virtual texture image of silk threads with physical property perception.
[0105] The path planning module includes: a gradient analysis unit, which performs pixel gradient analysis on the virtual texture image and calculates the gradient value of each pixel in the image; a path calculation unit, which uses an improved ant colony algorithm to calculate the optimal silk thread coverage path based on the pixel gradient distribution; a mapping relationship establishment unit, which establishes a nonlinear mapping relationship between path density and texture sharpness to determine a suitable path density; and a vector graphic generation unit, which considers the tension of the silk thread and generates a vector graphic of the silk thread direction including tension compensation parameters.
[0106] The instruction output module includes: an optimization unit that iteratively optimizes the yarn direction vector image using a differentiable rendering engine; an angle adjustment unit that dynamically adjusts the yarn crossing angle based on a preset fabric surface friction coefficient; and an instruction output unit that outputs the final control instruction set that conforms to the process constraints of industrial embroidery machines.
[0107] The beneficial effects of this invention are as follows:
[0108] A light reflection database was constructed by collecting various parameters of the silk threads. A dynamic light perception prediction model was established based on the Monte Carlo ray tracing algorithm. After verification and optimization, it can accurately reflect the dynamic light perception changes of silk thread layers with different densities under light illumination, thus enhancing the realism of the texture.
[0109] Convolutional neural networks are used to decompose the original pattern of decorative tapestry at multiple resolutions, extract micro and macro texture features and calculate the correlation matrix to generate cross-scale correlated texture feature maps, avoiding missing details or overall inconsistency, and improving the realism and logic of texture.
[0110] By inputting the texture feature map into the generative adversarial network and combining it with the output parameters of the dynamic light-sensing prediction model for adversarial training, the generated virtual texture image is made to have realistic texture and reflect the real effect of light, thus improving image quality.
[0111] Pixel gradient analysis is performed on virtual texture images, and an improved ant colony algorithm is used to plan the optimal coverage path, which improves search efficiency and the ability to find the optimal path, ensuring accurate rendering of texture details. At the same time, a non-linear mapping relationship between path density and texture sharpness is established to precisely control texture sharpness.
[0112] When planning, the tension of the silk thread is taken into account, and a vector diagram of the silk thread direction with tension compensation parameters is generated to clarify the direction and laying method of the silk thread, so as to ensure that the tension of the silk thread is uniform and appropriate in actual embroidery, avoid slack or breakage, and improve the quality of embroidery.
[0113] By iteratively optimizing vector graphics through a differentiable rendering engine, the cross angle of the threads is dynamically adjusted according to the friction coefficient of the fabric surface, and a set of control instructions containing detailed information such as thread direction, density, and cross angle is output. This can be directly used for actual embroidery on industrial embroidery machines to realize the actual production of decorative tapestry thread texture images.
[0114] In summary, this invention achieves intelligent generation of silk thread texture images for decorative tapestries. From simulating the physical properties of the silk threads to finally generating a control instruction set that meets industrial production requirements, the entire process is highly automated and accurate, effectively improving the efficiency and quality of tapestry production. Furthermore, this method is not only applicable to the generation of silk thread texture images but can also be extended to other scenarios requiring the simulation of complex material visual effects and the planning of process paths.
[0115] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligently generating silk thread texture images for decorative tapestries, characterized in that, include: Step 1: Collect basic physical property parameters of different types of yarns, use a physical property simulation engine to simulate the light reflection of yarn materials under different lighting conditions, and build a light reflection database of yarn materials; based on the Monte Carlo ray tracing algorithm, predict the dynamic light perception changes of yarn layers of different densities under light irradiation according to the yarn reflection data in the light reflection database, and generate a dynamic light perception prediction model. Step 2: Use a convolutional neural network to decompose the original pattern of the decorative tapestry into multiple sub-images of different resolutions, extract micro-texture features and macro-morphological features respectively, calculate the correlation matrix between them, and generate a texture feature map with cross-scale correlation based on the correlation matrix. Step 3: Input the texture feature map into the generative adversarial network, combine it with the output parameters of the dynamic light-sensing prediction model for adversarial training, and generate a multi-layered virtual texture image of silk threads with physical property awareness. Step 4 involves performing pixel gradient analysis on the virtual texture image, using an improved ant colony algorithm to plan the optimal coverage path of the silk threads on the tapestry, establishing a non-linear mapping relationship between path density and texture sharpness, and considering the tension of the silk threads to generate a silk thread direction vector map including tension compensation parameters. Specifically, Step 4 includes: first, performing pixel gradient analysis on the virtual texture image, calculating the gradient value of each pixel, and determining the edge and detail information in the virtual texture image by analyzing the changes in texture pixel values; then, using an improved ant colony algorithm to plan the optimal silk thread coverage path; next, establishing a non-linear mapping relationship between path density and texture sharpness, and dynamically adjusting the path density according to visual effect requirements to achieve precise control of texture sharpness; finally, the generated silk thread direction vector map not only clearly defines the laying direction and density of the silk threads but also includes tension compensation information for different path segments, ensuring the uniformity and stability of the silk threads during the actual laying process. Step 5: Iteratively optimize the vector diagram of the silk thread direction using a differentiable rendering engine, dynamically adjust the cross angle of the silk threads according to the preset friction coefficient of the fabric surface, and output the final control instruction set that conforms to the process constraints of industrial embroidery machines.
2. The intelligent generation method for silk thread texture images for decorative tapestries as described in claim 1, characterized in that, In step 1, firstly, based on the light absorption and reflection ratio characteristics of the filament material, combined with the color difference in the reflection of different wavelengths of light, and the influence of curvature on the light reflection angle, the effect of elastic modulus on the propagation path of light between filament layers is comprehensively considered to generate comprehensive light reflection data under different lighting conditions. Subsequently, using the Monte Carlo ray tracing algorithm, light reflection data was obtained through multiple samplings. The relationship between the influence of filament density on light perception and the contribution of light reflection data to light perception was then combined to finally generate a dynamic light perception change curve.
3. The intelligent generation method for silk thread texture images for decorative tapestries as described in claim 1, characterized in that, In step 2, when extracting the micro-texture features and macro-morphological features of the original pattern of the decorative tapestry using a convolutional neural network, different sizes of convolutional kernels are used to focus on details and overall structure respectively. Small convolutional kernels slide on the sub-image to capture details of fine textures and fiber arrangement; large convolutional kernels slide on the sub-image to extract the overall outline and shape.
4. The intelligent generation method for silk thread texture images for decorative tapestries as described in claim 1, characterized in that, In step 2, the correlation matrix between micro-texture features and macro-morphological features is calculated to describe the strength of the relationship between the two features at each corresponding position. During the calculation, the mean values of micro-texture features and macro-morphological features are calculated respectively, and the degree of difference between the two at each position is measured based on this. Finally, based on the above correlation matrix, the micro-texture features and macro-morphological features are fused to generate a texture feature map with cross-scale correlation.
5. The intelligent generation method for silk thread texture images for decorative tapestries as described in claim 1, characterized in that, In step 3, a Generative Adversarial Network (GAN) is used for training: the generator receives randomly generated noisy data as input and combines it with texture feature maps and dynamic light-sensing prediction model parameters to try to generate a virtual texture image that is as close as possible to the real image; the discriminator receives the virtual texture image generated by the generator and the real image as input, and continuously improves its judgment ability by learning to distinguish the differences between the two; the generator and the discriminator continuously optimize through mutual game, improving the realism of the generated virtual texture image by minimizing the generator's loss function, and enhancing the judgment accuracy by minimizing the discriminator's loss function, thus achieving a balance between the two.
6. The intelligent generation method for silk thread texture images for decorative tapestries as described in claim 5, characterized in that, The texture feature map T is input into the generative adversarial network (GAN), and adversarial training is performed using the output parameters L of the dynamic light perception prediction model. Let the loss functions of the generator G and the discriminator D be respectively... and : , , in, It is random noise; is the distribution of random noise; x is the real image data; It represents the distribution of real images.
7. The intelligent generation method for silk thread texture images for decorative tapestries as described in claim 1, characterized in that, In step 5, the rendering result is first compared with the preset target, and the difference between the two is calculated. Subsequently, the parameters of the yarn direction vector diagram are adjusted by using the rendering difference value through the backpropagation algorithm, so that the rendering result gradually approaches the preset target. At the same time, the influence of the fabric surface friction coefficient on the yarn crossing angle is considered, and the yarn crossing angle is dynamically adjusted to adapt to fabric surfaces with different friction characteristics. After multiple iterations and optimizations, the final control instruction set is output. This instruction set is presented in the form of executable code for industrial embroidery machines, and the needle is precisely controlled through digital instructions.
8. The intelligent generation method for silk thread texture images for decorative tapestries as described in claim 7, characterized in that, Let the rendering result be The preset target is loss function It can be represented as: , in, V represents the dimension of the rendered result; V is the vector diagram showing the direction of the silk threads. It is a parameter that adjusts the influence of the friction coefficient; It is the coefficient of friction of the fabric surface. Angle of intersection with silk thread The relevant function is used to dynamically adjust the cross angle of the threads based on the coefficient of friction.
9. A system employing any one of the intelligent generation methods for silk thread texture images used in decorative tapestries according to claims 1 to 8, characterized in that, include: The dynamic light sensing prediction module is used to predict dynamic light sensing changes under different lighting conditions and build a prediction model based on the physical property parameters of the silk thread using the Monte Carlo ray tracing algorithm. The texture feature map generation module is used to extract the micro-texture features and macro-morphological features of the original pattern using a convolutional neural network, and fuse them to generate a cross-scale related texture feature map. The image generation module is used to input the texture feature map and the output parameters of the dynamic light-sensing prediction model into the generative adversarial network to generate a multi-layered virtual texture image with physical property awareness. The path planning module is used to perform pixel gradient analysis on virtual texture images, calculate the optimal silk thread coverage path using an improved ant colony algorithm, and generate a silk thread direction vector map including tension compensation parameters. The instruction output module is used to iteratively optimize the vector diagram of the silk thread direction through a differentiable rendering engine, and dynamically adjust the cross angle of the silk threads according to the friction coefficient of the fabric surface, so as to output a set of control instructions that conform to the process constraints of industrial embroidery machines.