A seamless pattern morphing design method and device for textile CAD structure
Patent Information
- Application Number
- CN202610993894.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-06
- Publication Date
- 2026-10-16
AI Technical Summary
[0006]有鉴于此,本申请首先提供了一种面向纺织品CAD结构的无缝图案变形设计方法,针对包含有高曲率曲线、突变折线等形态结构线的纺织品,不仅能够有效提高图案在复杂结构线条件下的连续性与形状保持能力,解决纺织品中缝边图案在不同结构形态下的连续性与几何一致性问题,还能增强变形结果的稳定性与自然性,实现目标图案的无缝变形设计
[0061] To ensure that the deformation results simultaneously satisfy the requirements of control point matching accuracy and spatial smoothness, a regularization parameter λ is introduced during the solution process, and the following optimization objective function is established:
Smart Images

Figure CN122926519A_ABST
Abstract
Description
Technical Field
[0001] This application relates to a seamless pattern deformation design method and apparatus for textile CAD structures, belonging to the field of textile design and image processing technology. Background Technology
[0002] With the development of personalized design and digital manufacturing in textiles, seamless patterns are increasingly widely used in clothing, home textiles, and digital printing. Seamless patterns achieve a continuous transition of design at the seams along the structural lines of textiles, effectively ensuring visual consistency and avoiding problems such as pattern breaks and misalignments that occur with traditional splicing methods. This plays a crucial role in enhancing the appearance quality and aesthetic value of products.
[0003] Traditional seamless patterns in textiles are mainly based on manual alignment of real fabrics. This method relies on human experience, is inefficient, and is prone to producing obvious pattern breaks and discontinuities at the seams when the seam boundaries cannot be unfolded into a complete plane, making it difficult to meet the design requirements of complex textile structures.
[0004] In recent years, with the development of digital technology, pattern mapping methods based on 3D models have been gradually applied to the field of seamless pattern design. This type of method achieves pattern matching and splicing continuity to a certain extent, but it relies on complex 3D modeling and rendering processes, requiring designers to have high modeling skills, thus increasing the design threshold and implementation cost. Furthermore, in the process of transforming 3D models into actual textile production, due to factors such as modeling accuracy, material properties, and process differences, there are often deviations between the virtual and real garment structures, which in turn affect the pattern matching effect and the quality of the final product.
[0005] Using textile CAD structures as a medium for pattern design and deformation processing is more in line with existing industry processes and has more direct engineering application value. However, most existing seamless pattern design methods have failed to effectively integrate with CAD structures and lack geometric constraint mechanisms for engineering pattern-making structural lines. In practical applications, when textile structural lines exhibit high curvature curves, abrupt zigzag lines, or other similar shapes, how to achieve adaptive deformation of the pattern within the CAD structural space while ensuring continuity at seam boundaries and overall pattern stability remains a pressing technical problem to be solved. Summary of the Invention
[0006] In view of this, this application firstly provides a seamless pattern deformation design method for textile CAD structures. For textiles containing high curvature curves, abrupt break lines and other structural lines, it can not only effectively improve the continuity and shape retention of patterns under complex structural line conditions, solve the problem of continuity and geometric consistency of seam patterns in textiles under different structural forms, but also enhance the stability and naturalness of deformation results, and realize the seamless deformation design of target patterns.
[0007] Specifically, this application is implemented through the following scheme: A seamless pattern deformation design method for textile CAD structures, comprising the following steps: Step 1: Extract the structural lines from the CAD structure of the textile and classify them according to their geometric shape to establish prior structural constraints.
[0008] Step 2: Construct the mid-curve corresponding to the suture boundary based on the structural lines. M ( s The curve is mapped to the pattern space through affine transformation. The resulting pattern dividing lines are used to guide subsequent segmentation.
[0009] Step 3: Based on the pattern segmentation lines, a geometric region discrimination method is used to divide the pattern pixels into regions to obtain the segmented regions of the target pattern.
[0010] Step four involves extracting a set of feature points within the segmented region and constructing a feature mapping relationship between the pattern and the textile structure. This step is used to extract a set of feature points with spatial representation capabilities from the segmented pattern region and to construct a point set on the textile structure based on the mapping relationship.
[0011] Step 5: Using a pre-built training sample library, optimize the regularization parameters within a preset parameter range, and obtain the optimal regularization parameters for different structural line types based on the comprehensive evaluation function.
[0012] Step six: Based on the feature point set on the pattern from step four and the corresponding point set on the textile structure, a thin plate spline (TPS) deformation model is constructed, and an optimal regularization parameter corresponding to the structural line type is introduced to constrain the deformation. The thin plate spline (TPS) is used to deform the pattern, achieving a non-linear smooth mapping from the pattern to the target textile CAD structure.
[0013] Step seven: Based on the Thin Plate Spline (TPS) deformation model constrained in step six, the final TPS deformation function is constructed. Since the target image is usually a regular pixel grid, if a forward mapping method is used when the deformation amplitude is large, pixel holes or uneven coverage are likely to occur. Therefore, this method adopts an inverse mapping strategy to resample the pixels of the target image to complete the seamless pattern deformation design.
[0014] The above scheme utilizes curves to guide pattern segmentation in the construction of textile structural lines, establishes the correspondence between the source and target domains through feature point mapping, and combines the TPS model to realize the pattern deformation constrained by the structure. At the same time, it achieves adaptive optimization of regularization parameters through Hausdorff distance and bending energy.
[0015] Furthermore, as a preferred option: In step one, The structural lines include at least one of contour structural lines and stitching structural lines.
[0016] The classification refers to dividing structural lines into linear structural lines (… L s ), diamond structure line ( L d ), curved structural lines ( L c ) and parabolic structural lines ( L p ).
[0017] For CAD structural drawings of textiles such as clothing, home textiles, and bags, their outline structural lines or seam structural lines are classified into four categories according to their geometric shapes: straight lines, rhombuses, curves, and parabolas. This provides prior information on geometric structures to guide the adaptive selection of subsequent pattern segmentation, feature point extraction, and deformation constraint strategies.
[0018] To facilitate unified modeling and subsequent processing, a structural line category is constructed. L i The set of: .
[0019] Straight-line structure line ( L s ( ) refers to a seam boundary structure composed of straight line segments, typically used in straight-line stitching boundaries in clothing, home textiles, cushions, and bags; diamond-shaped structural lines ( L d A closed structural line () is formed by connecting multiple straight lines end to end and has obvious corner features; it is commonly found in structural parts such as waist darts in clothing; a curved structural line ( L c( ) refers to boundary structures composed of continuous smooth curves, widely found in the side seams of tops and skirts, as well as the outlines of home textiles, cushions, and bags; parabolic structural lines ( L p This refers to a curved structure whose geometric shape can be approximated by a parabolic function, typically used in key structural parts of clothing such as the sleeve cap line and armhole line.
[0020] In step two, The intermediate curve is constructed by interpolating and averaging two parameterized structural lines corresponding to the suture boundary under the same parameter conditions.
[0021] Suppose that the structural line corresponding to the suture boundary is composed of a pair of matching curves. It means that, among them This is the normalized arc length parameter. Based on the two curves mentioned above, construct their geometric mean curve. M ( s ), defined as follows: .
[0022] Due to the constructed mid-curve M ( s ) and image space I Since the scale and coordinate system are inconsistent, a global affine transformation is introduced to map the mid-curve to the pattern space, thus obtaining the pattern dividing lines. Its expression is: .
[0023] in, A Represents a linear transformation matrix. b This represents the translation vector.
[0024] Through the above mapping process, the geometric information of the structural lines is converted into pattern space. I The dividing lines in the image provide a deterministic geometric constraint basis for subsequent image segmentation.
[0025] In step three, Based on pattern dividing lines The pattern is divided into regions based on geometric discrimination. The pattern is considered to be defined in two-dimensional space. For any pixel X i First, at the pattern dividing line .
[0026] .
[0027] Calculate the two-dimensional cross product discriminant This represents the scalar result of the cross product of two-dimensional vectors.
[0028] according to They represent respectively by .in, At that time, they belong to two separate regions.
[0029] The segmentation method based on the cross product symbol described above can provide a stable, repeatable and human-intervention-free geometric division criterion for textile patterns, thereby achieving deterministic segmentation of seam edge patterns.
[0030] In step four, The set of feature points includes dividing line feature points and pattern feature points.
[0031] The segmentation line feature points include gradient feature points extracted based on pattern gradient, curvature feature points extracted based on curvature analysis, and segmentation line endpoints.
[0032] The pattern feature points refer to the set of pattern feature points determined by performing second-order statistical analysis on the pattern based on the gray-level co-occurrence matrix within the segmented region and by calculating the texture features of the local region.
[0033] For consistent description, the structural lines of textiles consist of a pair of seam boundary curves. Composition, in which The dividing line. Both regions use the same feature extraction and mapping method, denoted as Ω below. + Let's take an example to illustrate.
[0034] (1) Feature point extraction To extract pattern segmentation regions The Gray-Level Co-occurrence Matrix (GLCM) method was used to perform statistical analysis on the pattern to obtain the second-order statistical relationships between pixels. To ensure the stability of feature extraction, the segmented pattern regions were first converted into grayscale images and normalized. Based on this, a sliding window approach was used to extract local features from the pattern, with the window size set to... Pixels, and in four directions (0°, 45°, 90°, 135°) and pixel pitch. The texture features are calculated to obtain pattern feature points, which are represented as follows: .
[0035] Meanwhile, the feature point set of the pattern segmentation line ( P SF Extraction mainly includes segmentation gradient feature points, curvature feature points, and endpoints.
[0036] For gradient feature point extraction, the pattern segmentation lines M T ( sProjected onto the image space, detection is performed at locations where grayscale intensity changes significantly. When the grayscale difference between adjacent pixels satisfies... d i When the value is greater than 15, it is determined to be a set of gradient feature points. P gb ,in d i It represents the absolute difference in grayscale between adjacent pixels.
[0037] For curvature feature point extraction, the pattern segmentation line is calculated. M T ( s The curvature change of ) is used to extract the curvature threshold τ. k The set of curvature feature points is obtained by considering feature points with a value ≥1.3. P cb .
[0038] At the same time, to ensure the integrity of structural features, the pattern dividing lines are... M T ( s The starting point and ending point of ) are denoted as . p s and p e And include them in the feature point set.
[0039] Therefore, the set of feature points for pattern segmentation lines is defined as: .
[0040] Finally, the complete set of feature points for the image segmentation region is represented as: .
[0041] (2) Feature point mapping First, define the reference point: Definition The starting point and the ending point; definition O Let the midpoint of the arc length of the reference curve be; then Their target curves in textile structure are respectively. P ( s The corresponding point on ).
[0042] For the set of feature points of pattern segmentation lines P SF Due to its mapped feature points On the textile structure lines, the segmentation line feature points are transformed using an arc length ratio mapping strategy. For any segmentation line feature point... Determine the corresponding mapping point based on the same arc length ratio. .
[0043] For pattern feature point set PTF Since there is no one-to-one correspondence between them in the textile structural domain, a polar coordinate geometric scaling strategy is used for transformation. O and O′ Using the origin of the polar coordinate system, local polar coordinate systems are constructed in both the pattern domain and the textile domain. The global arc length scaling factor is defined as: These represent the arc lengths of the pattern reference curve and the textile structure curve, respectively.
[0044] For any pattern feature point : .
[0045] .
[0046] .
[0047] .
[0048] .
[0049] .
[0050] In step five, To achieve adaptive deformation control under different structural line types, before implementing the method, based on a representative training sample set, the structural line categories were analyzed. L i The regularization parameters were calibrated offline.
[0051] Specifically, for each structural line category The regularization parameter λ is uniformly sampled to obtain the parameter set: Regularization parameters for each parameter. K This represents the total number of sampling parameters.
[0052] For each λ k In the category of structural lines L i During the corresponding TPS deformation process, deformation solving and image resampling are performed respectively to obtain the corresponding deformation results, and the bending energy is calculated: .
[0053] .
[0054] .
[0055] The structure line categories constructed based on bending energy and Hausdorff distance Li The comprehensive evaluation function is expressed as follows: , H The distance to Hausdorff. E bend For bending energy, α , β The weight coefficients are non-negative and satisfy the following conditions: α + β =1, i For the index of the structure line category, λ k The regularization parameter is the k-th parameter.
[0056] The optimization process of the regularization parameter is as follows: For each type of structural line, a corresponding training sample set is constructed. Within the preset parameter range, the regularization parameter λ is sampled and TPS deformation calculation is performed. The deformation results are evaluated based on the comprehensive evaluation function, and the regularization parameter that minimizes the comprehensive evaluation function is selected as the corresponding structural line category. , This serves as an index for the structure line categories. A mapping relationship is established between the structure line categories and the optimal regularization parameters.
[0057] In the actual pattern deformation process, the pre-calibrated optimal regularization parameters are directly called according to the structure line category corresponding to the input pattern. λ * Perform TPS deformation.
[0058] In step six, The mapping function for constructing the thin plate spline (TPS) deformation model is expressed as follows: .
[0059] .
[0060] The TPS deformation model includes affine transformation terms and nonlinear radial basis function terms. The set of feature points is used as control points to constrain the TPS deformation model, and the deformation parameters are solved by minimizing the control point matching error.
[0061] To ensure that the deformation results simultaneously satisfy the requirements of control point matching accuracy and spatial smoothness, a regularization parameter λ is introduced during the solution process, and the following optimization objective function is established: .
[0062] E bend ( f ) is the bending energy term of the TPS deformation function.
[0063] In step seven, In the reverse mapping strategy, for each pixel in the target object This represents the reverse TPS mapping process.
[0064] Since the TPS deformation function usually does not have an explicit inverse function in analytical form, the inverse mapping strategy is approximated by the nearest neighbor inverse mapping numerical method, that is, based on the forward TPS mapping relationship, the inverse search is performed to obtain the source image coordinates corresponding to the target pixel.
[0065] After obtaining the corresponding position, the source image pixel values are reconstructed (i.e., resampled) using bilinear interpolation to obtain the target pixel values.
[0066] The above reverse mapping and interpolation process effectively avoids image holes and overlaps, ensuring the continuity and structural integrity of the deformed image.
[0067] Based on the above-described modified design method, the applicant provides an apparatus, comprising: 1) Structural line classification module: Obtain structural lines from the CAD structure of textiles and classify the structural lines according to their geometric morphological characteristics, thus completing step one of the above methods; 2) Mid-curve construction and mapping module: Based on the parameters obtained from the structural line classification module, construct and map the mid-curve corresponding to the suture boundary, completing step two of the above method; 3) Pattern segmentation module: Based on the results obtained from the curve construction and mapping module, the pattern pixels of the target pattern are divided into regions, completing step three of the above method; 4) Feature point extraction and mapping module: Based on the results obtained from the pattern segmentation module, feature points are extracted to complete the feature mapping between the source pattern domain and the target textile domain, thus completing step four of the above method; 5) Parameter optimization and selection module: Optimize the regularization parameters based on the pre-built training sample library and preset parameters, and select the optimal regularization parameters based on the structure line classification module to complete step five of the above method; 6) TPS Deformation Module: Based on the results obtained from the feature point extraction and mapping module and the parameter optimization and selection module, a thin plate spline TPS deformation model is constructed to complete step six of the above method; 7) Image Reconstruction Module: Based on the TPS deformation module, the target image is resampled using an inverse mapping strategy to complete the image reconstruction in step seven of the above method and generate a seamless deformation pattern.
[0068] Furthermore, the applicant provides a storage medium storing a program for performing the above-described method.
[0069] Furthermore, the applicant provides a device such as a computer that includes a memory that can execute a program of the above methods, more preferably, the program is executed by a processor to perform the above methods.
[0070] When the above program is executed by a processor or other means, the following steps are performed: Perform structural line classification and analysis; Constructing curves and performing image space mapping; Perform geometric discriminant-based segmentation on the image; Extract feature points and establish cross-domain mapping relationships; Perform optimization selection of the regularization parameter λ; Construct and solve the TPS deformation model; Perform reverse mapping image reconstruction. Attached Figure Description
[0071] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application.
[0072] Figure 1 This involves constructing curves and mapping dividing lines.
[0073] Figure 2 For feature point extraction and mapping.
[0074] Figure 3 Reconstructing images using TPS inverse interpolation.
[0075] Figure 4 The figure shows the CAD structural diagram of the continuous seam and the actual sewing effect. Part (a) in the figure is the structural diagram and part (b) is the actual object.
[0076] Figure 5 This is a schematic diagram of the device used in the method of this application. Detailed Implementation
[0077] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit the technical solutions of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without creative effort are within the scope of protection of this application.
[0078] This embodiment provides a seamless pattern deformation design method for textile CAD structures, the steps of which are as follows: I. Pattern Segmentation Based on Textile CAD Structure
[0079] (1) Classification method of textile structural lines based on geometric morphology For CAD structural drawings of textiles such as clothing, home textiles, and bags, their outline structural lines or seam structural lines are classified into four categories according to their geometric shapes: straight lines, rhombuses, curves, and parabolas. This provides prior information on geometric structures to guide the adaptive selection of subsequent pattern segmentation, feature point extraction, and deformation constraint strategies.
[0080] To facilitate unified modeling and subsequent processing, a structural line category is constructed. .
[0081] Among them, the straight-line structure line ( L s ( ) refers to a seam boundary structure composed of straight line segments, typically used in straight-line stitching boundaries in clothing, home textiles, cushions, and bags; diamond-shaped structural lines ( L d A closed structural line () is formed by connecting multiple straight lines end to end and has obvious corner features; it is commonly found in structural parts such as waist darts in clothing; a curved structural line ( L c ( ) refers to boundary structures composed of continuous smooth curves, widely found in the side seams of tops and skirts, as well as the outlines of home textiles, cushions, and bags; parabolic structural lines ( L p This refers to a curved structure whose geometric shape can be approximated by a parabolic function, typically used in key structural parts of clothing such as the sleeve cap line and armhole line.
[0082] (2) Construction of curves and pattern dividing lines Based on the structural lines of textiles, a medium curve is constructed for expressing the stitching state. M ( s ), and then map it to the pattern space through affine transformation ( I ∈ R 2 ( ), to form pattern dividing lines to guide subsequent divisions.
[0083] Combination Figures 1 to 4 Suppose that the structural line corresponding to the suture boundary is composed of a pair of matching curves. .
[0084] Due to the constructed mid-curve M ( s ) and image space I Since the scale and coordinate system are inconsistent, a global affine transformation is introduced to map the mid-curve to the pattern space, resulting in the pattern dividing line. M T( s Its expression is: .
[0085] in, A Represents a linear transformation matrix. b This represents the translation vector.
[0086] Through the above mapping process, the geometric information of the structural lines is converted into pattern space. I The dividing lines in the image provide a deterministic geometric constraint basis for subsequent image segmentation.
[0087] (3) Geometric region discrimination and segmentation method based on pattern segmentation lines Based on pattern dividing lines M T ( s The pattern is divided into regions based on geometric discrimination. The pattern is considered to be defined in two-dimensional space. , .
[0088] .
[0089] This represents the scalar result of the cross product of two-dimensional vectors.
[0090] according to . respectively represent by .
[0091] This segmentation method based on cross product symbols can provide stable, repeatable, and human-intervention-free geometric division criteria for textile patterns, thereby achieving deterministic segmentation of seam edge patterns.
[0092] II. Feature Point Extraction and Cross-Domain Mapping
[0093] This step extracts a set of feature points with spatial representation capabilities from the segmented pattern region for subsequent structural mapping and deformation analysis. The feature point set includes segmentation line feature points and pattern feature points.
[0094] .
[0095] (1) Feature point extraction Pattern feature points refer to the set of pattern feature points determined by performing second-order statistical analysis on the pattern based on the gray-level co-occurrence matrix within the segmented region and by calculating the texture features of the local region.
[0096] To extract pattern segmentation regions The Gray-Level Co-occurrence Matrix (GLCM) method is used to perform statistical analysis on the pattern to obtain the second-order statistical relationship between pixels. To ensure the stability of feature extraction, the segmented pattern regions are first converted into grayscale images and normalized. Based on this, a sliding window approach is used to extract local features from the pattern, with the window size... .
[0097] Simultaneously, the pattern segmentation line feature points include gradient feature points extracted based on pattern gradients, curvature feature points extracted based on curvature analysis, and the endpoints of the segmentation lines. Pattern segmentation line feature point set ( P SF Extraction mainly includes segmentation gradient feature points, curvature feature points, and endpoints.
[0098] For gradient feature point extraction, the pattern segmentation lines M T ( s Projected onto the image space, detection is performed at locations where grayscale intensity changes significantly. When the grayscale difference between adjacent pixels satisfies... d i When the value is greater than 15, it is determined to be a set of gradient feature points. P gb ,in d i It represents the absolute difference in grayscale between adjacent pixels.
[0099] For curvature feature point extraction, the pattern segmentation line is calculated. M T ( s The curvature change of ) is used to extract the curvature threshold τ. k The set of curvature feature points is obtained by considering feature points with a value ≥1.3. P cb .
[0100] At the same time, to ensure the integrity of structural features, the pattern dividing lines are... M T ( s The starting point and ending point of ) are denoted as . p s and p e And include them in the feature point set.
[0101] Therefore, the set of feature points for pattern segmentation lines is defined as: .
[0102] Finally, the complete set of feature points for the image segmentation region is represented as: .
[0103] (2) Feature point mapping .
[0104] For the set of feature points of pattern segmentation lines P SF Due to its mapped feature points P SF ′ On the textile structure lines, the feature points of the dividing lines are transformed using an arc length ratio mapping strategy. For any dividing line feature... .
[0105] .
[0106] .
[0107] .
[0108] .
[0109] .
[0110] .
[0111] .
[0112] By combining the feature mapping results of structural lines and texture features, a complete set of feature points for the structural domain is obtained: .
[0113] III. TPS Deformation Model Construction, Classification Optimization, and Pattern Resampling This section is explained as follows: (1) Construction of TPS Deformation Model This method uses thin plate splines (TPS) to deform the pattern, achieving a non-linear smooth mapping from the source pattern to the target textile CAD structure. The mapping function is expressed as follows: .
[0114] To ensure that the deformation results simultaneously satisfy the requirements of control point matching accuracy and spatial smoothness, a regularization parameter λ is introduced during the solution process, and the following optimization objective function is established: .
[0115] (2) Optimization of regularization parameters for different structural line types To achieve adaptive deformation control under different structural line types, before implementing the method, based on a representative training sample set, the structural line categories were analyzed. L i The regularization parameters were calibrated offline.
[0116] .
[0117] .
[0118] .
[0119] .
[0120] .
[0121] .
[0122] In the actual pattern deformation process, the pre-calibrated optimal regularization parameters are directly called according to the structure line category corresponding to the input pattern. λ * Perform TPS deformation.
[0123] (3) Reverse TPS pattern resampling based on optimal parameters Since the target image is usually a regular pixel grid, when the deformation is large, using the forward mapping method can easily lead to pixel holes or uneven coverage. Therefore, this method uses a reverse mapping strategy to resample the pixels of the target image to complete the seamless pattern deformation design.
[0124] .
[0125] Since the TPS deformation function usually does not have an explicit inverse function in analytical form, the inverse mapping strategy is approximated by the nearest neighbor inverse mapping numerical method, that is, based on the forward TPS mapping relationship, the inverse search is performed to obtain the source image coordinates corresponding to the target pixel.
[0126] After obtaining the corresponding position, the source image pixel values are reconstructed (i.e., resampled) using bilinear interpolation to obtain the target pixel values.
[0127] The above reverse mapping and interpolation process effectively avoids image holes and overlaps, ensuring the continuity and structural integrity of the deformed image.
[0128] In addition, the applicant also provided a device for implementing the above-mentioned deformation design method, combined with Figure 5 ,include: Structural Line Classification Module: This module takes CAD structural input of textiles, obtains structural lines, and classifies the structural lines according to their geometric morphological characteristics to obtain structural line type parameters, thus completing step one of the above methods. The structural lines obtained by this module are then sent to the curve construction and mapping module, and the structural line type is sent as a parameter to the parameter optimization and selection module.
[0129] 2) Medium curve construction and mapping module: Input the pattern into this module, and construct the medium curve corresponding to the stitching boundary based on the structural lines obtained from the structural line classification module, and map the pattern segmentation line to complete step two of the above method.
[0130] 3) Pattern segmentation module: Based on the pattern segmentation line obtained by the curve construction and mapping module, the pattern pixels of the target pattern are divided into regions to obtain the segmented region of the target pattern, thus completing step three of the above method.
[0131] 4) Feature point extraction and mapping module: Based on the segmented region obtained by the pattern segmentation module, feature points are extracted, and a feature mapping relationship between the source pattern domain and the target textile domain is constructed. Step four in the above method is completed, and the obtained mapping relationship is transmitted to the TPS deformation module.
[0132] 5) Parameter optimization and selection module: Input the pre-training sample library and preset parameters into the parameter optimization and selection module. Combine the structure line type of the structure line classification module to complete the regularization and obtain the optimal regularization parameters. Then, transmit the optimal regularization parameters to the TPS deformation module.
[0133] 6) TPS Deformation Module: This module constructs a TPS deformation model based on the parameters transmitted by the feature point extraction and mapping module and the parameter optimization and selection module, and completes step six in the above method.
[0134] 7) Image Reconstruction Module: Based on the TPS deformation module, the final TPS deformation function is constructed, and the target image is resampled using an inverse mapping strategy to complete the seamless pattern deformation output.
[0135] The apparatus for implementing the above method may also be a computer-readable storage medium or a computer device.
[0136] The computer device includes a processor, a memory, and a computer program stored in the memory, wherein when the computer program is executed by the processor, the following steps are performed: Perform structural line classification and analysis; Constructing curves and performing image space mapping; Perform geometric discriminant-based segmentation on the image; Extract feature points and establish cross-domain mapping relationships; Perform optimization selection of the regularization parameter λ; Construct and solve the TPS deformation model; Perform reverse mapping image reconstruction.
[0137] A computer program is stored on a computer-readable storage medium, which, when executed by a processor, implements the aforementioned seamless pattern design method based on structural line constraints and TPS deformation.
[0138] The aforementioned method and apparatus address the issue of continuity and geometric consistency of seam patterns in textiles under different structural morphologies. It utilizes curves to guide pattern segmentation during the construction of textile structural lines, establishes a correspondence between the source and target domains through feature point mapping, and combines a TPS model to achieve pattern deformation constrained by the structure. Simultaneously, it achieves adaptive optimization of regularization parameters through Hausdorff distance and bending energy. This effectively improves the continuity and shape retention of patterns under complex structural line conditions, enhances the stability and naturalness of the deformation results, and is suitable for the intelligent design and generation of textiles with CAD structures, such as clothing, home textiles, and bags.
[0139] The above-described embodiments are merely illustrative of several feasible implementations of the present invention, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the present invention, nor are the embodiments intended to limit the scope of protection in the claims of the present invention. For those skilled in the art, various modifications and improvements can be made without departing from the concept of the present invention. All equivalent implementations or changes that do not depart from the present invention should be included in the technology of the present invention.
Claims
1. A seamless pattern deformation design method for textile CAD structures, characterized in that, The steps are as follows: Step 1: Extract structural lines from the CAD structure of the textile and classify them according to their geometric shapes; Step 2: Construct the mid-curve corresponding to the suture boundary based on the structural lines, and map the mid-curve to the pattern space through affine transformation to obtain the pattern segmentation line. The mid-curve is constructed by interpolating and averaging the two parameterized structural lines corresponding to the suture boundary under the same parameter conditions. Step 3: Based on the pattern segmentation lines, a geometric region discrimination method is used to divide the pattern pixels into regions to obtain the segmented regions of the target pattern; Step 4: Extract feature point sets within the segmented region and construct the feature mapping relationship between the pattern and the textile structure; Step 5: Using a pre-built training sample library, optimize the regularization parameters within a preset parameter range, and obtain the optimal regularization parameters for different structural line types based on the comprehensive evaluation function; Step 6: Based on the mapped corresponding point set, construct the TPS deformation model and introduce the optimal regularization parameter corresponding to the structure line type to constrain the deformation; Step 7: Based on the TPS deformation model of the thin plate spline constrained in Step 6, construct the final TPS deformation function, and use the inverse mapping strategy to resample the target image pixels to complete the seamless pattern deformation design.
2. The seamless pattern deformation design method for textile CAD structures according to claim 1, characterized in that: In step one, the structural lines include at least one of contour structural lines and stitching structural lines. The structural lines are classified into straight structural lines, rhomboid structural lines, curved structural lines and parabolic structural lines.
3. The seamless pattern deformation design method for textile CAD structures according to claim 1, characterized in that, In step three, the geometric region discrimination method satisfies: This represents the scalar result of the cross product of two-dimensional vectors. , .
4. The seamless pattern deformation design method for textile CAD structures according to claim 1, characterized in that, In step four, the feature point set includes dividing line feature points and pattern feature points. The dividing line feature points are mapped using an arc length ratio method: for any dividing line feature point... Calculate the normalized arc length parameter of the curve in the CAD structural domain, and determine the corresponding mapping point on the target curve at the same arc length ratio. The pattern feature points are mapped using polar coordinates with geometric proportions: a polar coordinate system is constructed using a reference point, and for any pattern feature point... The target mapping point is obtained by performing structural scaling transformations on its polar angle and radial distance respectively. .
5. The seamless pattern deformation design method for textile CAD structures according to claim 4, characterized in that, The pattern feature points refer to the set of pattern feature points determined by performing second-order statistical analysis on the pattern based on the gray-level co-occurrence matrix within the segmented region and by calculating the texture features of the local region; the segmentation line feature points include gradient feature points extracted based on the pattern gradient, curvature feature points extracted based on curvature analysis, and the endpoints of the segmentation line.
6. The seamless pattern deformation design method for textile CAD structures according to claim 1, characterized in that, In step five, the comprehensive evaluation function is expressed as: , in, H The distance to Hausdorff. E bend For bending energy, α , β These are the weighting coefficients. i For the index of the structure line category, λ k For the first k One regularization parameter.
7. The seamless pattern deformation design method for textile CAD structures according to claim 1, characterized in that, In step five, the optimization process for the regularization parameter is as follows: For each type of structural line, a corresponding training sample set is constructed. Within the preset parameter range, the regularization parameter λ is sampled and TPS deformation calculations are performed. The deformation results are evaluated based on the comprehensive evaluation function to determine the corresponding structural line category. L i Optimal regularization parameters The k-th regularization parameter for uniform sampling. J ( λ k ) is the comprehensive evaluation function, and i is the index of the structural line category.
8. The seamless pattern deformation design method for textile CAD structures according to claim 1, characterized in that, In step seven, the reverse mapping strategy is implemented using a numerical approximation method based on the forward TPS mapping, satisfying: This represents the reverse TPS numerical mapping process.
9. An apparatus for use in the method according to any one of claims 1 to 8, characterized in that, include: 1) Structural line classification module: Acquires and classifies structural lines; 2) Mid-curve construction and mapping module: Based on the parameters obtained from the structural line classification module, construct and map the mid-curve corresponding to the suture boundary; 3) Pattern segmentation module: Based on the results obtained from the curve construction and mapping module, the pattern pixels of the target pattern are divided into regions; 4) Feature point extraction and mapping module: Based on the results obtained from the pattern segmentation module, feature points are extracted to complete the feature mapping between the source pattern domain and the target textile domain; 5) Parameter optimization and selection module: Optimizes regularization parameters based on a pre-built training sample library and preset parameters, and selects the optimal regularization parameters based on the structure line classification module; 6) TPS Deformation Module: Based on the results obtained from the feature point extraction and mapping module and the parameter optimization and selection module, a TPS deformation model is constructed; 7) Image Reconstruction Module: Based on the TPS deformation module, the target image is resampled using an inverse mapping strategy to complete image reconstruction.
10. A medium or apparatus for performing a procedure corresponding to the method of any one of claims 1 to 8.