A textile image data enhancement method and system

Through color domain recognition and iterative processing of mean drift, target-oriented fragment removal and corner response, combined with evolutionary search strategy, the problems of spatial coherence and color similarity in textile image data enhancement are solved, and texture detail retention and enhancement efficiency are improved.

CN120235795BActive Publication Date: 2025-08-15HEZE TEXTILE FIBER INSPECTION INST
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510705655.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-15
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

Existing textile image data enhancement methods are difficult to balance spatial coherence and color similarity. The lack of processing of key inflection points leads to loss of textile image details and features, and it is impossible to balance detail denoising and smoothing with overall contrast enhancement, which has poor enhancement efficiency.

Method used

Through iterative processing of color domain recognition and mean drift, combined with the outline details modification of target-oriented fragmentation culling and corner response, an evolutionary search strategy for elite seeds, crosses, mutations and opposition learning is introduced, weights and scales are dynamically adjusted, and parameters are optimized to achieve global enhancement.

Benefits of technology

Effectively retain the coherence of the same-color pattern area and texture core of textile images, improve the enhancement effect of textile image data, meet the needs of different application scenarios, and improve the enhancement efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235795B_ABST
    Figure CN120235795B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for textile image data enhancement, which includes collecting textile image sets, textile texture color clustering, debris removal, searching for optimal segmentation thresholds, contour detail modification, and global enhancement. The present invention belongs to the field of textile image data enhancement, and specifically refers to a method and system for textile image data enhancement. This solution performs color domain recognition and mean shift iterative processing on textile image data, completely retaining the same color pattern area; contour detail modification based on corner response eliminates aliasing without losing the pattern structure, thereby improving the enhancement effect; through an evolutionary search strategy, the four mechanisms of elite seed, crossover, mutation, and adversarial learning are introduced to work together to avoid falling into local optimality; through dynamic weight and scale updates, the breadth of the search space is guaranteed in the early stage, and fine optimization is focused in the later stage; the needs of textile images in different application scenarios are better met, thereby improving the textile image data enhancement effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of textile image data enhancement, and in particular to a textile image data enhancement method and system. Background Art

[0002] Textile image data enhancement methods systematically generate more and more diverse training samples based on original textile images through targeted image processing and transformation techniques to improve the model's recognition and generalization capabilities for textile textures, patterns, and colors. However, typical textile image data enhancement methods struggle to balance spatial coherence and color similarity in textile images, and lack processing of key inflection points, resulting in loss of detail and features in textile images. They also struggle to strike a balance between detail denoising and smoothing and overall contrast enhancement, resulting in poor efficiency. Summary of the Invention

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a method and system for textile image data enhancement. In view of the problem that general textile image data enhancement methods have difficulty in taking into account both the spatial coherence and color similarity of textile images, and the lack of processing of key inflection points leads to the loss of details and features of textile images, this solution performs color domain recognition and mean shift iterative processing on textile image data, which can not only eliminate noise caused by slight color differences, but also completely retain the same color pattern area; retain the texture core coherence through target-oriented fragment removal; first invert the image to highlight the texture details, and then map it to polar coordinates to stretch the pattern around the center, taking into account different weaving directions and non- The optimal segmentation effect of the same pattern; contour detail modification based on corner response eliminates aliasing without losing pattern structure, improving the data enhancement effect of textile images; in view of the problem that general textile image data enhancement methods cannot strike a balance between detail denoising and smoothing and overall contrast enhancement, and the efficiency of textile image data enhancement is poor, this scheme introduces four mechanisms of elite seed, crossover, mutation and adversarial learning through evolutionary search strategy to avoid falling into local optimality; through dynamic weight and scale update, the breadth of the early search space is guaranteed, and the later focus is on fine optimization; better meet the needs of textile images in different application scenarios, and thus improve the data enhancement effect of textile images.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides a method for enhancing textile image data, which comprises the following steps:

[0005] Step S1: collecting a textile image set;

[0006] Step S2: textile texture color clustering;

[0007] Step S3: debris removal;

[0008] Step S4: Searching for the optimal segmentation threshold;

[0009] Step S5: contour detail modification;

[0010] Step S6: Global enhancement.

[0011] Furthermore, in step S1, a textile image set is collected; and preliminary size regularization, format unification, and noise filtering processing are performed on the textile images.

[0012] Furthermore, in step S2, the textile texture color clustering specifically includes the following steps:

[0013] Step S21: Color domain identification: For pixel i in the image, define a feature vector in the space + color domain , expressed as: ;in, It is the spatial coordinate information; is the color component of pixel i in Lab space; for the neighboring pixels m of pixel i, if they meet the conditions in Lab color distance: ; can be regarded as the same color domain; among them, is the color component of pixel m in Lab space; is the color domain threshold;

[0014] Step S22: weighted mean iteration to find the convergence center; apply mean shift clustering to get the center of pixels in the same color domain through weighted mean iteration; at the kth iteration, let the current center be , the next iteration center The update form is: ; ; Where N is the total number of pixels; is the color component of the i-th pixel; g(·) is the indicator function, and x1 is the auxiliary variable; after iteration until the center converges, the color component of the center is assigned to the pixels in the domain to complete the clustering of the color texture block.

[0015] Furthermore, in step S3, the fragment removal is to merge the adjacent pixel blocks of the clustered textile image if their center Lab value is less than the color threshold; and to remove the adjacent pixel blocks whose area is less than area to be eliminated.

[0016] Furthermore, in step S4, the search for the optimal segmentation threshold is to process the textile image after the fragments are removed, which specifically includes the following steps:

[0017] Step S41: color inversion operation; the color inversion operation is expressed as: ;in, is the pixel value after inversion; is the maximum value of the pixel value; is the original pixel value; the inversion operation result is regarded as a polar coordinate diagram, and then returned to the Cartesian coordinate for processing. The entire coordinate transformation process is expressed as: ; ; ; ; ; ; ;in, is the pixel value in the polar coordinate plot; is the pixel value in Cartesian coordinates; x1 and y1 are Cartesian coordinates; and is the Cartesian coordinate of the center pixel; I is the relative position; is the azimuth; and are the radial and angular coordinates in polar coordinates respectively; Used to normalize angles to the image's height range; Used to map image width; is the mapping coefficient; is the maximum radius from the center of the image to the farthest edge; and is the desired output image size;

[0018] Step S42: Segmentation consistency evaluation: Compare the segmentation results obtained under different thresholds and measure the consistency by the matching degree of the mask contour; let the local values of the segmentation results A and B be and , matching degree Expressed as: ; Where N is the total number of contour points; sign(·) is the sign function; in the threshold interval [p,q], several segmentation threshold points are taken each time, and the matching degree of the segmentation result is calculated. The matching degree difference of adjacent threshold points is calculated. Expressed as: ;in, and are the matching degrees of the segmentation results at the j+1th threshold and the jth threshold respectively; is the normalization coefficient; the minimum The corresponding threshold segment is the optimal segmentation threshold segment; then a binary search is performed to obtain the optimal segmentation threshold; similarly, the color block area threshold is traversed in the interval [m,n] to obtain the number of cluster blocks in Cartesian and polar coordinates and ; then calculate: ; ;in, and are the differences in the number of blocks between the i-th and i+1-th color block area thresholds; is the rate of change of difference; find the minimum The interval is taken as the optimal range, and further binary search is performed to determine the final segmentation threshold.

[0019] Furthermore, in step S5, the contour detail modification is to modify the segmented textile image; the corner point response is performed on the local window in the image to obtain the edge key points of the pattern and texture, which is expressed as: ;in, is the corner point response value; u, v are the position offsets relative to the center of the current pixel; is the two-dimensional coordinate of the pixel; is the Gaussian kernel function; It is grayscale; set the edge angle threshold , only the angle is retained The key points of the 3D image are removed, and redundant scattered corner points are removed; and the right angle determination is performed, which is expressed as: ;in, is the right angle determination indicator function; is the right angle determination threshold; It is the actual angle value calculated by the two edges for each corner point among the remaining corner points.

[0020] Furthermore, in step S6, the global enhancement is to enhance the textile image after contour detail modification, which specifically includes the following steps:

[0021] Step S61: Parameter vector definition: For the oth individual, define the parameter vector ; Dimensions correspond to adjustable parameters; each parameter has a lower bound and upper bound ; and They are parameter vectors Parameter values of the 1st and Dth dimensions;

[0022] Step S62: Hybrid enhancement operator; the textile image after contour detail modification is used as an input image; based on the individual position, a hybrid enhancement operator is applied to the input image, including non-local mean filtering, histogram equalization, and noise perturbation. The enhancement operation is defined as: ;in, is the enhanced output image; It is to perform non-local mean filtering on the input image. is the filter strength; It is the input graph The result of histogram equalization; It has a mean of 0 and a standard deviation of Gaussian noise; is a constant bias term for the entire image, used for overall brightness adjustment; and is the weighting coefficient;

[0023] Step S63: fitness function design; comprehensive quality indicators, including peak signal-to-noise ratio, structural similarity and color difference; fitness function Expressed as: ; ;in, 、 and They are the normalized peak signal-to-noise ratio, structural similarity, and color difference; 、 and Is the indicator weight; the optimal enhancement parameter combination is found by maximizing the fitness;

[0024] Step S64: Design a search strategy; the initial generation population size is N, and individual positions are randomly generated; the top E individuals in this generation are directly retained as elite individuals to the next generation; the remaining individuals are selected through tournament selection to generate parents; elite seed generation is applied to the elite individuals of each generation, and the remaining individuals are subjected to crossover mechanism, mutation mechanism and adversarial learning expansion; elite seed generation is expressed as: ;in, is the position of the generated elite seed individual in the dth dimension; is the parameter value of the dth dimension of the oth elite individual; is the parameter value of the dth dimension of the random elite individual; is the parameter value of the dth dimension of the global optimal individual; rand is a random number between 0 and 1; ST is the probability threshold; the crossover mechanism is expressed as: ;in, is the parameter value of the dth dimension of the crossover mechanism to generate offspring; is the cross weight; is the parameter value of the dth dimension of the oth individual; the applied mutation mechanism is expressed as: ;in, is the parameter value of the dth dimension after mutation; is a random number between 0 and 1 used by the mutation mechanism; the adversarial learning extension is to apply the adversarial learning extension to the current optimal N / 2 individuals, expressed as: ;in, and are the parameter values of the dth dimension after and before the expansion of adversarial learning, respectively;

[0025] Step S65: Update the cross-weight, expressed as: ; Where t is the current generation; maxFE is the maximum generation; is the lower limit parameter; the population size is updated in each generation and is expressed as: ;in, is the updated population size; the updated population is selected based on the fitness value; is the current population size; set the fitness threshold. When there is an individual fitness value higher than the fitness threshold, the global enhancement optimization ends; if the maximum number of generations is reached, the search strategy is re-run;

[0026] Step S66: global enhancement; performing enhancement operation based on the optimal individual corresponding parameters at the end of global enhancement optimization; obtaining the textile image data enhancement result.

[0027] The present invention provides a textile image data enhancement system, which includes a textile image set acquisition module, a textile texture and color clustering module, a debris removal module, an optimal segmentation threshold search module, a contour detail modification module and a global enhancement module;

[0028] The textile image set acquisition module acquires a textile image set;

[0029] The textile texture color clustering module aggregates similar color blocks in the textile image through color domain recognition and mean shift clustering;

[0030] The debris removal module removes debris from the textile image after textile texture and color clustering;

[0031] The optimal segmentation threshold search module performs segmentation processing on the textile image after debris removal;

[0032] The contour detail modification module uses local corner point response and angle threshold to screen key edge points and modify the segmented contour;

[0033] The global enhancement module applies a hybrid enhancement operator and optimizes parameters through an evolutionary algorithm to achieve global image enhancement.

[0034] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0035] (1) In view of the fact that general textile image data enhancement methods have difficulty in taking into account both the spatial coherence and color similarity of textile images, and the lack of processing of key inflection points leads to the loss of details and features of textile images, this scheme performs color domain recognition and mean shift iterative processing on textile image data, which can not only eliminate noise caused by slight color differences, but also completely retain the pattern area of the same color system; retain the core coherence of the texture through target-oriented fragment removal; first invert the image to highlight the texture details, and then map it to polar coordinates to stretch the pattern around the center, taking into account the optimal segmentation effect of different weaving directions and different patterns; based on the contour detail modification of corner point response, it eliminates aliasing without losing the pattern structure, thereby improving the textile image data enhancement effect.

[0036] (2) In view of the fact that general textile image data enhancement methods cannot strike a balance between detail denoising and smoothing and overall contrast enhancement, and the textile image data enhancement efficiency is poor, this scheme introduces the four mechanisms of elite seed, crossover, mutation and adversarial learning through evolutionary search strategy to avoid falling into local optimality; through dynamic weight and scale update, the breadth of the early search space is guaranteed, and the later focus is on fine optimization; it better meets the needs of textile images in different application scenarios; and thus improves the textile image data enhancement effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic flow chart of a textile image data enhancement method provided by the present invention;

[0038] Figure 2 This is a schematic diagram of a textile image data enhancement system provided by the present invention.

[0039] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0041] In the description of the present invention, it should be understood that terms such as "up", "down", "front", "back", "left", "right", "top", "bottom", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the system or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they should not be understood as limiting the present invention.

[0042] Example 1, see Figure 1 The present invention provides a method for enhancing textile image data, which comprises the following steps:

[0043] Step S1: collecting a textile image set;

[0044] Step S2: Textile texture color clustering: clustering similar color blocks of textile images through color domain recognition and mean shift clustering;

[0045] Step S3: debris removal: performing debris removal on the textile image after textile texture color clustering;

[0046] Step S4: searching for the optimal segmentation threshold; performing segmentation processing on the textile image after debris removal;

[0047] Step S5: contour detail modification: using local corner point response and angle threshold to screen key edge points and modify the segmented contour;

[0048] Step S6: Global enhancement: applying a hybrid enhancement operator and optimizing parameters through an evolutionary algorithm to achieve global image enhancement.

[0049] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, a textile image set containing a variety of fabric textures, dyeing, and warp and weft interweaving patterns is collected; and the textile images are preliminarily processed by size regularization, format unification, and noise filtering.

[0050] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, textile texture color clustering specifically includes the following steps:

[0051] Step S21: Color domain recognition; capture pattern blocks, seams, and color areas on the textile image to provide accurate masks for local enhancement; for pixel i in the image, define a feature vector in the space + color domain , expressed as: ;in, It is the spatial coordinate information; is the color component of pixel i in Lab space; for the neighboring pixels m of pixel i, if they meet the conditions in Lab color distance: ; can be regarded as the same color domain; among them, is the color component of pixel m in Lab space; is the color domain threshold; in textile images, this step can aggregate similar color blocks together, which is conducive to detecting the same color pattern area;

[0052] Step S22: weighted mean iteration to find the convergence center; apply mean shift clustering to get the center of pixels in the same color domain through weighted mean iteration; at the kth iteration, let the current center be , the next iteration center The update form is: ; ; Where N is the total number of pixels; is the color component of the i-th pixel; g(·) is the indicator function, and x1 is the auxiliary variable. After iteration until the center converges, the color component of the center is assigned to the pixels in the domain to complete the clustering of color texture blocks, making the subsequent local enhancement replacement more controllable.

[0053] Example 4, see Figure 1 This embodiment is based on the above embodiment. In step S3, the fragment removal is to merge the adjacent pixel blocks of the clustered textile image if their center Lab value is less than the color threshold; and to remove the adjacent pixel blocks whose area is less than The area is removed to ensure that there is no interference from a large number of meaningless small fragments in the segmentation of the fabric pattern, while also retaining the core coherence of the texture.

[0054] Example 5, see Figure 1 This embodiment is based on the above embodiment. In step S4, searching for the optimal segmentation threshold is to process the textile image after the fragments are removed. Specifically, the following steps are included:

[0055] Step S41: inversion operation; in order to better evaluate the segmentation consistency after polar coordinate transformation, the textile image is inverted to help highlight the textile texture details and enhance the perception of texture boundaries in the subsequent Cartesian coordinate comparison. The inversion operation is expressed as: ;in, is the pixel value after inversion; is the maximum value of the pixel value; is the original pixel value; the inversion operation result is regarded as a polar coordinate diagram, and then returned to the Cartesian coordinate for processing. The entire coordinate transformation process is expressed as: ; ; ; ; ; ; ;in, is the pixel value in the polar coordinate plot; is the pixel value in Cartesian coordinates; x1 and y1 are Cartesian coordinates; and is the Cartesian coordinate of the center pixel; I is the relative position; is the azimuth; and are the radial and angular coordinates in polar coordinates respectively; Used to normalize angles to the image's height range; Used to map image width; is the mapping coefficient; is the maximum radius from the center of the image to the farthest edge; and is the desired output image size; in textile image data enhancement, polar coordinate transformation is used to generate concentrically distorted pattern deformation, which can enrich the data enhancement form;

[0056] Step S42: Segmentation consistency evaluation: Compare the segmentation results obtained under different thresholds and measure the consistency by the matching degree of the mask contour; let the local values of the segmentation results A and B be and , matching degree Expressed as: ; Where N is the total number of contour points; sign(·) is the sign function; in the threshold interval [p,q], several segmentation threshold points are taken each time, and the matching degree of the segmentation result is calculated. The matching degree difference of adjacent threshold points is calculated. Expressed as: ;in, and are the matching degrees of the segmentation results at the j+1th threshold and the jth threshold respectively; is the normalization coefficient; the minimum The corresponding threshold segment is the optimal segmentation threshold segment; then a binary search is performed to obtain the optimal segmentation threshold; similarly, the color block area threshold is traversed in the interval [m,n] to obtain the number of cluster blocks in Cartesian and polar coordinates and ; then calculate: ; ;in, and are the differences in the number of blocks between the i-th and i+1-th color block area thresholds; is the rate of change of difference; find the minimum The interval is taken as the optimal range, and further binary search is performed to determine the final segmentation threshold.

[0057] Example 6, see Figure 1This embodiment is based on the above embodiment. In step S5, contour detail modification is performed on the segmented textile image. To improve the smoothness and regularity of the pattern edge of the textile image, the contour of the segmentation result is modified. Corner point response is performed on the local window in the image to obtain the edge key points of the pattern and texture, which can be expressed as: ;in, is the corner point response value; u, v are the position offsets relative to the center of the current pixel; is the two-dimensional coordinate of the pixel; is the Gaussian kernel function; It is grayscale; set the edge angle threshold , only the angle is retained The key points of the 3D image are removed, and redundant scattered corner points are removed; and the right angle determination is performed, which is expressed as: ;in, is the right angle determination indicator function; is the right angle determination threshold; It is the actual angle value calculated from the two edges for each corner point among the remaining corner points; retaining key points close to right angles, optimizing the pattern boundary, making the enhanced pattern boundary smoother and more regular, and improving the usability and aesthetics of the data.

[0058] By performing the above operations, in view of the problems that general textile image data enhancement methods have difficulty in taking into account both the spatial coherence and color similarity of textile images, and the lack of processing of key inflection points resulting in the loss of details and features of textile images, this scheme performs color domain recognition and mean shift iterative processing on textile image data, which can not only eliminate noise caused by slight color differences, but also completely retain the pattern areas of the same color system; retain the core coherence of the texture through target-oriented fragment removal; first invert the image to highlight the texture details, and then map it to polar coordinates to stretch the pattern around the center, taking into account the optimal segmentation effect of different weaving directions and different patterns; contour detail modification based on corner point response eliminates aliasing without losing the pattern structure, thereby improving the textile image data enhancement effect.

[0059] Example 7, see Figure 1 This embodiment is based on the above embodiment. In step S6, global enhancement is performed on the textile image after contour detail modification, specifically including the following steps:

[0060] Step S61: Parameter vector definition: For the oth individual, define the parameter vector ; Dimensions correspond to adjustable parameters, including contrast, brightness mapping coefficients, and local texture and color enhancement parameters of filter strength; each parameter has a lower bound and upper bound ; and They are parameter vectors Parameter values of the 1st and Dth dimensions;

[0061] Step S62: Hybrid enhancement operator; the textile image after contour detail modification is used as an input image; based on the individual position, a hybrid enhancement operator is applied to the input image, including non-local mean filtering, histogram equalization, and noise perturbation. The enhancement operation is defined as: ;in, is the enhanced output image; It is to perform non-local mean filtering on the input image. is the filter strength; It is the input graph The result of histogram equalization; It has a mean of 0 and a standard deviation of Gaussian noise; is a constant bias term for the entire image, used for overall brightness adjustment; and is the weighting coefficient;

[0062] Step S63: fitness function design; comprehensive quality indicators, including peak signal-to-noise ratio, structural similarity and color difference; fitness function Expressed as: ; ;in, 、 and They are the normalized peak signal-to-noise ratio, structural similarity, and color difference; 、 and Is the indicator weight; the optimal enhancement parameter combination is found by maximizing the fitness;

[0063] Step S64: Design a search strategy; the initial generation population size is N, and individual positions are randomly generated; the top E individuals in this generation are directly retained as elite individuals to the next generation; the remaining individuals are selected through tournament selection to generate parents; elite seed generation is applied to the elite individuals of each generation, and the remaining individuals are subjected to crossover mechanism, mutation mechanism and adversarial learning expansion; elite seed generation is expressed as: ;in, is the position of the generated elite seed individual in the dth dimension; is the parameter value of the dth dimension of the oth elite individual; is the parameter value of the dth dimension of the random elite individual; is the parameter value of the dth dimension of the global optimal individual; rand is a random number between 0 and 1; ST is the probability threshold; the crossover mechanism is expressed as: ;in, is the parameter value of the dth dimension of the crossover mechanism to generate offspring; is the cross weight; is the parameter value of the dth dimension of the oth individual; the applied mutation mechanism is expressed as: ;in, is the parameter value of the dth dimension after mutation; is a random number between 0 and 1 used by the mutation mechanism; the adversarial learning extension is to apply the adversarial learning extension to the current optimal N / 2 individuals, expressed as: ;in, and are the parameter values of the dth dimension after and before the expansion of adversarial learning, respectively;

[0064] Step S65: Update the cross-weight, expressed as: ; Where t is the current generation; maxFE is the maximum generation; is the lower limit parameter; the population size is updated in each generation and is expressed as: ;in, is the updated population size; the updated population is selected based on the fitness value; is the current population size; set the fitness threshold. When there is an individual fitness value higher than the fitness threshold, the global enhancement optimization ends; if the maximum number of generations is reached, the search strategy is re-run;

[0065] Step S66: global enhancement; performing enhancement operation based on the optimal individual corresponding parameters at the end of global enhancement optimization; obtaining the textile image data enhancement result.

[0066] By performing the above operations, in order to address the problem that general textile image data enhancement methods cannot strike a balance between detail denoising and smoothing and overall contrast enhancement, and the textile image data enhancement efficiency is poor, this scheme introduces four mechanisms of elite seed, crossover, mutation and adversarial learning through an evolutionary search strategy to avoid falling into local optimality; through dynamic weight and scale updates, the breadth of the early search space is guaranteed, and fine optimization is focused in the later stage; it better meets the needs of textile images in different application scenarios, and thus improves the textile image data enhancement effect.

[0067] Example 8, see Figure 2 This embodiment is based on the above embodiment. The present invention provides a textile image data enhancement system, which includes a textile image set acquisition module, a textile texture and color clustering module, a fragment removal module, an optimal segmentation threshold search module, a contour detail modification module, and a global enhancement module.

[0068] The textile image set acquisition module acquires a textile image set;

[0069] The textile texture color clustering module aggregates similar color blocks in the textile image through color domain recognition and mean shift clustering;

[0070] The debris removal module removes debris from the textile image after textile texture and color clustering;

[0071] The optimal segmentation threshold search module performs segmentation processing on the textile image after debris removal;

[0072] The contour detail modification module uses local corner point response and angle threshold to screen key edge points and modify the segmented contour;

[0073] The global enhancement module applies a hybrid enhancement operator and optimizes parameters through an evolutionary algorithm to achieve global image enhancement. It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises", "comprising" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0074] While the embodiments of the present invention have been shown and described, it will be apparent to those skilled in the art that various changes, modifications, substitutions, and alterations can be made to the embodiments without departing from the principles and spirit of the invention.

[0075] The present invention and its embodiments are described above. This description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if a person skilled in the art is inspired by this and, without departing from the purpose of the present invention, designs structures and embodiments similar to this technical solution without inventiveness, they shall fall within the scope of protection of the present invention.

Claims

1. A textile image data enhancement method, characterized by: The method comprises the following steps: Step S1: collecting a textile image set; Step S2: Textile texture color clustering: clustering similar color blocks of textile images through color domain recognition and mean shift clustering; Step S3: debris removal: performing debris removal on the textile image after textile texture color clustering; Step S4: searching for the optimal segmentation threshold; performing segmentation processing on the textile image after debris removal; Step S5: contour detail modification: using local corner point response and angle threshold to screen key edge points and modify the segmented contour; Step S6: global enhancement: applying a hybrid enhancement operator and optimizing parameters through an evolutionary algorithm to achieve global image enhancement; In step S4, the search for the optimal segmentation threshold is to process the textile image after the fragments are removed, which specifically includes the following steps: Step S41: color inversion operation; the color inversion operation is expressed as: ;in, is the pixel value after inversion; is the maximum value of the pixel value; is the original pixel value; the inversion operation result is regarded as a polar coordinate diagram, and then returned to the Cartesian coordinate for processing. The entire coordinate transformation process is expressed as: ; ; ; ; ; ; ;in, is the pixel value in the polar coordinate plot; is the pixel value in Cartesian coordinates; x1 and y1 are Cartesian coordinates; and is the Cartesian coordinate of the center pixel; I is the relative position; is the azimuth; and are the radial and angular coordinates in polar coordinates respectively; Used to normalize angles to the image's height range; Used to map image width; is the mapping coefficient; is the maximum radius from the center of the image to the farthest edge; and is the desired output image size; Step S42: Segmentation consistency evaluation: Compare the segmentation results obtained under different thresholds and measure the consistency by the matching degree of the mask contour; let the local values of the segmentation results A and B be and , matching degree Expressed as: ; Where N is the total number of contour points; sign(·) is the sign function; in the threshold interval [p,q], several segmentation threshold points are taken each time, and the matching degree of the segmentation result is calculated. The matching degree difference of adjacent threshold points is calculated. Expressed as: ;in, and are the matching degrees of the segmentation results at the j+1th threshold and the jth threshold respectively; is the normalization coefficient; the minimum The corresponding threshold segment is the optimal segmentation threshold segment; then a binary search is performed to obtain the optimal segmentation threshold; similarly, the color block area threshold is traversed in the interval [m,n] to obtain the number of cluster blocks in Cartesian and polar coordinates and ; then calculate: ; ;in, and are the differences in the number of blocks between the i-th and i+1-th color block area thresholds; is the rate of change of difference; find the minimum The interval is taken as the optimal range, and further binary search is performed to determine the final segmentation threshold.

2. The textile image data enhancement method according to claim 1, characterized in that: In step S2, the textile texture color clustering specifically includes the following steps: Step S21: Color domain identification: For pixel i in the image, define a feature vector in the space + color domain , expressed as: ;in, It is the spatial coordinate information; is the color component of pixel i in Lab space; for the neighboring pixels m of pixel i, if they meet the conditions in Lab color distance: ; can be regarded as the same color domain; among them, is the color component of pixel m in Lab space; is the color domain threshold; Step S22: weighted mean iteration to find the convergence center; apply mean shift clustering to get the center of pixels in the same color domain through weighted mean iteration; at the kth iteration, let the current center be , the next iteration center The update form is: ; ; Where N is the total number of pixels; is the color component of the i-th pixel; g(·) is the indicator function, and x1 is the auxiliary variable; after iteration until the center converges, the color component of the center is assigned to the pixels in the domain to complete the clustering of the color texture block.

3. The textile image data enhancement method according to claim 2, characterized in that: In step S5, the contour detail modification is to modify the segmented textile image; the corner point response is performed on the local window in the image to obtain the edge key points of the pattern and texture, which is expressed as: ;in, is the corner point response value; u, v are the position offsets relative to the center of the current pixel; is the two-dimensional coordinate of the pixel; is the Gaussian kernel function; It is grayscale; set the edge angle threshold , only the angle is retained The key points of the 3D image are removed, and redundant scattered corner points are removed; and the right angle determination is performed, which is expressed as: ;in, is the right angle determination indicator function; is the right angle determination threshold; It is the actual angle value calculated by the two edges for each corner point among the remaining corner points.

4. The textile image data enhancement method according to claim 3, characterized in that: In step S6, the global enhancement is to enhance the textile image after contour detail modification, which specifically includes the following steps: Step S61: Parameter vector definition: For the oth individual, define the parameter vector ; Dimensions correspond to adjustable parameters; each parameter has a lower bound and upper bound ; and They are parameter vectors Parameter values of the 1st and Dth dimensions; Step S62: Hybrid enhancement operator; the textile image after contour detail modification is used as an input image; based on the individual position, a hybrid enhancement operator is applied to the input image, including non-local mean filtering, histogram equalization, and noise perturbation. The enhancement operation is defined as: ;in, is the enhanced output image; It is to perform non-local mean filtering on the input image. is the filter strength; It is the input graph The result of histogram equalization; It has a mean of 0 and a standard deviation of Gaussian noise; is a constant bias term for the entire image, used for overall brightness adjustment; and is the weighting coefficient; Step S63: fitness function design; comprehensive quality indicators, including peak signal-to-noise ratio, structural similarity and color difference; fitness function Expressed as: ; ;in, 、 and They are the normalized peak signal-to-noise ratio, structural similarity, and color difference; 、 and Is the indicator weight; the optimal enhancement parameter combination is found by maximizing the fitness; Step S64: designing a search strategy; Step S65: Update cross weight; Step S66: global enhancement; performing enhancement operation based on the optimal individual corresponding parameters at the end of global enhancement optimization; obtaining the textile image data enhancement result.

5. The textile image data enhancement method according to claim 4, characterized in that: In step S64, the search strategy is designed to have an initial generation population size N and randomly generate individual positions; The top E individuals in this generation are directly retained as elite individuals to the next generation; the remaining individuals are selected through tournament selection to generate the parent generation; elite seed generation is applied to the elite individuals of each generation, and the remaining individuals are applied with crossover mechanism, mutation mechanism and adversarial learning expansion; Elite seed generation is represented as: ;in, is the position of the generated elite seed individual in the dth dimension; is the parameter value of the dth dimension of the oth elite individual; is the parameter value of the dth dimension of the random elite individual; is the parameter value of the dth dimension of the global optimal individual; rand is a random number between 0 and 1; ST is the probability threshold; the crossover mechanism is expressed as: ;in, is the parameter value of the dth dimension of the crossover mechanism to generate offspring; is the cross weight; is the parameter value of the dth dimension of the oth individual; the applied mutation mechanism is expressed as: ;in, is the parameter value of the dth dimension after mutation; is a random number between 0 and 1 used by the mutation mechanism; the adversarial learning extension is to apply the adversarial learning extension to the current optimal N / 2 individuals, expressed as: ;in, and are the parameter values of the dth dimension after and before the adversarial learning expansion, respectively.

6. The textile image data enhancement method according to claim 5, characterized in that: In step S65, the updated cross-weight is expressed as: ; Where t is the current generation; maxFE is the maximum generation; is the lower limit parameter; the population size is updated in each generation and is expressed as: ;in, is the updated population size; the updated population is selected based on the fitness value; is the current population size; set the fitness threshold. When there is an individual fitness value higher than the fitness threshold, the global enhancement optimization ends; if the maximum generation is reached, the search strategy is rerun.

7. A textile image data enhancement system, configured to implement the textile image data enhancement method according to any one of claims 1 to 6, characterized in that: It includes textile image set acquisition module, textile texture and color clustering module, debris removal module, optimal segmentation threshold search module, contour detail modification module and global enhancement module; The textile image set acquisition module acquires a textile image set; The textile texture color clustering module aggregates similar color blocks in the textile image through color domain recognition and mean shift clustering; The debris removal module removes debris from the textile image after textile texture and color clustering; The optimal segmentation threshold search module performs segmentation processing on the textile image after debris removal; The contour detail modification module uses local corner point response and angle threshold to screen key edge points and modify the segmented contour; The global enhancement module applies a hybrid enhancement operator and optimizes parameters through an evolutionary algorithm to achieve global image enhancement.

Citation Information

Patent Citations

  • Textile defect detection method based on defect enhancement

    CN102331425A