Knitting structure intelligent generation method and system based on pattern features
By analyzing pattern features and constructing constrained spaces, the problem of poor compatibility between pattern features and knitted structures is solved, and efficient knitted structure generation and weaving feasibility are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU LIUHEYUAN TEXTILE CO LTD
- Filing Date
- 2026-02-24
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the pattern features are poorly adapted to the knitted structure, resulting in low structure generation efficiency and insufficient feasibility of finished product weaving.
By acquiring the pattern image of the knitted structure to be generated, performing weaving-guided image parsing processing, extracting multi-dimensional pattern feature information, constructing a pattern feature field, performing weavability analysis, identifying feature regions that do not meet preset constraints, establishing structural constraint markers, constructing a knitted structure constraint space, and finally performing knitted structure calculation within the constraint space.
It achieves precise matching between pattern features and knitted structure, improving the pattern reproduction accuracy and weaving feasibility of the target knitted structure.
Smart Images

Figure CN122115526A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knitted structure generation technology, and more specifically to a method and system for intelligent generation of knitted structures based on pattern features. Background Technology
[0002] In the field of patterned knitted fabric production, traditional knitted structure generation methods often rely on manual experience to deconstruct and transform patterns or directly use simple pixel-needle mapping rules to complete the structural configuration. This approach not only makes it difficult to accurately capture the overall outline, local texture distribution, and directional characteristics of the pattern, but also easily leads to poor compatibility between pattern features and knitted structures. This results in frequent defects such as abrupt needle changes and structural jumps in the generated knitted structures during weaving, significantly reducing the pattern reproduction accuracy of the finished fabric. At the same time, existing methods often ignore the constraints of equipment parameters such as loom needle pitch and weaving resolution, and have not established a systematic weavability analysis mechanism. This causes the generated knitted structures to frequently exceed the processing capacity of the equipment, requiring repeated manual adjustments and optimizations, which seriously affects production efficiency and makes it difficult to meet the current market demand for rapid production of personalized, high-precision patterned knitted fabrics.
[0003] The existing technology suffers from poor compatibility between pattern features and knitted structures, resulting in low structure generation efficiency and insufficient feasibility of finished product weaving. Summary of the Invention
[0004] This application provides a method and system for intelligent generation of knitted structures based on pattern features, which addresses the technical problem in the prior art where poor compatibility between pattern features and knitted structures leads to low structure generation efficiency and insufficient feasibility of finished product weaving.
[0005] In view of the above problems, this application provides a method and system for intelligent generation of knitted structures based on pattern features.
[0006] The first aspect of this application provides a method for intelligent generation of knitted structures based on pattern features, the method comprising:
[0007] A pattern image corresponding to the knitted structure to be generated is obtained. The pattern image undergoes weaving-guided image analysis processing, including multi-scale pattern decomposition and pattern directionality analysis, to extract multi-dimensional pattern feature information representing the overall outline, local texture distribution, and directional characteristics of the pattern. Based on the multi-dimensional pattern feature information, a pattern feature field is constructed to describe the spatial distribution relationship of the pattern under weaving semantics. Weaveability analysis is performed using the pattern feature field to identify feature regions in the pattern that do not meet the preset knitted structure generation constraints, and corresponding structural constraint markers are established. A knitted structure constraint space is constructed based on the pattern feature field and structural constraint markers. This space is used to limit the selection of needle type, structure switching position, and structural change amplitude during the knitted structure generation process. Within the knitted structure constraint space, the pattern feature field is used as the target guiding condition to perform knitted structure calculation and establish the target knitted structure.
[0008] A second aspect of this application provides a smart knitted structure generation system based on pattern features, the system comprising:
[0009] The image analysis and processing module is used to acquire the pattern image corresponding to the knitted structure to be generated, and to perform weaving-guided image analysis processing on the pattern image. The image analysis processing includes multi-scale pattern decomposition and pattern directionality analysis to extract multi-dimensional pattern feature information that respectively characterizes the overall outline, local texture distribution, and directional characteristics of the pattern. The pattern feature field construction module is used to construct a pattern feature field based on the multi-dimensional pattern feature information to describe the spatial distribution relationship of the pattern under weaving semantics. The structural constraint mark establishment module is used to perform weaveability analysis using the pattern feature field, identify feature regions in the pattern features that do not meet the preset knitted structure generation constraints, and establish corresponding structural constraint marks. The constraint space construction module is used to construct a knitted structure constraint space based on the pattern feature field and the structural constraint marks. The knitted structure constraint space is used to limit the selection of needle type, structure switching position, and structural change range during the knitted structure generation process. The target knitted structure establishment module is used to perform knitted structure calculation within the knitted structure constraint space, using the pattern feature field as the target guiding condition, to establish the target knitted structure.
[0010] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0011] The process involves acquiring a pattern image corresponding to the knitted structure to be generated, and performing weaving-guided image parsing processing on the pattern image. A pattern feature field is constructed based on multi-dimensional pattern feature information to describe the spatial distribution relationship of the pattern under weaving semantics. Weaveability analysis is performed using the pattern feature field to identify feature regions in the pattern that do not meet the preset knitted structure generation constraints, and corresponding structural constraint markers are established. A knitted structure constraint space is constructed based on the pattern feature field and structural constraint markers. Within the knitted structure constraint space, the knitted structure is calculated using the pattern feature field as the target guiding condition to establish the target knitted structure. This achieves precise matching and intelligent calculation of pattern features and knitted structures, improving the pattern reproduction accuracy and weaving feasibility of the target knitted structure. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 A schematic diagram of the process for intelligent generation of knitted structures based on pattern features provided in this application embodiment;
[0014] Figure 2 This is a schematic diagram of the intelligent knitted structure generation system based on pattern features provided in an embodiment of this application.
[0015] Figure labeling: Image analysis and processing module 10, pattern feature field construction module 20, structural constraint label establishment module 30, constraint space construction module 40, target knitting structure establishment module 50. Detailed Implementation
[0016] This application provides a method and system for intelligent generation of knitted structures based on pattern features, which addresses the technical problem in the prior art where poor compatibility between pattern features and knitted structures leads to low structure generation efficiency and insufficient feasibility of finished product weaving.
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0018] Example 1, as Figure 1As shown, this application provides a method for intelligent generation of knitted structures based on pattern features, the method comprising:
[0019] Step S100: Obtain the pattern image corresponding to the knitted structure to be generated, and perform weaving-guided image analysis processing on the pattern image. The image analysis processing includes multi-scale pattern decomposition and pattern directionality analysis to extract multi-dimensional pattern feature information that respectively characterizes the overall outline of the pattern, local texture distribution and directional characteristics.
[0020] Specifically, the process begins by acquiring the pattern image corresponding to the knitted structure to be generated, converting it to a unified weaving analysis coordinate system, and performing gridded resampling based on a preset spatial sampling step size to establish a pattern sampling matrix. Then, combining the weaving resolution requirements of the knitted structure to be generated and the knitting machine needle pitch parameters, the target knitted structure level is selected from the set of knitted structure levels consisting of knitted fabric layers, needle row structure layers, and local needle technique layers. This level is mapped to the corresponding pattern analysis scale level, with the number of target knitted structure levels serving as the number of scale levels for multi-scale resolution decomposition. The pattern sampling matrix is then subjected to sequential spatial scale reduction processing. At each scale level, a basic structure matrix and a detail response matrix are generated through low-frequency smoothing sampling and high-frequency detail-preserving sampling. The basic structure matrix is then used to extract... The algorithm extracts the outline boundary and connectivity information of the pattern region, calculates the local energy distribution value and directional change intensity based on the detail response matrix, and then combines relevant data at different scale levels according to scale weights to generate a pattern outline response map, texture energy distribution map, and detail perturbation distribution map. Finally, it extracts outline structure features such as the number of connected branches and the rate of change of boundary curvature from the outline response map, calculates texture periodic features such as texture energy projection values in different directions and repetition spacing from the texture energy distribution map, and identifies perturbation regions with local gray-scale or color abrupt changes from the detail perturbation distribution map and records their spatial location and distribution density. The three types of feature sets are combined and encoded to generate multidimensional pattern feature information containing spatial coordinate indexes and respectively representing the overall outline of the pattern, local texture distribution, and directional characteristics.
[0021] Step S200: Construct a pattern feature field based on multi-dimensional pattern feature information to describe the spatial distribution relationship of patterns under weaving semantics.
[0022] Specifically, based on the generated multidimensional pattern feature information containing spatial coordinate indexes, covering the pattern contour structure feature set, the pattern texture periodic feature set, and the pattern local perturbation feature set, and with weaving process adaptability as the core guide, a pattern feature field is constructed to accurately describe the spatial distribution relationship of the pattern under weaving semantics through spatial correlation analysis and semantic mapping of various feature information. This pattern feature field focuses on integrating and characterizing the structural density change trend of the pattern region. It is derived from the area distribution of the region in the contour structure feature, the energy distribution in the texture periodic feature, and the texture complexity distribution. Based on the texture energy projection value, the repeating spacing and the density of local perturbation distribution, and the transition characteristics of the pattern boundary, it is calculated through the boundary curvature change rate and the spatial position correlation of the perturbation region. This provides a unified feature description and target guidance basis for subsequent weaveability analysis, knitted structure constraint space construction, and knitted structure solution.
[0023] Step S300: Perform weaveability analysis using the pattern feature field, identify feature regions in the pattern features that do not meet the preset knitting structure generation constraints, and establish corresponding structural constraint markers.
[0024] Specifically, the pre-defined constraints for generating the knitted structure are first established. These constraints are based on the knitting machine's needle pitch parameters, weaving process limits, and knitted structure stability requirements, covering core indicators such as needle adaptation thresholds, structural transition smoothness standards, and upper limits for the feasibility of weaving local features. Subsequently, using a constructed pattern feature field that characterizes the trend of structural density changes, texture complexity distribution, and pattern boundary transition characteristics of the pattern area, weaveability analysis is conducted region by region according to spatial coordinate indexes. The focus is on verifying whether high structural density areas of the pattern exceed the knitting machine's needle density carrying capacity, whether there are process conflicts in the needle combinations corresponding to high texture complexity areas, whether steep boundary transition areas meet the requirements for continuous structural weaving, and whether the feature change amplitude of local disturbance areas exceeds the pre-defined weaving adaptation threshold. After accurately identifying feature areas in the pattern that do not meet the above constraints, structural constraint markers are established for the corresponding areas based on the type of violation, such as excessive density, needle conflict, excessive steepness, and excessive disturbance, including constraint type, restriction level, spatial range coordinates, and allowed adjustment direction. This ensures that weaving risks can be specifically avoided during the subsequent knitted structure generation process.
[0025] Step S400: Based on the pattern feature field and structural constraint markers, construct a knitted structure constraint space. The knitted structure constraint space is used to limit the selection of stitch type, the position of structure switching and the range of structure change during the knitted structure generation process.
[0026] Specifically, based on the spatial index coordinates of the pattern feature field, a knitted structural unit mesh corresponding one-to-one with the pattern area is first established. The generated structural constraint markers are then precisely mapped to the corresponding mesh units, forming a structural constraint mapping relationship that covers the entire domain. Subsequently, based on the feature information representing the trend of structural density change in the pattern feature field, combined with the knitting machine needle pitch parameters and weaving resolution requirements, optional needle density range parameters that are suitable for the density characteristics of each knitted structural unit are configured to avoid the density exceeding the process bearing capacity. At the same time, based on the feature information representing the distribution of texture complexity in the pattern feature field, a set of corresponding optional needle types is matched for knitted structural units in different complexity areas, such as configuring basic needle types for simple texture areas. For complex texture areas, special stitch options are extended; for units mapped with structural constraint markers, according to the constraint type, such as density exceeding the limit or steep transition, structural switching constraint parameters are applied, that is, limiting the triggering conditions and frequency of structural switching or structural continuity constraint parameters, that is, clarifying the allowable range of stitch transition between adjacent units, thereby limiting abrupt stitch changes or structural jumps; finally, the optional stitch density range parameters, optional stitch type sets, and structural continuity constraint parameters of all knitted structural units are uniformly encoded to form a knitted structural constraint space that can comprehensively limit the selection of stitch type, structural switching position, and structural change range during the knitted structure generation process, providing clear boundary and rule constraints for subsequent accurate calculation of knitted structures.
[0027] Step S500: Within the constrained space of the knitted structure, using the pattern feature field as the target guiding condition, perform the knitted structure calculation to establish the target knitted structure.
[0028] Specifically, within the constructed knitted structure constraint space, a structural state variable is first established for each knitted structure unit, including a needle type variable, a needle density variable, and a structural switching state variable, ensuring that the initial values of each variable fall within the selectable range defined by the constraint space. Then, based on the distribution of characteristic values such as the structural density variation trend, texture complexity distribution, and boundary transition characteristics at each spatial location in the pattern feature field, a structural matching objective function is constructed to measure the degree of matching between the current knitted structure state and the pattern feature field. This function aims to maximize the pattern feature reproduction degree. During the iterative update of the structural state variables, the needle density range, the set of selectable needle types, and the structural continuity within the knitted structure constraint space are strictly followed. The system employs a combination of constraints and smoothing constraints on the structural state variables of adjacent knitted structural units. This effectively reduces the magnitude of structural abrupt changes between adjacent units and ensures the overall continuity of the knitted structure. The system continuously iterates and updates the structural state variables and calculates the structural matching objective function value in real time. When the function value reaches a preset convergence condition, such as a matching degree threshold or an upper limit for the number of iterations, the iteration stops and the final combination of structural state variables is output. Based on this combination, a target knitted structure that highly matches the pattern features and meets the weaving process requirements is established. Subsequently, the pattern image, the target knitted structure, the weaving resolution requirements, and the loom needle pitch parameters can be combined and mapped, packaged and stored as an associated dataset, providing data support for the generation and compensation of similar knitted structures in the future.
[0029] In one possible implementation, step S100 further includes:
[0030] Step S110: Convert the pattern image to a unified weaving analysis coordinate system, and perform gridded resampling of the pattern image according to the preset spatial sampling step size to establish a pattern sampling matrix.
[0031] Step S120: Perform multi-scale resolution decomposition processing on the pattern sampling matrix to generate pattern contour response map, texture energy distribution map and detail perturbation distribution map at different scale levels, wherein different scale levels correspond to different knitting structure levels.
[0032] Step S130: Based on the pattern contour response map, extract the number of connected branches, the rate of change of boundary curvature, and the area distribution parameters of the pattern region to form a set of pattern contour structural features.
[0033] Step S140: Based on the texture energy distribution map, calculate the texture energy projection value and texture repetition spacing parameter of the pattern in different directions to form a set of pattern texture periodic features.
[0034] Step S150: Based on the detailed perturbation distribution map, identify the perturbation areas in the pattern where the local grayscale or color change exceeds a preset threshold, and simultaneously record the spatial location and distribution density of the perturbation areas to form a set of local perturbation features of the pattern.
[0035] Step S160: Combine and encode the pattern contour structure feature set, pattern texture periodic feature set, and pattern local perturbation feature set to generate multidimensional pattern feature information containing spatial coordinate index.
[0036] Specifically, firstly, the pattern image corresponding to the knitted structure to be generated is subjected to coordinate system unification processing, transforming it to a unified weaving analysis coordinate system. This ensures that the image analysis dimension is consistent with the spatial logic of the subsequent knitting process, laying the foundation for accurate adaptation of feature extraction and structure generation. Subsequently, based on the weaving resolution requirements of the knitted structure to be generated, the knitting machine needle pitch parameters, and the complexity of pattern details, a preset spatial sampling step size is determined. This step size needs to balance the preservation of pattern details with the feasibility of the weaving process, avoiding feature loss due to overly coarse sampling or increased computational redundancy due to overly fine sampling. Based on the spatial sampling step size determined above, the transformed pattern image is resampled using a global grid, discretizing the continuous pattern pixel information into regularly arranged grid units. Each grid unit records the core image information such as grayscale and color at that location, ultimately constructing a structured and standardized pattern sampling matrix.
[0037] First, based on the weaving resolution requirements and knitting machine needle pitch parameters of the knitted structure to be generated, target knitted structure levels for structure generation are selected from the set of knitted structure levels, which includes knitted structure levels, needle row structure levels, and local needle technique levels. Each target knitted structure level is mapped to a corresponding pattern analysis scale level, and the number of scale levels for multi-scale resolution decomposition is determined by the number of target knitted structure levels. Then, according to the number of scale levels, spatial scale reduction processing is sequentially performed on the established pattern sampling matrix. In each scale level, low-frequency smooth sampling preserves the basic structure information of the pattern, while high-frequency detail-preserving sampling captures local subtle features, generating the basic structure matrix and detail response matrix of the corresponding scale level. Next, using the basic structure matrix at each scale level, the regional contour boundary and connectivity information of the pattern are extracted to form contour response data for generating the pattern contour response map. At the same time, based on the detail response matrix at each scale level, the local energy distribution value and directional change intensity of the pattern at the corresponding scale level are calculated to form detail response data for generating texture energy distribution map and detail perturbation distribution map. Finally, the contour response data and detail response data at different scale levels are fused and combined according to the preset scale weights to generate pattern contour response map that reflects the contour characteristics of the pattern at different scales, texture energy distribution map that represents the texture energy distribution at different scales, and detail perturbation distribution map that presents the local detail changes at different scales.
[0038] Based on the pattern contour response map generated by multi-scale resolution decomposition, the effective region of the pattern and the background region are first separated by an image segmentation algorithm to accurately locate the core area of the pattern to be analyzed. Then, a connected component labeling algorithm is used to traverse the pattern contour response map and count the number of independent regions connected to each other within the effective region of the pattern, thus obtaining the number of connected branches that characterize the overall structure of the pattern. For the boundary contour of each connected region, the curvature value of the boundary point is solved point by point using a discrete curvature calculation method. Then, the extreme values, mean and variance of the curvature change are counted to determine the boundary curvature change rate, which reflects the smoothness and complexity of the pattern contour. At the same time, based on a unified weaving analysis coordinate system and the scale parameter of gridded resampling, the number of grid cells corresponding to each connected region is calculated, and the actual area of the region and the area ratio of each region are converted to form the area distribution parameter. Finally, the extracted number of connected branches, boundary curvature change rate and area distribution parameter are integrated and summarized to construct a pattern contour structural feature set that can comprehensively characterize the overall contour shape and structural distribution characteristics of the pattern.
[0039] Based on the texture energy distribution map generated by multi-scale resolution decomposition, multiple feature extraction directions adapted to the weaving process are first preset, covering key directions such as warp, weft, and diagonal. Through directional filtering and projection calculation methods, the texture energy projection values of the pattern in each preset direction are solved to quantify the intensity distribution and extension characteristics of the texture in different directions. At the same time, combined with the peak distribution law of texture energy, peak detection and spacing statistics algorithms are used to identify the distance between adjacent texture peaks and calculate the average interval to determine the texture repetition spacing parameter, accurately capturing the periodicity of the pattern texture. Subsequently, the texture energy projection values, texture repetition spacing parameters, and corresponding direction labels in each direction are integrated to form a pattern texture periodic feature set that can comprehensively characterize the local texture distribution law, directional characteristics, and periodic features of the pattern.
[0040] Based on the detailed perturbation distribution map generated by multi-scale resolution decomposition, a reasonable preset threshold for grayscale or color change is first set, taking into account the weaving process accuracy requirements and pattern detail restoration needs of the knitted structure to be generated. This threshold needs to balance the preservation of local details and weaving feasibility, avoiding misjudging perturbation areas due to a threshold that is too low or missing key details due to a threshold that is too high. Then, a local region comparison algorithm is used to traverse the detailed perturbation distribution map, detecting the grayscale or color difference between each grid cell and its adjacent cells, accurately identifying local areas where the change exceeds the preset threshold, and defining these areas as perturbation areas that need to be focused on. During the identification process, the spatial location information such as the boundary coordinates and center position of each perturbation area is recorded simultaneously based on a unified weaving analysis coordinate system. At the same time, the number of perturbation areas per unit area is counted, and the distribution density parameter of the perturbation area is calculated. Finally, the spatial location information and distribution density parameter of all perturbation areas are systematically integrated to form a set of pattern local perturbation features that can comprehensively characterize the local detail mutation features of the pattern.
[0041] First, the logical association between the three feature sets is clarified. Using a unified weaving analysis coordinate system as a benchmark, each feature is assigned a corresponding spatial coordinate index: the pattern contour structure feature set (including the number of connected branches, the rate of change of boundary curvature, etc.), the pattern texture periodic feature set (including multi-directional texture energy projection values, texture repetition spacing, etc.), and the pattern local perturbation feature set (including the spatial location and distribution density of the perturbation area, etc.). This ensures that all feature information is precisely bound to the spatial location of the pattern. Then, standardized coding rules are used to classify, integrate, and digitize the parameters in the three feature sets according to a preset dimensional order. The contour structure feature focuses on representing the overall shape, the texture periodic feature focuses on local patterns, and the local perturbation feature highlights subtle abrupt changes. During the coding process, the quantitative attributes and category identifiers of each feature are preserved to avoid information redundancy or loss. Finally, structured multi-dimensional pattern feature information is generated. This information not only fully covers the core content of the overall pattern contour, local texture distribution, and directional characteristics, but also achieves a one-to-one correspondence between features and pattern locations through spatial coordinate indices. This provides standardized and traceable data support for subsequent pattern feature field construction, weaveability analysis, and knitted structure calculation.
[0042] In one possible implementation, step S120 further includes:
[0043] Step S121: According to the preset number of scale levels, the spatial scale reduction process is sequentially performed on the pattern sampling matrix. In each scale level, the pattern sampling matrix is subjected to low-frequency smoothing sampling and high-frequency detail-preserving sampling to generate the basic structure matrix and detail response matrix of the corresponding scale level.
[0044] Step S122: Using the basic structure matrix at each scale level, extract the regional contour boundary and connectivity information of the pattern to form contour response data for generating the pattern contour response map.
[0045] Step S123: Based on the detail response matrix of each scale level, calculate the local energy distribution value and direction change intensity of the pattern at the corresponding scale level to form detail response data used to generate texture energy distribution map and detail perturbation distribution map.
[0046] Step S124: Combine the contour response data and detail response data at different scale levels according to scale weights to generate the corresponding pattern contour response map, texture energy distribution map and detail perturbation distribution map.
[0047] Specifically, firstly, based on the weaving resolution, knitting machine needle pitch parameters, and target knitting structure levels such as knitting structure / needle row structure / local stitches of the knitted structure to be generated, the preset number of scale levels corresponding to each level is determined. Then, using this number of scale levels as a benchmark, the standardized pattern sampling matrix is sequentially subjected to spatial scale reduction processing. Specifically, the scale levels are gradually reduced by performing progressive downsampling operations of 2x, 4x, and 8x on the matrix. In the processing stage of each scale level, a Gaussian filtering algorithm with a 5×5 Gaussian kernel is first used to perform low-frequency smooth sampling on the pattern sampling matrix of the current scale, filtering out high-frequency noise and retaining the core basic outline and overall structural information of the pattern, thereby generating the basic structure matrix of the corresponding scale level. At the same time, a high-frequency enhancement algorithm based on Laplacian pyramid decomposition is used to extract and enhance the residual of the filtered matrix, achieving high-frequency detail retention sampling, accurately capturing high-frequency features such as local texture abrupt changes and edge details of the pattern at this scale, and then generating the detail response matrix of the corresponding scale level, ensuring that each scale level can synchronously output a structured data matrix adapted to subsequent outline and detail analysis.
[0048] For the basic structure matrix at each scale level, an adaptive threshold segmentation algorithm, such as the Otsu algorithm, is first used to binarize the matrix data, accurately separating the foreground and background regions of the pattern and eliminating weak noise interference in the basic structure. Then, the Canny edge detection algorithm is used to extract the continuous contour boundaries of the foreground region of the pattern at each scale through steps such as Gaussian smoothing, gradient calculation, non-maximum suppression, and double threshold screening, outputting contour information including boundary point coordinates and edge intensity. At the same time, a connected region labeling algorithm based on 4-neighborhood or 8-neighborhood, such as the flood filling algorithm, is used to traverse the binarized basic structure matrix, identify and label interconnected independent pattern regions, and record the label ID, minimum bounding rectangle, center point coordinates, and other core information of each connected region. Finally, the contour boundary coordinates, edge intensity data, connected region labeling information, and region geometric parameters extracted at each scale level are integrated, classified and encapsulated according to scale level, to form structured contour response data.
[0049] For the detail response matrix at each scale level, a sliding window, such as a 3×3 or 5×5 window, is first used to traverse the entire matrix. By calculating the variance or sum of squares of the pixel grayscale values within the window, the local energy distribution value at each location is obtained, quantifying the richness of the detail features in that region. Simultaneously, an Oriented Gradient Histogram (HOG) is constructed, and the Sobel operator is used to calculate the gradient magnitude and direction at multiple preset directions such as 0°, 45°, 90°, and 135°. By statistically analyzing the dominant trend and change magnitude of the gradient direction in the neighborhood of each pixel, the intensity of directional change in the pattern detail is determined. Subsequently, the local energy distribution value is normalized, such as mapping it to the [0, 255] interval, to ensure the comparability of data at different scale levels. The intensity of directional change is divided into three levels—strong, medium, and weak—according to a preset threshold and digitally encoded. Finally, the normalized local energy distribution value, the encoded intensity of directional change, and the corresponding spatial coordinate information at each scale level are integrated and encapsulated to form structured detail response data.
[0050] Based on the importance of the knitting structure level corresponding to each scale level, such as setting the weight of the knitting structure level to 0.5, the weight of the needle row structure level to 0.3, and the weight of the local needlework level to 0.2, preset scale weights are assigned to the contour response data and detail response data at different scale levels to ensure that the feature information of the core scale level dominates after fusion. Subsequently, for the contour response data, a weighted summation algorithm is used to fuse the contour boundary coordinates, edge intensity, and connected region information of each scale level according to their weights. The weighted average coordinates of the contour points in the overlapping areas are taken, and the weighted superposition value of the edge intensity is taken. Then, an interpolation completion algorithm is used to fill the gaps in the fused data. The process generates a pattern contour response map with multi-scale features. For the detail response data, the local energy distribution values after normalization at each scale level are first weighted and fused according to scale weights, and then restored to the original data range through inverse normalization to generate a texture energy distribution map. Then, the directional change intensity after encoding at each scale level is weighted and voted, and the detail abrupt change region is screened out according to the perturbation region judgment rule to generate a detail perturbation distribution map. In the entire combination process, a unified weaving analysis coordinate system is used as the benchmark to ensure that the spatial coordinates of all data are accurately aligned. Finally, three distribution maps that can comprehensively reflect the multi-scale contour, texture energy and detail perturbation features of the pattern are output.
[0051] In one possible implementation, step S121 further includes:
[0052] Based on the weaving resolution requirements and knitting machine needle pitch parameters for the knitted structure to be generated, the target knitted structure level to participate in the structure generation is selected from the set of knitted structure levels. The set of knitted structure levels includes knitted structure level, needle row structure level, and local needle technique level.
[0053] Each target knitted structure level is mapped to a pattern analysis scale level, and the number of target knitted structure levels is used as the number of scale levels for multi-scale resolution decomposition.
[0054] Specifically, the knitted structure hierarchy set is defined to include the knitted organization hierarchy, the needle row structure hierarchy, and the local needle technique hierarchy. The knitted organization hierarchy corresponds to the overall macroscopic structure of the fabric, the needle row structure hierarchy corresponds to the mesoscopic row and column arrangement rules of the fabric, and the local needle technique hierarchy corresponds to the microscopic knitting action of a single needle or a local needle group. Then, a parameter matching quantization algorithm is used to normalize the weaving resolution requirements and the loom needle pitch parameters of the knitted structure to be generated. The weaving resolution requirements characterize the pattern fineness and structural density standards that the finished fabric should present, while the loom needle pitch parameters characterize the distance between adjacent needles on the loom needle bed. This parameter directly determines the minimum structural unit size achievable by the weaving process. The algorithm converts these two types of parameters into adaptation coefficients in the range of 0 to 1. Next, a hierarchy selection threshold rule is set. When the weaving resolution is suitable... When the weaving resolution adaptation coefficient is greater than or equal to 0.8 and the knitting machine needle pitch adaptation coefficient is less than or equal to 0.3 (i.e., high resolution and fine needle pitch scenarios), all three types of layers are selected for structure generation. When the weaving resolution adaptation coefficient is between 0.5 and 0.8 and the knitting machine needle pitch adaptation coefficient is between 0.3 and 0.6 (i.e., medium precision scenarios), the knitting structure layer and needle row structure layer are selected. When the weaving resolution adaptation coefficient is less than or equal to 0.5 or the knitting machine needle pitch adaptation coefficient is greater than or equal to 0.6 (i.e., low precision and coarse needle pitch scenarios), only the knitting structure layer is selected. Finally, the process feasibility verification module, combined with the needle implementation capability corresponding to the knitting machine model, performs a second verification on the preliminary screening results, eliminates layers that exceed the equipment process range, and finally determines the target knitting structure layer that needs to participate in structure generation.
[0055] A hierarchical mapping association table is constructed to establish a one-to-one correspondence between the target knitted structure hierarchy and the pattern analysis scale hierarchy. For the selected knitted structure hierarchy, it is mapped to the first-level pattern analysis scale hierarchy, which corresponds to the macroscopic contour feature analysis of the pattern. For the selected needle row structure hierarchy, it is mapped to the second-level pattern analysis scale hierarchy, which corresponds to the mesoscopic texture distribution feature analysis of the pattern. For the selected local needle pattern hierarchy, it is mapped to the third-level pattern analysis scale hierarchy, which corresponds to the microscopic detail perturbation feature analysis of the pattern. Subsequently, a hierarchical number statistics algorithm is used to count the number of the finally determined target knitted structure hierarchy. The counted number of target knitted structure hierarchy is directly assigned as the scale hierarchy number for multi-scale resolution decomposition processing. At the same time, this scale hierarchy number is used as the input parameter for the subsequent multi-scale resolution decomposition algorithm to determine the number of times the spatial scale reduction processing is performed on the pattern sampling matrix, ensuring that the scale hierarchy of pattern analysis is accurately matched with the generation hierarchy of the knitted structure.
[0056] In one possible implementation, step S121 further includes:
[0057] The pattern feature field is used to characterize the structural density variation trend, texture complexity distribution, and pattern boundary transition characteristics of the pattern region.
[0058] Specifically, the pattern feature field is a structured feature space constructed based on the pattern contour structure feature set, pattern texture periodic feature set, and pattern local perturbation feature set extracted by multi-scale decomposition. Its core is used to characterize the structural density change trend, texture complexity distribution, and pattern boundary transition characteristics of the pattern region. The pattern feature field uses a unified weaving analysis coordinate system as its spatial reference, dividing the pattern into several regular grid units. Each grid unit is configured with corresponding structural density parameters, texture complexity parameters, and boundary transition parameters. The structural density parameter is calculated from indicators such as the number of contour connected branches and the area ratio of the region, which can accurately reflect the density and variation of the structure in different regions of the pattern. The texture complexity parameter is generated based on data such as multi-directional texture energy projection values and texture repetition spacing, which can effectively reflect the richness and distribution pattern of the local texture of the pattern. The boundary transition parameter is determined by combining information such as the boundary curvature change rate and the distribution density of detail perturbation, and is used to describe the smoothness and abrupt change characteristics of the pattern contour edge and the junction of different regions. By spatially integrating and visually mapping the above three types of parameters, the pattern feature field can form a comprehensive and continuous feature distribution system, providing an intuitive and accurate target guidance basis for subsequent weaveability analysis, knitted structure constraint space construction, and knitted structure solution.
[0059] In one possible implementation, step S400 further includes:
[0060] Step S410: Based on the spatial index coordinates of the pattern feature field, establish a knitted structure unit grid that corresponds one-to-one with the pattern area, and map the structural constraint mark to the corresponding knitted structure unit grid to form a structural constraint mapping relationship.
[0061] Step S420: Based on the feature information representing the trend of structural density change in the pattern feature field, configure optional needle density range parameters for each knitted structural unit.
[0062] Step S430: Based on the feature information representing the texture complexity distribution in the pattern feature field, configure a set of selectable stitch types for each knitted structural unit.
[0063] Step S440: Based on the structural constraint marker, apply architecture switching constraint parameters or structural continuity constraint parameters to the knitted structure units that do not meet the preset knitted structure generation constraints, in order to restrict abrupt changes in stitch patterns or structural jumps.
[0064] Step S450: Unify the needle density range parameters, the set of selectable needle types, and the structural continuity constraint parameters of each knitted structural unit to generate a knitted structural constraint space.
[0065] Specifically, based on the spatial index coordinates preset in the pattern feature field, a knitted structural unit grid with uniform size and precise position is constructed according to the spatial division rules that perfectly match the pattern area. This ensures that the spatial coordinates of each knitted structural unit grid are highly consistent with the coordinate system of the pattern feature field, achieving a one-to-one mapping between the pattern area and the knitted structural unit grid. Subsequently, structural constraint marks that are pre-set according to the limitations of weaving process, the performance of loom equipment, and the quality requirements of finished fabric are precisely assigned to the corresponding knitted structural unit grid according to the spatial coordinate matching principle. This clarifies the constraint attributes and constraint levels of each grid unit, ultimately forming a structural constraint mapping relationship with clear spatial position and well-defined constraint relationships.
[0066] Based on the feature information representing the trend of structural density change in the pattern feature field, key indicators such as structural density parameters, number of connected branches, and area ratio of each pattern region are extracted. Combined with the weaving resolution requirements of the knitted structure to be generated and the knitting machine needle pitch parameters, a quantitative matching model of structural density and needle density is established. For regions with high structural density in the pattern feature field, selectable needle density parameters with relatively compact numerical ranges are configured for the corresponding knitted structural units to ensure the compactness of the fabric structure and the accurate reproduction of pattern details in that region. For regions with low structural density, selectable needle density parameters with relatively loose numerical ranges are configured for the corresponding knitted structural units to reduce the difficulty of the weaving process while meeting the pattern shape requirements. At the same time, based on the gradual trend of structural density, the needle density range parameters of adjacent knitted structural units are smoothly transitioned to avoid abrupt changes in needle density. Finally, the selectable needle density range parameters are accurately configured for all knitted structural units.
[0067] The core information representing the texture complexity distribution in the pattern feature field is extracted, including multi-directional texture energy projection values, texture repetition spacing, and detail perturbation distribution density. Then, a texture complexity grading algorithm is used to divide the pattern area corresponding to each knitted structural unit into three texture complexity levels: high, medium, and low, by calculating the weighted sum of the above parameters. For knitted structural units with high texture complexity, a preset complex stitch database is invoked to configure a set of optional stitch types, including jacquard, tuck, and float stitches, to meet the requirements for fine texture formation. For knitted structural units with medium texture complexity, a set of optional stitch types, including rib and double rib, is configured to balance texture reproduction and weaving feasibility. For knitted structural units with low texture complexity, a set of optional stitch types, including plain weave and weft plain weave, is configured to reduce weaving process costs. Simultaneously, a stitch type compatibility verification mechanism is established to ensure that the optional stitch types within the same knitted structural unit are compatible with the hardware implementation capabilities of the knitting machine. Finally, the optional stitch type set configuration for all knitted structural units is completed.
[0068] The structural constraint markers mapped to the knitted structure unit mesh are retrieved. A constraint condition verification algorithm is used to compare the preset generation constraint thresholds of the knitted structure units grid by grid. These thresholds are pre-set based on the loom's mechanical motion limits, fabric structure stability requirements, and weaving process tolerance range. For knitted structure units that are determined not to meet the constraint conditions, if there is a need to switch between different knitted structures across major categories, a structure switching restriction parameter is applied. This is achieved by setting the minimum switching interval stitch count, limiting the switching direction, and configuring a switching buffer area to restrict frequent switching between different structured structures such as plain weave and jacquard, rib weave and tuck weave. If there is a problem of excessive differences in stitch patterns between adjacent units, a structural continuity constraint parameter is applied. This is achieved by calculating the upper limit of the difference in stitch density between adjacent units, setting a compatible list of stitch types, and configuring a gradual transition stitch to constrain the amplitude of stitch density abrupt changes and the range of stitch type jumps. At the same time, a dynamic adjustment mechanism for constraint parameters is established. Based on the process feedback during the subsequent knitted structure calculation process, the thresholds of the restriction and constraint parameters are optimized in real time to ensure that the final generated knitted structure not only meets the pattern reproduction requirements but also has stable weaving feasibility.
[0069] A standardized parameter coding rule is constructed, assigning independent parameter identification codes to the needle density range parameters, optional needle type sets, and structural continuity constraint parameters of each knitted structural unit. The needle density range parameters use a numerical range coding format to record upper and lower thresholds; the optional needle type sets use a binary bit-mapping coding format to correspond to specific needle types such as plain weave, rib weave, and jacquard; and the structural continuity constraint parameters use a hierarchical coding format to indicate constraint strength. Subsequently, a spatial index association algorithm is used to bind the coding information of each parameter to the spatial coordinates of the knitted structural unit, ensuring that each coded data can be traced back to its corresponding pattern area location. Next, the constraint parameter integration module is invoked to classify and integrate all data according to the triplet structure of spatial coordinates-parameter identification code-parameter coding value, while a redundant parameter removal algorithm filters out duplicate or invalid constraint information. Finally, based on the integrated coded dataset, a multi-dimensional constraint parameter space model is constructed. This model uses the spatial position of the knitted structural unit as the dimension axis and the coding values of various constraint parameters as dimension values, ultimately generating a knitted structural constraint space that combines spatial accuracy, parameter completeness, and logical correlation.
[0070] In one possible implementation, step S500 further includes:
[0071] Step S510: In the knitted structure constraint space, establish structural state variables for each knitted structure unit. The structural state variables include needle type variables, needle density variables, and structural switching state variables.
[0072] Step S520: Based on the feature value distribution of each spatial location in the pattern feature field, construct a structural matching objective function to measure the consistency of knitted expression. The structural matching objective function is used to characterize the degree of matching between the current knitted structure state and the pattern feature field.
[0073] Step S530: Under the condition of satisfying the knitted structure constraint space, perform iterative update processing on the structural state variables, and output the target knitted structure after the structural matching objective function reaches the preset convergence condition.
[0074] Specifically, within the constructed knitted structure constraint space, each knitted structural unit is uniquely identified by its spatial index coordinates, and a set of independent and complete structural state variables is established for each unit. These structural state variables include three core sub-variables: the needle type variable, whose value range is strictly limited to the set of selectable needle types configured for the corresponding knitted structural unit, precisely characterizing the specific needle type to be used in the unit; the needle density variable, whose value range strictly follows the selectable needle density range parameters configured for the corresponding knitted structural unit, quantifying the density of the needle arrangement in the unit; and the structural switching state variable, used to identify the organizational structure switching attribute between the unit and adjacent knitted structural units, whose value is determined based on the structural continuity constraint parameters, distinguishing between different states such as no switching, gradual switching, and conditional switching. These three sub-variables work together to completely and clearly define the forming state of the knitted structural unit, laying the foundation for the subsequent construction and iterative optimization of the structural matching objective function.
[0075] Core feature values at each spatial location in the pattern feature field are extracted, including structural density variation trend values, texture complexity distribution values, and pattern boundary transition characteristic values. A weighted fusion algorithm is then used to assign preset weight coefficients to the three types of feature values: structural density variation trend value (0.4), texture complexity distribution value (0.35), and pattern boundary transition characteristic value (0.25), to highlight the influence of core features on the matching results. Next, for each knitted structural unit, the actual feature output values corresponding to the current structural state variables (needle type, needle density, and structural switching state variables) are calculated. The deviation between the actual feature output values and the target feature values of the pattern feature field is calculated using the Euclidean distance formula. A process feasibility penalty term is then introduced to apply a penalty coefficient to structural state variables that exceed the capabilities of the knitting machine or violate structural continuity constraints. Finally, a structural matching objective function is constructed, with the function expression F(x) = +λ×P(x), where These are the feature weight coefficients. Output values for actual features. λ is the target feature value, λ is the penalty coefficient, and P(x) is the process feasibility penalty term. The smaller the value of this function, the higher the degree of matching between the current knitting structure state and the pattern feature field.
[0076] The gradient descent optimization algorithm is used as the core iterative tool. The needle density interval parameters, the set of optional needle types, and the structural continuity constraint parameters in the knitted structure constraint space are set as hard constraints in the iterative process, ensuring that the structural state variables updated in each iteration do not exceed the constraint boundaries. Then, the structural state variables of each knitted structure unit are initialized. The needle type variable uses the basic needle from the set of optional needle types as its initial value, the needle density variable uses the midpoint of the interval as its initial value, and the structural switching state variable is set to no switching state by default. Next, the iterative process is started. In each iteration, the structural matching objective function value corresponding to the current structural state variable is calculated. The update direction and step size of the state variables are determined by calculating the gradient direction of the objective function. A greedy strategy is used to select better needle types for the needle type variable, and a small-step gradient adjustment method is used to optimize the value of the needle density variable. For the structural switching state variable, whether to trigger a gradual switching is determined based on the state difference between adjacent units. Simultaneously, a preset convergence condition is set: when the change in the objective function value of 10 consecutive iterations is less than 1×10⁻⁻⁻⁶. 5 When all structural state variables satisfy the constraints, the convergence state is determined; finally, the iteration process is stopped, and the converged structural state variables are integrated into a complete structural dataset according to the spatial index coordinates, and the target knitted structure with both pattern reproduction and process feasibility is output.
[0077] In one possible implementation, step S500 further includes:
[0078] During the iterative update of the structural state variables, a smoothing constraint is applied to the structural state variables of adjacent knitted structural units to reduce the magnitude of structural abrupt changes between adjacent knitted structural units.
[0079] Specifically, during the iterative update of structural state variables, an adjacent unit state association algorithm is introduced to apply smooth constraints to the structural state variables of adjacent knitted structural units. The specific implementation is as follows: Based on the spatial topological relationship of the knitted structural unit mesh, a 3×3 neighborhood unit index table is established for each knitted structural unit, clearly defining its adjacent units in the top, bottom, left, right, and diagonal directions; secondly, for the needle density variable, the needle density difference between the current unit and its neighboring units is calculated, and a density difference threshold is set, such as ≤5 needles / square centimeter. During iterative updates, if the needle density adjustment of the current unit causes the density difference with neighboring units to exceed the threshold, the adjustment amount is attenuated proportionally to ensure that the density change presents a gradual trend; for For the needle type variable, a needle type compatibility matrix is constructed, and the switching cost between different needle types is predefined. When iteratively selecting a new needle type, the option with a lower switching cost compared to the needle types of neighboring units is prioritized. If a switch to a high-cost needle type is required, a transition needle insertion mechanism is triggered, configuring 1-2 transition needle units between adjacent units. For the structural switching state variable, a state switching buffer marker is added. When there is a structural switching requirement between adjacent units, the edge unit of the switching area is marked as a buffer unit, and the adjustment range of the structural state variable of the buffer unit is limited to 50% of that of the regular unit. Through the above methods, the structural abruptness between adjacent knitting structural units is effectively reduced, ensuring the continuity and stability of the overall knitting structure.
[0080] In one possible implementation, step S500 further includes:
[0081] After performing a combined mapping of the pattern image, target knitted structure, weaving resolution requirements, and knitting machine needle pitch parameters, the data is packaged and stored as an associated dataset. Subsequent knitted structure generation compensation is then performed based on this associated dataset.
[0082] Specifically, a multi-source data spatial alignment algorithm is employed to uniformly transform the pixel coordinate system of the pattern image into the spatial index coordinate system of the knitted structure unit grid. This achieves precise positional matching between the pixel features of the pattern image and the unit state variables of the target knitted structure. Simultaneously, the weaving resolution requirement is quantized into feature extraction accuracy coefficients, and the knitting machine needle pitch parameter is quantized into structural unit size coefficients, which are embedded into the coordinate transformation model to construct a three-dimensional combined mapping relationship between pattern pixels, structural units, and equipment parameters. Subsequently, a standardized data encapsulation tool is used to integrate and package the mapped pattern pixel matrix, the target knitted structure state variable dataset, the weaving resolution quantization coefficients, and the knitting machine needle pitch quantization coefficients according to a preset data header-feature data block-structural parameter block-equipment parameter block-mapping relationship block format. Each data package is assigned a unique identifier. The system first generates an associated identification code, which includes classification codes for pattern type, structural features, and equipment parameters. The packaged associated dataset is then stored in a distributed database supporting fast retrieval, and a retrieval directory indexed by the associated identification code is established. Finally, during subsequent knitted structure generation, a similar case retrieval algorithm retrieves historical datasets from the associated dataset whose pattern features and equipment parameters match the current generation task above a preset threshold. The system extracts needle density deviation values, needle type adaptability, and structural continuity error values from the historical generation process. Based on these deviation data, targeted compensation coefficients and correction thresholds are calculated and embedded as constraints into the new knitted structure generation iterative model. This ensures accurate compensation for subsequent knitted structure generation, improving the adaptability of the newly generated structure to pattern features and equipment parameters.
[0083] Example 2, based on the same inventive concept as the pattern feature-based intelligent generation method for knitted structures in the foregoing examples, such as... Figure 2 As shown, this application provides an intelligent knitted structure generation system based on pattern features. The system and method embodiments in this application are based on the same inventive concept. The system includes:
[0084] The image analysis and processing module 10 is used to acquire the pattern image corresponding to the knitted structure to be generated, and to perform weaving-guided image analysis processing on the pattern image. The image analysis and processing includes multi-scale pattern decomposition and pattern directionality analysis to extract multi-dimensional pattern feature information that respectively characterizes the overall outline, local texture distribution and directional characteristics of the pattern.
[0085] The pattern feature field construction module 20 is used to construct a pattern feature field based on multi-dimensional pattern feature information to describe the spatial distribution relationship of patterns under weaving semantics.
[0086] The structural constraint mark establishment module 30 is used to perform weaveability analysis using the pattern feature field, identify feature regions in the pattern features that do not meet the preset knitting structure generation constraints, and establish corresponding structural constraint marks.
[0087] The constraint space construction module 40 is used to construct a knitted structure constraint space based on the pattern feature field and structural constraint markers. The knitted structure constraint space is used to limit the selection of needle type, the position of structure switching and the range of structure change during the knitted structure generation process.
[0088] The target knitted structure establishment module 50 is used to perform knitted structure calculation and establish the target knitted structure within the knitted structure constraint space, using the pattern feature field as the target guiding condition.
[0089] Furthermore, the system is also used to implement the following functions:
[0090] The pattern image is transformed to a unified weaving analysis coordinate system, and the pattern image is resampled in a gridded manner according to a preset spatial sampling step size to establish a pattern sampling matrix. Multi-scale resolution decomposition processing is performed on the pattern sampling matrix to generate pattern contour response maps, texture energy distribution maps, and detail perturbation distribution maps at different scale levels, where different scale levels correspond to different knitting structure levels. Based on the pattern contour response map, the number of connected branches, the rate of change of boundary curvature, and the area distribution parameters of the pattern region are extracted to form a pattern contour structure feature set. Based on the texture energy distribution map, the texture energy projection values and texture repetition spacing parameters of the pattern in different directions are calculated to form a pattern texture periodic feature set. Based on the detail perturbation distribution map, perturbation regions in the pattern whose local grayscale or color changes exceed a preset threshold are identified, and the spatial location and distribution density of the perturbation regions are recorded simultaneously to form a pattern local perturbation feature set. The pattern contour structure feature set, pattern texture periodic feature set, and pattern local perturbation feature set are combined and encoded to generate multi-dimensional pattern feature information containing spatial coordinate indices.
[0091] Furthermore, the system is also used to implement the following functions:
[0092] According to the preset number of scale levels, the pattern sampling matrix is sequentially subjected to spatial scale reduction processing. In each scale level, the pattern sampling matrix is subjected to low-frequency smoothing sampling and high-frequency detail-preserving sampling to generate the basic structure matrix and detail response matrix of the corresponding scale level. Using the basic structure matrix of each scale level, the regional contour boundary and connectivity information of the pattern are extracted to form contour response data for generating the pattern contour response map. Based on the detail response matrix of each scale level, the local energy distribution value and directional change intensity of the pattern at the corresponding scale level are calculated to form detail response data for generating the texture energy distribution map and detail perturbation distribution map. The contour response data and detail response data at different scale levels are combined according to scale weights to generate the corresponding pattern contour response map, texture energy distribution map and detail perturbation distribution map.
[0093] Furthermore, the system is also used to implement the following functions:
[0094] Based on the weaving resolution requirements and knitting machine needle pitch parameters for the generated knitted structure, target knitted structure levels to be involved in structure generation are selected from the set of knitted structure levels. The set of knitted structure levels includes knitted structure levels, needle row structure levels, and local needle technique levels. Each target knitted structure level is mapped to a pattern analysis scale level, and the number of target knitted structure levels is used as the number of scale levels for multi-scale resolution decomposition.
[0095] Furthermore, the system is also used to implement the following functions:
[0096] The pattern feature field is used to characterize the structural density variation trend, texture complexity distribution, and pattern boundary transition characteristics of the pattern region.
[0097] Furthermore, the system is also used to implement the following functions:
[0098] Based on the spatial index coordinates of the pattern feature field, a knitted structure unit grid corresponding one-to-one with the pattern area is established, and the structural constraint markers are mapped to the corresponding knitted structure unit grids to form a structural constraint mapping relationship. Based on the feature information representing the trend of structural density change in the pattern feature field, optional needle density interval parameters are configured for each knitted structure unit. Based on the feature information representing the distribution of texture complexity in the pattern feature field, an optional needle type set is configured for each knitted structure unit. Based on the structural constraint markers, architecture switching restriction parameters or structural continuity constraint parameters are applied to knitted structure units that do not meet the preset knitted structure generation constraints to limit needle abrupt changes or structural jumps. The needle density interval parameters, optional needle type sets, and structural continuity constraint parameters of each knitted structure unit are uniformly encoded to generate a knitted structure constraint space.
[0099] Furthermore, the system is also used to implement the following functions:
[0100] In the knitted structure constraint space, structural state variables are established for each knitted structure unit. These structural state variables include needle type variables, needle density variables, and structural switching state variables. Based on the feature value distribution of each spatial location in the pattern feature field, a structural matching objective function is constructed to measure the consistency of knitted expression. This objective function characterizes the degree of matching between the current knitted structure state and the pattern feature field. Under the condition of satisfying the knitted structure constraint space, iterative update processing is performed on the structural state variables. After the structural matching objective function reaches the preset convergence condition, the target knitted structure is output.
[0101] Furthermore, the system is also used to implement the following functions:
[0102] During the iterative update of the structural state variables, a smoothing constraint is applied to the structural state variables of adjacent knitted structural units to reduce the magnitude of structural abrupt changes between adjacent knitted structural units.
[0103] Furthermore, the system is also used to implement the following functions:
[0104] After performing a combined mapping of the pattern image, target knitted structure, weaving resolution requirements, and knitting machine needle pitch parameters, the data is packaged and stored as an associated dataset. Subsequent knitted structure generation compensation is then performed based on this associated dataset.
[0105] It should be noted that the order of the embodiments described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. Specific embodiments of this specification have been described above. Furthermore, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0106] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
[0107] This specification and accompanying drawings are merely illustrative examples of this application and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from its scope. Therefore, if such modifications and variations fall within the scope of this application and its equivalents, this application intends to include such modifications and variations.
Claims
1. A method for intelligent generation of knitted structures based on pattern features, characterized in that, The method includes: Obtain the pattern image corresponding to the knitted structure to be generated, and perform weaving-guided image analysis processing on the pattern image. The image analysis processing includes multi-scale pattern decomposition and pattern directionality analysis to extract multi-dimensional pattern feature information that respectively characterizes the overall outline, local texture distribution and directional characteristics of the pattern. A pattern feature field is constructed based on multidimensional pattern feature information to describe the spatial distribution relationship of patterns under weaving semantics; Weaveability analysis is performed using the pattern feature field to identify feature regions in the pattern features that do not meet the preset knitting structure generation constraints, and corresponding structural constraint markers are established. Based on the pattern feature field and structural constraint markers, a knitted structure constraint space is constructed. The knitted structure constraint space is used to limit the selection of stitch type, the position of structure switching and the range of structure change during the knitted structure generation process. Within the constrained space of the knitted structure, the pattern feature field is used as the target guiding condition to perform the knitted structure calculation and establish the target knitted structure.
2. The intelligent generation method for knitted structures based on pattern features as described in claim 1, characterized in that, Extract multi-dimensional pattern feature information that represents the overall pattern outline, local texture distribution, and directional characteristics, including: The pattern image is converted to a unified weaving analysis coordinate system, and the pattern image is resampled in a gridded manner according to a preset spatial sampling step size to establish a pattern sampling matrix; Multi-scale resolution decomposition processing is performed on the pattern sampling matrix to generate pattern contour response map, texture energy distribution map and detail perturbation distribution map at different scale levels, where different scale levels correspond to different knitting structure levels; Based on the pattern contour response map, the number of connected branches, the rate of change of boundary curvature, and the area distribution parameters of the pattern region are extracted to form a set of pattern contour structural features. Based on the texture energy distribution map, the texture energy projection values and texture repetition spacing parameters of the pattern in different directions are calculated to form a set of pattern texture periodic features; Based on the detailed perturbation distribution map, perturbation areas in the pattern whose local grayscale or color changes exceed a preset threshold are identified, and the spatial location and distribution density of the perturbation areas are recorded simultaneously to form a set of local perturbation features of the pattern. The pattern contour structure feature set, pattern texture periodic feature set, and pattern local perturbation feature set are combined and encoded to generate multidimensional pattern feature information containing spatial coordinate indexes.
3. The intelligent generation method for knitted structures based on pattern features as described in claim 2, characterized in that, Performing multi-scale resolution decomposition processing on the pattern sampling matrix includes: According to the preset number of scale levels, the spatial scale reduction process is sequentially performed on the pattern sampling matrix. In each scale level, the pattern sampling matrix is subjected to low-frequency smoothing sampling and high-frequency detail-preserving sampling to generate the basic structure matrix and detail response matrix of the corresponding scale level. Using the basic structure matrix at each scale level, the regional contour boundary and connectivity information of the pattern are extracted to form contour response data for generating the pattern contour response map; Based on the detail response matrix at each scale level, the local energy distribution value and directional change intensity of the pattern at the corresponding scale level are calculated to form detail response data used to generate texture energy distribution map and detail perturbation distribution map. Contour response data and detail response data at different scale levels are combined according to scale weights to generate corresponding pattern contour response maps, texture energy distribution maps, and detail perturbation distribution maps.
4. The intelligent generation method for knitted structures based on pattern features as described in claim 3, characterized in that, The number of scale levels is determined according to the set of knitted structure levels, including: Based on the weaving resolution requirements and knitting machine needle pitch parameters for the knitted structure to be generated, the target knitted structure level to participate in the structure generation is selected from the set of knitted structure levels. The set of knitted structure levels includes knitted structure level, needle row structure level, and local needle technique level. Each target knitted structure level is mapped to a pattern analysis scale level, and the number of target knitted structure levels is used as the number of scale levels for multi-scale resolution decomposition.
5. The intelligent generation method for knitted structures based on pattern features as described in claim 1, characterized in that, The pattern feature field is used to characterize the structural density variation trend, texture complexity distribution, and pattern boundary transition characteristics of the pattern region.
6. The intelligent generation method for knitted structures based on pattern features as described in claim 1, characterized in that, Based on the pattern feature field and structural constraint markers, a knitted structure constraint space is constructed, including: Based on the spatial index coordinates of the pattern feature field, a knitted structure unit grid corresponding one-to-one with the pattern area is established, and the structural constraint mark is mapped to the corresponding knitted structure unit grid to form a structural constraint mapping relationship. Based on the feature information representing the trend of structural density change in the pattern feature field, selectable needle density range parameters are configured for each knitted structural unit; Based on the feature information representing the texture complexity distribution in the pattern feature field, a set of optional needlework types is configured for each knitted structural unit; Based on the structural constraint marker, a structure switching constraint parameter or a structural continuity constraint parameter is applied to the knitted structure unit that does not meet the preset knitted structure generation constraint, in order to restrict abrupt changes in stitch pattern or structural jumps. The needle density range parameters, selectable needle type sets, and structural continuity constraint parameters of each knitted structural unit are uniformly encoded to generate a knitted structural constraint space.
7. The intelligent generation method for knitted structures based on pattern features as described in claim 6, characterized in that, Within the constrained space of the knitted structure, the knitted structure is solved using the pattern feature field as the target guiding condition, including: In the knitted structure constraint space, structural state variables are established for each knitted structure unit. The structural state variables include needle type variables, needle density variables, and structural switching state variables. Based on the feature value distribution of each spatial location in the pattern feature field, a structural matching objective function is constructed to measure the consistency of knitted expression. The structural matching objective function is used to characterize the degree of matching between the current knitted structure state and the pattern feature field. Under the condition of satisfying the constraints of the knitted structure space, the structural state variables are iteratively updated, and the target knitted structure is output after the structural matching objective function reaches the preset convergence condition.
8. The intelligent generation method for knitted structures based on pattern features as described in claim 7, characterized in that, During the iterative update of the structural state variables, a smoothing constraint is applied to the structural state variables of adjacent knitted structural units to reduce the magnitude of structural abrupt changes between adjacent knitted structural units.
9. The intelligent generation method for knitted structures based on pattern features as described in claim 1, characterized in that, After performing a combined mapping of the pattern image, target knitted structure, weaving resolution requirements, and knitting machine needle pitch parameters, the data is packaged and stored as an associated dataset. Subsequent knitted structure generation compensation is then performed based on this associated dataset.
10. A smart knitted structure generation system based on pattern features, characterized in that, The system is used to implement the intelligent generation method for knitted structures based on pattern features as described in any one of claims 1-9, and the system comprises: The image analysis and processing module is used to acquire the pattern image corresponding to the knitted structure to be generated, and to perform weaving-guided image analysis processing on the pattern image. The image analysis and processing includes multi-scale pattern decomposition and pattern directionality analysis to extract multi-dimensional pattern feature information that respectively characterizes the overall outline, local texture distribution and directional characteristics of the pattern. The pattern feature field construction module is used to construct a pattern feature field based on multi-dimensional pattern feature information to describe the spatial distribution relationship of patterns under weaving semantics; The structural constraint mark establishment module is used to perform weaveability analysis using the pattern feature field, identify feature regions in the pattern features that do not meet the preset knitting structure generation constraints, and establish corresponding structural constraint marks. The constraint space construction module is used to construct a knitted structure constraint space based on the pattern feature field and structural constraint markers. The knitted structure constraint space is used to limit the selection of needle type, the position of structure switching and the range of structure change during the knitted structure generation process. The target knitted structure creation module is used to perform knitted structure calculation and create the target knitted structure within the knitted structure constraint space, using the pattern feature field as the target guiding condition.