Carpet printing multi-level accurate positioning method based on image processing

By combining convolutional neural networks, random forest algorithms, and mean-shift clustering algorithms, the CNN-RF model was developed to achieve precise positioning and dynamic error correction of multi-layer patterns in carpet printing. This solved the problem of positioning error accumulation in multi-layer pattern printing and improved production efficiency and finished product quality.

CN121661137AInactive Publication Date: 2026-03-13SHANDONG POLYTECHNIC COLLEGE +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-03-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing carpet printing methods struggle to handle the accumulation of positioning errors between pattern layers in multi-layer pattern printing, and static image processing methods cannot adapt to changes in the production environment, resulting in fluctuations in positioning accuracy and a lack of flexibility and adaptability.

Method used

A CNN-RF model combining convolutional neural networks, random forest algorithms, and mean-shift clustering algorithms is used to achieve accurate localization and error correction of multi-layer patterns through real-time monitoring and dynamic adjustment. A localization avoidance scheme is designed to optimize the alignment relationship.

Benefits of technology

It improves the positioning accuracy in the carpet printing process, reduces error accumulation, enhances production efficiency and finished product quality, and reduces the need for manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661137A_ABST
    Figure CN121661137A_ABST
Patent Text Reader

Abstract

The invention discloses a carpet printing multi-level accurate positioning method based on image processing. The method comprises the following steps: S1, collecting and preprocessing a carpet image; s2, extracting pattern features by using a convolutional neural network, and performing classification through a random forest algorithm to obtain pattern feature tags; s3, performing mean shift clustering on the pattern feature tag, identifying a central point and a region boundary, and constructing a CNN-RF model to complete a pre-training process; s4, calculating a deviation according to a clustering result, correcting the error through a CNN-RF model, and adjusting positioning to realize pattern alignment; s5, designing and applying a positioning avoidance scheme, and optimizing a pattern alignment relationship; s6, the alignment deviation in the printing process is monitored, and the positioning strategy is adjusted in real time; and S7, adjusting clustering parameters and feature classification rules, and realizing accurate positioning of dynamically optimized pattern levels. The carpet printing multi-layer pattern alignment precision is improved, manual intervention is reduced, and the production efficiency and the product quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of digital image processing and intelligent manufacturing technology, and in particular to a method for multi-layer precise positioning in carpet printing based on image processing. Background Technology

[0002] With the continuous development of automated production technology, the carpet printing industry has an increasing demand for precise positioning technology. Traditional carpet printing processes rely on manual adjustment and mechanical equipment control to achieve pattern alignment and positioning. While this method addresses the needs of carpet pattern printing to some extent, its limitations are becoming increasingly apparent as pattern complexity increases and production precision requirements rise, especially in the printing of multi-layered patterns where positioning accuracy is difficult to guarantee effectively. Specifically, traditional positioning methods struggle to handle minute errors between pattern layers, leading to reduced print quality and decreased production efficiency.

[0003] Currently, precise positioning of multi-layered patterns in carpet printing still faces numerous technical challenges. First, due to the variations in carpet surface shape and texture, traditional methods often result in deviations when dealing with complex patterns. These deviations not only affect the overall effect of the pattern but can also lead to misalignment or overlap between different pattern layers, significantly reducing the quality of the finished product. Second, traditional methods largely rely on manual calibration, which is inefficient and prone to human error, especially in mass production where manual adjustments struggle to ensure precise alignment of each pattern layer. Furthermore, traditional mechanical control methods often lack the precision required for precise adjustments, preventing timely correction of minor errors between printing layers and consequently affecting the overall product accuracy.

[0004] In recent years, with the rapid development of image processing and deep learning technologies, image processing-based positioning methods have gradually become an effective means of solving this problem. Utilizing image processing techniques, especially advanced methods such as Convolutional Neural Networks (CNN) and Random Forests (RF), image features can be analyzed more accurately, and each layer of the pattern can be precisely located and corrected. In particular, image-based multi-layer positioning methods have significant advantages in solving pattern misalignment problems and improving production efficiency. Through the acquisition and processing of image data, the positional changes of each pattern layer can be detected in real time, and adjustments can be made based on real-time feedback, thereby significantly improving the positioning accuracy in the carpet printing process.

[0005] However, while existing image processing-based positioning methods have improved positioning accuracy in carpet printing to some extent, their application in multi-layer pattern printing still has some shortcomings. First, most existing methods only optimize the positioning of single-layer patterns, failing to effectively consider the interrelationships between different pattern layers in multi-layer printing. In multi-layer pattern printing, positioning errors may accumulate due to changes in pattern features, blurring of pattern edges, and other factors at different layers. Existing methods struggle to handle the continuity and hierarchical nature of these errors. Furthermore, existing methods often employ static image data processing, which cannot adapt to changes in the production environment in real time, such as variations in carpet surface morphology and minor vibrations of the printing equipment. These factors can cause fluctuations in positioning accuracy, affecting print quality.

[0006] Furthermore, most existing image processing algorithms rely on single techniques and lack comprehensive correction mechanisms. For example, while image processing techniques can effectively extract pattern features and perform preliminary localization, in multi-layer pattern printing, the complex spatial relationships between each layer make it difficult to achieve precise alignment between layers using only feature extraction and classification algorithms. Moreover, existing methods lack effective localization avoidance schemes and cannot dynamically adjust the pattern based on the trend of changes in the correction amount, resulting in a lack of flexibility and adaptability in the localization correction strategy. Therefore, designing a localization scheme that can monitor, accurately correct, and dynamically adjust in real time has become a significant challenge in current technology.

[0007] Therefore, how to provide a method for precise multi-layer positioning in carpet printing based on image processing is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0008] One objective of this invention is to propose a multi-layer precise positioning method for carpet printing based on image processing. This invention fully utilizes convolutional neural networks, random forest algorithms, mean-shift clustering algorithms, and CNN-RF models, detailing how image processing technology can be used to accurately locate carpet patterns and dynamically correct positioning errors during the printing process. By performing real-time positioning and error correction for each layer of the pattern, combined with a positioning avoidance scheme, precise alignment between multiple layers of patterns is ensured. This method possesses advantages such as high precision, high efficiency, and strong adaptability, significantly improving pattern positioning accuracy in carpet printing, reducing manual intervention, optimizing the alignment relationship of multiple layers of patterns, and enhancing production efficiency and finished product quality.

[0009] A method for precise positioning of multiple layers in carpet printing based on image processing according to an embodiment of the present invention includes the following steps: S1. Collect carpet image data and perform preprocessing; S2. Based on the preprocessed image data, use a convolutional neural network to extract pattern features, and use a random forest algorithm to classify the pattern features to obtain the pattern feature labels for each layer of printing. S3. Perform mean-shift clustering on the pattern feature labels to identify the center points of each pattern layer, determine the regional boundaries of each printing layer, and construct a CNN-RF model to complete the pre-training process. S4. Based on the clustering results, calculate the deviation of each pattern region relative to the target position, and use the CNN-RF model to correct the error and adjust the positioning of the pattern to achieve accurate alignment of multi-layer patterns. S5. Based on the error correction results, design a positioning avoidance scheme and apply the positioning avoidance scheme to the next pattern printing process to optimize the alignment relationship between multiple layers of patterns. S6. Monitor the alignment deviation of each layer of pattern during the pattern printing process, and calculate the deviation in real time using a CNN-RF model to adjust the pattern positioning strategy and ensure precision control during the printing process. S7. Based on real-time monitoring data, adjust the clustering parameters in the mean-shift clustering algorithm and the feature classification rules in the random forest algorithm to achieve dynamically optimized pattern hierarchy precise positioning.

[0010] Optionally, the image data includes overall, local, edge, texture, color distribution, and geometric features.

[0011] Optionally, the preprocessing includes denoising, grayscale conversion, and normalization.

[0012] Optionally, S2 specifically includes: S21. Perform convolution operation on the preprocessed image data through a convolutional neural network, use the convolution kernel to extract features from the image, and use the ReLU activation function to perform non-linear mapping on the convolution result to obtain the feature map of the image. S22. The feature map of the image is input into the pooling layer to perform max pooling. The pooling result is passed to the next layer of the network. Through multiple convolution and pooling operations, a multi-level image feature representation is obtained. The multi-level image feature representation is then input into the random forest algorithm for feature classification. The classification process is as follows: Image data is labeled by constructing a training dataset, and a corresponding classification rule is generated for each category. The training dataset includes image features extracted from the image data and corresponding pattern category labels. A random forest model is constructed and trained, which includes multiple decision trees. After the decision trees are trained, each decision tree is applied to the input image features to classify the image and output the classification result of each decision tree. S23. After classifying the features of each layer of pattern, a voting mechanism is used to integrate the classification results. For each layer of printed pattern feature label, the classification results output by all decision trees will be used to obtain the final classification label through voting. The final category label is the category with the most occurrences among all decision tree output results.

[0013] Optionally, the image features include overall, local, edge, texture, color distribution, and geometric features, and the pattern category label indicates the category to which each layer of printed pattern belongs.

[0014] Optionally, the decision tree training method is as follows: First, a subset of data is randomly selected from the training dataset, and features are selected from it for splitting. The information gain criterion is used to select the optimal feature to split the node. Next, each decision tree gradually builds a tree structure through split nodes, and finally determines the classification label at the leaf node; Finally, each decision tree outputs a pattern category label based on the image features.

[0015] Optionally, S3 specifically includes: S31. Perform mean-shift clustering on the pattern feature labels, initializing each layer of printed pattern feature labels as a separate cluster center according to their spatial location. The spatial location of each pattern feature label is represented as a point. ,in and Let be the coordinates of the pattern feature label in the image. During initialization, it is assumed that each pattern feature label corresponds to an independent cluster, and the center point of each cluster is the position of the pattern feature label. S32, Set the initial window size As a bandwidth parameter for clustering, the distance from each feature label to all other feature labels in its neighborhood is calculated, and the weight of each point is determined based on the bandwidth parameter: ; in, Point and points The weights between them For the bandwidth of the Gaussian kernel, This refers to the spatial dimension, which is typically 2 or 3. The bandwidth parameter is the Euclidean distance between two points. Control the rate of weight decay; S33. Iteratively update the cluster centers using the mean shift algorithm. For each cluster center, the new cluster center is obtained by calculating the weighted average position of all points in its neighborhood. ; in, Representing cluster centers The neighborhood, It is the weight value, representing the point. With cluster center The weighting relationship between them Indicates the updated cluster centers. Indicates "belongs to"; The cluster centers are updated iteratively until their positions no longer change significantly. S34. After all cluster centers converge, identify the center point of each pattern layer and delineate the region boundary of each printing layer based on the cluster centers. The region of the pattern layer is determined by the cluster centers and the feature labels in the neighborhood. The region boundary is determined by selecting the feature labels around the cluster centers. S35. Based on the mean-shift clustering results, construct a CNN-RF model and complete the pre-training process. The CNN-RF model is trained using the clustered pattern feature data, optimizes the ability of the convolutional neural network to extract pattern features, and classifies the pattern of each printing layer using the random forest algorithm, thereby obtaining accurate pattern layer positioning results.

[0016] Optionally, S4 specifically includes: S41. Based on the mean-shift clustering results, compare the cluster center of each pattern region with the target location, and calculate the deviation of each pattern region relative to the target location: ; in, Indicates the first Deviation of each pattern area and The first The cluster center of each pattern region and coordinate, and The target locations are respectively and coordinate; S42. Error correction is performed on the deviation of each pattern region using a CNN-RF model. The CNN-RF model generates error correction rules based on the clustering results and the calculated deviation. The CNN part extracts high-dimensional features of the pattern region, and the RF part uses these features to classify and regress the error correction, generating correction parameters for each pattern region. S43, Assume the correction parameter is... , indicating the first The positioning correction amount for each pattern area will be adjusted by the correction parameters. Apply to the pattern area to adjust the positioning of each pattern area: ; in, and The center position of the adjusted pattern area. and The correction parameters are the output of the CNN-RF model. The corrected pattern area location; By correcting the deviation in all pattern areas, precise alignment of multi-layer patterns is ensured. S44. Based on the corrected pattern position, update the pattern hierarchy and area boundaries to ensure that the alignment between all pattern layers is accurately maintained in the subsequent printing process.

[0017] Optionally, S5 specifically includes: S51. Based on the error correction results, obtain the correction amount change trend of each pattern area. The correction amount change trend is obtained by comparing the current correction result with the historical correction data. If the current correction amount and the historical correction amount differ greatly, it indicates that there is a large positioning deviation in the pattern area. Conversely, it indicates that the correction effect is relatively stable. S52. Based on the trend of the correction amount change, design a positioning avoidance scheme. For areas with large correction amounts, adopt a dynamic adjustment strategy: For areas with large changes in correction amount, increase the correction sensitivity of the area, enhance the correction accuracy of the algorithm, adjust the positioning of the pattern in real time, and avoid the accumulation of errors; For areas where the correction amount changes little, small-scale fine-tuning is used to avoid unnecessary over-correction and ensure the stability of alignment accuracy. During pattern positioning, for areas in historical data where the correction amount changes significantly but remains temporarily stable, a dynamic correction step size adjustment strategy is adopted to control the correction step size, so that the positioning correction gradually approaches the final accurate position and avoids over-correction. S53. Apply the generated positioning avoidance scheme to the next pattern printing process, and continue to correct the positioning of each layer of pattern to optimize the alignment relationship between multiple layers of patterns.

[0018] Optionally, the positioning avoidance scheme analyzes the trend of correction amount changes in each pattern area, increases correction sensitivity for areas with large correction amounts, dynamically adjusts the correction step size, and maintains a stable fine-tuning strategy for areas with small correction amounts, thereby ensuring accurate alignment of each layer of patterns during the printing process, avoiding the accumulation of errors and unnecessary over-correction, and improving the alignment accuracy between multiple layers of patterns.

[0019] The beneficial effects of this invention are: First, this invention proposes a novel CNN-RF model by combining convolutional neural networks and random forest algorithms for efficient extraction of depth features from carpet patterns and accurate pattern classification and localization. This model fully leverages the powerful feature extraction capabilities of convolutional neural networks to conduct in-depth analysis of carpet pattern details, while the combination of a random forest algorithm for feature classification ensures high-precision localization of multi-layered patterns during the printing process.

[0020] Secondly, this invention uses a mean-shift clustering algorithm to accurately divide the pattern into layers, effectively identifying the center point and boundary of each pattern region. Combined with the localization correction capability of the CNN-RF model, this invention can correct pattern deviations in real time during the printing process, ensuring precise alignment of each layer of the pattern. Especially in the printing of complex multi-layered patterns, precise localization correction significantly reduces error accumulation and improves the pattern matching accuracy.

[0021] Finally, leveraging the intelligent characteristics of the CNN-RF model, this invention can dynamically optimize the correction strategy for each pattern region and intelligently adjust the correction step size and strategy during the printing process based on the positioning and avoidance scheme. By analyzing the trend of correction amount changes, this invention achieves automated error correction, reduces the need for manual intervention, significantly improves production efficiency, reduces the error rate, and effectively enhances the quality of the final product. Attached Figure Description

[0022] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0023] Figure 1 This is a flowchart of a multi-layer precise positioning method for carpet printing based on image processing proposed in this invention; Figure 2 This is a flowchart of pattern feature classification for a multi-layer precise positioning method for carpet printing based on image processing proposed in this invention. Figure 3 This is a flowchart illustrating the mean-shift clustering and CNN-RF model construction process of a multi-level precise positioning method for carpet printing based on image processing proposed in this invention. Detailed Implementation

[0024] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0025] refer to Figure 1-3A method for precise multi-layer positioning in carpet printing based on image processing includes the following steps: S1. Collect carpet image data and perform preprocessing; S2. Based on the preprocessed image data, use a convolutional neural network to extract pattern features, and use a random forest algorithm to classify the pattern features to obtain the pattern feature labels for each layer of printing. S3. Perform mean-shift clustering on the pattern feature labels to identify the center points of each pattern layer, determine the regional boundaries of each printing layer, and construct a CNN-RF model to complete the pre-training process. S4. Based on the clustering results, calculate the deviation of each pattern region relative to the target position, and use the CNN-RF model to correct the error and adjust the positioning of the pattern to achieve accurate alignment of multi-layer patterns. S5. Based on the error correction results, design a positioning avoidance scheme and apply the positioning avoidance scheme to the next pattern printing process to optimize the alignment relationship between multiple layers of patterns. S6. Monitor the alignment deviation of each layer of pattern during the pattern printing process, and calculate the deviation in real time using a CNN-RF model to adjust the pattern positioning strategy and ensure precision control during the printing process. S7. Based on real-time monitoring data, adjust the clustering parameters in the mean-shift clustering algorithm and the feature classification rules in the random forest algorithm to achieve dynamically optimized pattern hierarchy precise positioning.

[0026] This invention achieves precise positioning of multi-layer patterns in carpet printing by combining convolutional neural networks and random forest algorithms. By acquiring and preprocessing image data, convolutional neural networks are used to extract pattern features, and random forest algorithms are used to classify these features, ensuring that each layer of the pattern can be correctly identified and positioned, thereby improving printing accuracy.

[0027] In this embodiment, the image data includes overall, local, edge, texture, color distribution, and geometric features.

[0028] This invention employs a variety of image features, including overall, local, edge, texture, color distribution, and geometric features, to make image data more comprehensive and richer, thereby enhancing the ability to extract pattern features and further improving positioning accuracy and the ability to recognize different pattern layers.

[0029] In this embodiment, the preprocessing includes noise reduction, grayscale conversion, and normalization.

[0030] This invention optimizes image quality by denoising, grayscale conversion, and normalization of image data, effectively removing interference factors and ensuring accurate extraction of pattern features in subsequent image processing and localization, thus providing high-quality data input for subsequent classification and localization.

[0031] In this embodiment, S2 specifically includes: S21. Perform convolution operation on the preprocessed image data through a convolutional neural network, use the convolution kernel to extract features from the image, and use the ReLU activation function to perform non-linear mapping on the convolution result to obtain the feature map of the image. S22. The feature map of the image is input into the pooling layer to perform max pooling. The pooling result is passed to the next layer of the network. Through multiple convolution and pooling operations, a multi-level image feature representation is obtained. The multi-level image feature representation is then input into the random forest algorithm for feature classification. The classification process is as follows: Image data is labeled by constructing a training dataset, and a corresponding classification rule is generated for each category. The training dataset includes image features extracted from the image data and corresponding pattern category labels. A random forest model is constructed and trained, which includes multiple decision trees. After the decision trees are trained, each decision tree is applied to the input image features to classify the image and output the classification result of each decision tree. S23. After classifying the features of each layer of pattern, a voting mechanism is used to integrate the classification results. For each layer of printed pattern feature label, the classification results output by all decision trees will be used to obtain the final classification label through voting. The final category label is the category with the most occurrences among all decision tree output results.

[0032] This invention employs a convolutional neural network to perform convolution operations on image data and utilizes the ReLU activation function for nonlinear mapping. Further, pooling operations are used to obtain multi-level image features, and finally, a random forest algorithm is used for classification. The voting mechanism of the decision tree ensures accurate classification of each pattern layer, thereby improving the stability and accuracy of the localization process.

[0033] In this embodiment, the image features include overall, local, edge, texture, color distribution, and geometric features, and the pattern category label indicates the category to which each layer of printed pattern belongs.

[0034] Through these multi-dimensional features, pattern extraction and analysis become more precise. This invention can effectively handle complex pattern hierarchical structures and improve positioning accuracy in multi-layer pattern printing. The use of pattern category labels ensures that each layer of pattern can be accurately identified and classified, thereby avoiding layer misalignment or pattern disorder and improving the stability and accuracy of pattern alignment.

[0035] In this embodiment, the decision tree training method is as follows: First, a subset of data is randomly selected from the training dataset, and features are selected from it for splitting. The information gain criterion is used to select the optimal feature to split the node. Next, each decision tree gradually builds a tree structure through split nodes, and finally determines the classification label at the leaf node; Finally, each decision tree outputs a pattern category label based on the image features.

[0036] The decision tree constructs a tree structure step by step, and finally determines the pattern category label at the leaf node. This process ensures that the classification process of each layer of printed pattern is accurate and reliable. Each decision tree outputs a pattern category label based on image features. The results of multiple decision trees are integrated through a voting mechanism to ensure the accuracy and stability of the classification results, and further improve the positioning accuracy of multi-layer patterns in carpet printing of this invention.

[0037] In this embodiment, S3 specifically includes: S31. Perform mean-shift clustering on the pattern feature labels, initializing each layer of printed pattern feature labels as a separate cluster center according to their spatial location. The spatial location of each pattern feature label is represented as a point. ,in and Let be the coordinates of the pattern feature label in the image. During initialization, it is assumed that each pattern feature label corresponds to an independent cluster, and the center point of each cluster is the position of the pattern feature label. S32, Set the initial window size As a bandwidth parameter for clustering, the distance from each feature label to all other feature labels in its neighborhood is calculated, and the weight of each point is determined based on the bandwidth parameter: ; in, Point and points The weights between them For the bandwidth of the Gaussian kernel, This refers to the spatial dimension, which is typically 2 or 3. The bandwidth parameter is the Euclidean distance between two points. Control the rate of weight decay; S33. Iteratively update the cluster centers using the mean shift algorithm. For each cluster center, the new cluster center is obtained by calculating the weighted average position of all points in its neighborhood. ; in, Representing cluster centers The neighborhood, It is the weight value, representing the point. With cluster center The weighting relationship between them Indicates the updated cluster centers. Indicates "belongs to"; The cluster centers are updated iteratively until their positions no longer change significantly. S34. After all cluster centers converge, identify the center point of each pattern layer and delineate the region boundary of each printing layer based on the cluster centers. The region of the pattern layer is determined by the cluster centers and the feature labels in the neighborhood. The region boundary is determined by selecting the feature labels around the cluster centers. S35. Based on the mean-shift clustering results, construct a CNN-RF model and complete the pre-training process. The CNN-RF model is trained using the clustered pattern feature data, optimizes the ability of the convolutional neural network to extract pattern features, and classifies the pattern of each printing layer using the random forest algorithm, thereby obtaining accurate pattern layer positioning results.

[0038] This invention uses a mean-shift clustering algorithm to cluster pattern feature labels, identifying the center point of each pattern layer and determining the region boundaries. This process accurately divides the pattern of each printing layer, avoiding pattern misalignment. Furthermore, the clustering results are optimized using a CNN-RF model to ensure precise positioning of the pattern layers.

[0039] In this embodiment, S4 specifically includes: S41. Based on the mean-shift clustering results, compare the cluster center of each pattern region with the target location, and calculate the deviation of each pattern region relative to the target location: ; in, Indicates the first Deviation of each pattern area and The first The cluster center of each pattern region and coordinate, and The target locations are respectively and coordinate; S42. Error correction is performed on the deviation of each pattern region using a CNN-RF model. The CNN-RF model generates error correction rules based on the clustering results and the calculated deviation. The CNN part extracts high-dimensional features of the pattern region, and the RF part uses these features to classify and regress the error correction, generating correction parameters for each pattern region. S43, Assume the correction parameter is... , indicating the first The positioning correction amount for each pattern area will be adjusted by the correction parameters. Apply to the pattern area to adjust the positioning of each pattern area: ; in, and The center position of the adjusted pattern area. and The correction parameters are the output of the CNN-RF model. The corrected pattern area location; By correcting the deviation in all pattern areas, precise alignment of multi-layer patterns is ensured. S44. Based on the corrected pattern position, update the pattern hierarchy and area boundaries to ensure that the alignment between all pattern layers is accurately maintained in the subsequent printing process.

[0040] This invention calculates the deviation of each pattern region relative to the target position based on the mean-shift clustering results and corrects the error using a CNN-RF model. This dynamic correction strategy not only precisely adjusts the position of each pattern layer but also ensures accurate alignment between multiple patterns, avoiding the error accumulation problem in traditional methods.

[0041] In this embodiment, S5 specifically includes: S51. Based on the error correction results, obtain the correction amount change trend of each pattern area. The correction amount change trend is obtained by comparing the current correction result with the historical correction data. If the current correction amount and the historical correction amount differ greatly, it indicates that there is a large positioning deviation in the pattern area. Conversely, it indicates that the correction effect is relatively stable. S52. Based on the trend of the correction amount change, design a positioning avoidance scheme. For areas with large correction amounts, adopt a dynamic adjustment strategy: For areas with large changes in correction amount, increase the correction sensitivity of the area, enhance the correction accuracy of the algorithm, adjust the positioning of the pattern in real time, and avoid the accumulation of errors; For areas where the correction amount changes little, small-scale fine-tuning is used to avoid unnecessary over-correction and ensure the stability of alignment accuracy. During pattern positioning, for areas in historical data where the correction amount changes significantly but remains temporarily stable, a dynamic correction step size adjustment strategy is adopted to control the correction step size, so that the positioning correction gradually approaches the final accurate position and avoids over-correction. S53. Apply the generated positioning avoidance scheme to the next pattern printing process, and continue to correct the positioning of each layer of pattern to optimize the alignment relationship between multiple layers of patterns.

[0042] This invention designs a positioning avoidance scheme based on the error correction results. By dynamically adjusting the correction strategy, it improves the correction sensitivity for pattern areas with large changes in correction amount. For areas with small changes in correction amount, appropriate fine-tuning ensures positioning stability, thereby optimizing the alignment relationship between multi-layer patterns.

[0043] In this embodiment, the positioning avoidance scheme analyzes the trend of the correction amount change in each pattern area, increases the correction sensitivity for areas with large correction amounts, dynamically adjusts the correction step size, and maintains a stable fine-tuning strategy for areas with small correction amounts. This ensures the accurate alignment of each layer of patterns during the printing process, avoids the accumulation of errors and unnecessary over-correction, and improves the alignment accuracy between multiple layers of patterns.

[0044] The positioning avoidance scheme designed in this invention employs a dynamic correction step size and sensitivity adjustment strategy for areas with varying correction amounts, thereby ensuring precise alignment between pattern layers. This optimization process reduces error accumulation and improves positioning accuracy during multi-layer pattern printing.

[0045] Example 1: To verify the feasibility of this invention in practice, it was applied to the multi-layer pattern printing process of a carpet production line. The task of this production line is to print intricate patterns onto each layer of the carpet and ensure the alignment accuracy between the patterns. In past production processes, due to limitations in printing equipment and the precision issues of manual adjustments, alignment errors frequently occurred between different layers of patterns, severely affecting the quality of the final product. Especially in multi-layer printing, the alignment accuracy of each layer is crucial to the final effect. Traditional methods cannot effectively address these problems, often relying on manual adjustments. These manual adjustments not only waste a significant amount of time but also fail to guarantee precise alignment of each layer, leading to inefficient and unstable printing.

[0046] In this invention, image data of the carpet surface is first acquired using a high-precision camera. This data includes multiple dimensions such as the overall pattern, local details, edge information, texture features, color distribution, and geometric features. After denoising, grayscale conversion, and normalization, this data is input into a convolutional neural network (CNN) for feature extraction. The extracted features include information such as pattern edges, texture, and local variations. Subsequently, a random forest algorithm is used to classify the pattern features, obtaining category labels for each pattern layer, providing a basis for subsequent localization and error correction. Based on these classification results, a mean-shift clustering algorithm is used to cluster the pattern layers, identifying the center points of each pattern layer and determining the regional boundaries of each printed layer. Finally, a CNN-RF model is used to correct the localization error of each pattern layer, ensuring accurate alignment between each pattern layer.

[0047] In the implementation process, the method was first applied to the initial debugging phase of the production line to test the printing accuracy. During the test, the production line was required to complete carpet printing tasks with different designs, including single-layer and multi-layer patterns. During the printing process, the position of each layer of the pattern was dynamically corrected using a CNN-RF model, and the alignment deviation of the patterns was monitored in real time. Experiments showed that after processing with this method, the positioning error of each layer of the pattern was significantly reduced, from ±5mm to below ±0.5mm.

[0048] In subsequent production processes, the positioning avoidance scheme based on this invention can dynamically adjust and correct strategies, further improving the accuracy of pattern alignment. For example, in a test batch, the printing cycle for each carpet on a production line using the traditional method was 120 minutes, while after applying the method of this invention, the production cycle was shortened to 100 minutes, reducing production time by approximately 16.67%. Furthermore, due to the improved positioning accuracy during printing, the number of rework tasks was reduced, with the rework rate decreasing from 15% to 3%, significantly improving production efficiency and finished product qualification rate.

[0049] Data analysis from multiple production batches reveals that applying the method of this invention significantly enhances production line stability and effectively guarantees pattern alignment accuracy. Particularly in the printing of complex and multi-layered patterns, positioning errors are significantly reduced. Further verification demonstrates that this method not only improves production efficiency but also consistently enhances the quality of the final product, reduces the need for manual intervention, and minimizes losses due to pattern misalignment.

[0050] In practical applications, this invention can also adjust the positioning strategy and correction step size in real time according to changes in the production environment. By dynamically analyzing the trend of correction changes at different pattern layers, the application of the positioning avoidance scheme ensures accurate alignment of each pattern layer and effectively avoids the accumulation of errors.

[0051] Table 1 Comparison of Production Efficiency and Accuracy Before and After Applying the Invention

[0052] The data in the table shows that applying the method of this invention significantly reduces production time and rework rate, demonstrating the invention's clear advantages in improving production efficiency and printing accuracy. Furthermore, the significant reduction in positioning error proves the effectiveness of this invention in precise alignment, thereby improving overall product quality and production stability.

[0053] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for precise multi-layer positioning in carpet printing based on image processing, characterized in that, Includes the following steps: S1. Collect carpet image data and perform preprocessing; S2. Based on the preprocessed image data, use a convolutional neural network to extract pattern features, and use a random forest algorithm to classify the pattern features to obtain the pattern feature labels for each layer of printing. S3. Perform mean-shift clustering on the pattern feature labels to identify the center points of each pattern layer, determine the regional boundaries of each printing layer, and construct a CNN-RF model to complete the pre-training process. S4. Based on the clustering results, calculate the deviation of each pattern region relative to the target position, and use the CNN-RF model to correct the error and adjust the positioning of the pattern to achieve accurate alignment of multi-layer patterns. S5. Based on the error correction results, design a positioning avoidance scheme and apply the positioning avoidance scheme to the next pattern printing process to optimize the alignment relationship between multiple layers of patterns. S6. Monitor the alignment deviation of each layer of pattern during the pattern printing process, and calculate the deviation in real time using a CNN-RF model to adjust the pattern positioning strategy and ensure precision control during the printing process. S7. Based on real-time monitoring data, adjust the clustering parameters in the mean-shift clustering algorithm and the feature classification rules in the random forest algorithm to achieve dynamically optimized pattern hierarchy precise positioning.

2. The method for multi-layer precise positioning in carpet printing based on image processing according to claim 1, characterized in that, The image data includes overall, local, edge, texture, color distribution, and geometric features.

3. The method for multi-layer precise positioning in carpet printing based on image processing according to claim 1, characterized in that, The preprocessing includes noise reduction, grayscale conversion, and normalization.

4. The method for multi-layer precise positioning in carpet printing based on image processing according to claim 1, characterized in that, S2 specifically includes: S21. Perform convolution operation on the preprocessed image data through a convolutional neural network, use the convolution kernel to extract features from the image, and use the ReLU activation function to perform non-linear mapping on the convolution result to obtain the feature map of the image. S22. The feature map of the image is input into the pooling layer to perform max pooling. The pooling result is passed to the next layer of the network. Through multiple convolution and pooling operations, a multi-level image feature representation is obtained. The multi-level image feature representation is then input into the random forest algorithm for feature classification. The classification process is as follows: Image data is labeled by constructing a training dataset, and a corresponding classification rule is generated for each category. The training dataset includes image features extracted from the image data and corresponding pattern category labels. A random forest model is constructed and trained, which includes multiple decision trees. After the decision trees are trained, each decision tree is applied to the input image features to classify the image and output the classification result of each decision tree. S23. After classifying the features of each layer of pattern, a voting mechanism is used to integrate the classification results. For each layer of printed pattern feature label, the classification results output by all decision trees will be used to obtain the final classification label through voting. The final category label is the category with the most occurrences among all decision tree output results.

5. The method for multi-layer precise positioning in carpet printing based on image processing according to claim 4, characterized in that, The image features include overall, local, edge, texture, color distribution, and geometric features, and the pattern category label indicates the category to which each layer of printed pattern belongs.

6. The method for multi-layer precise positioning in carpet printing based on image processing according to claim 4, characterized in that, The decision tree training method is as follows: First, a subset of data is randomly selected from the training dataset, and features are selected from it for splitting. The information gain criterion is used to select the optimal feature to split the node. Next, each decision tree gradually builds a tree structure through split nodes, and finally determines the classification label at the leaf node; Finally, each decision tree outputs a pattern category label based on the image features.

7. The method for multi-layer precise positioning in carpet printing based on image processing according to claim 1, characterized in that, S3 specifically includes: S31. Perform mean-shift clustering on the pattern feature labels, initializing each layer of printed pattern feature labels as a separate cluster center according to their spatial location. The spatial location of each pattern feature label is represented as a point. ,in and Let be the coordinates of the pattern feature label in the image. During initialization, it is assumed that each pattern feature label corresponds to an independent cluster, and the center point of each cluster is the position of the pattern feature label. S32, Set the initial window size As a bandwidth parameter for clustering, the distance from each feature label to all other feature labels in its neighborhood is calculated, and the weight of each point is determined based on the bandwidth parameter: ; in, Point and points The weights between them For the bandwidth of the Gaussian kernel, This refers to the spatial dimension, which is typically 2 or 3. The bandwidth parameter is the Euclidean distance between two points. Control the rate of weight decay; S33. Iteratively update the cluster centers using the mean shift algorithm. For each cluster center, the new cluster center is obtained by calculating the weighted average position of all points in its neighborhood. ; in, Representing cluster centers The neighborhood, It is the weight value, representing the point. With cluster center The weighting relationship between them Indicates the updated cluster centers. Indicates "belongs to"; The cluster centers are updated iteratively until their positions no longer change significantly. S34. After all cluster centers converge, identify the center point of each pattern layer and delineate the region boundary of each printing layer based on the cluster centers. The region of the pattern layer is determined by the cluster centers and the feature labels in the neighborhood. The region boundary is determined by selecting the feature labels around the cluster centers. S35. Based on the mean-shift clustering results, construct a CNN-RF model and complete the pre-training process. The CNN-RF model is trained using the clustered pattern feature data, optimizes the ability of the convolutional neural network to extract pattern features, and classifies the pattern of each printing layer using the random forest algorithm, thereby obtaining accurate pattern layer positioning results.

8. The method for multi-layer precise positioning in carpet printing based on image processing according to claim 1, characterized in that, S4 specifically includes: S41. Based on the mean-shift clustering results, compare the cluster center of each pattern region with the target location, and calculate the deviation of each pattern region relative to the target location: ; in, Indicates the first Deviation of each pattern area and The first The cluster center of each pattern region and coordinate, and The target locations are respectively and coordinate; S42. Error correction is performed on the deviation of each pattern region using a CNN-RF model. The CNN-RF model generates error correction rules based on the clustering results and the calculated deviation. The CNN part extracts high-dimensional features of the pattern region, and the RF part uses these features to classify and regress the error correction, generating correction parameters for each pattern region. S43, Assume the correction parameter is... , indicating the first The positioning correction amount for each pattern area will be adjusted by the correction parameters. Apply to the pattern area to adjust the positioning of each pattern area: ; in, and The center position of the adjusted pattern area. and The correction parameters are the output of the CNN-RF model. The corrected pattern area location; By correcting the deviation in all pattern areas, precise alignment of multi-layer patterns is ensured. S44. Based on the corrected pattern position, update the pattern hierarchy and area boundaries to ensure that the alignment between all pattern layers is accurately maintained in the subsequent printing process.

9. The method for multi-layer precise positioning in carpet printing based on image processing according to claim 1, characterized in that, S5 specifically includes: S51. Based on the error correction results, obtain the correction amount change trend of each pattern area. The correction amount change trend is obtained by comparing the current correction result with the historical correction data. If the current correction amount and the historical correction amount differ greatly, it indicates that there is a large positioning deviation in the pattern area. Conversely, it indicates that the correction effect is relatively stable. S52. Based on the trend of the correction amount change, design a positioning avoidance scheme. For areas with large correction amounts, adopt a dynamic adjustment strategy: For areas with large changes in correction amount, increase the correction sensitivity of the area, enhance the correction accuracy of the algorithm, adjust the positioning of the pattern in real time, and avoid the accumulation of errors; For areas where the correction amount changes little, small-scale fine-tuning is used to avoid unnecessary over-correction and ensure the stability of alignment accuracy. During pattern positioning, for areas in historical data where the correction amount changes significantly but remains temporarily stable, a dynamic correction step size adjustment strategy is adopted to control the correction step size, so that the positioning correction gradually approaches the final accurate position and avoids over-correction. S53. Apply the generated positioning avoidance scheme to the next pattern printing process, and continue to correct the positioning of each layer of pattern to optimize the alignment relationship between multiple layers of patterns.

10. A method for precise positioning of multi-layer carpet printing based on image processing according to claim 9, characterized in that, The positioning avoidance scheme analyzes the trend of correction amount changes in each pattern area, increases correction sensitivity for areas with large correction amounts, dynamically adjusts the correction step size, and maintains a stable fine-tuning strategy for areas with small correction amounts. This ensures accurate alignment of each layer of pattern during the printing process, avoids the accumulation of errors and unnecessary over-correction, and improves the alignment accuracy between multiple layers of pattern.