Yarn uniformity analysis method based on image processing
By employing multi-light source adaptive adjustment and image processing technology, the accuracy problem of yarn detection under complex lighting conditions has been solved, enabling efficient yarn uniformity assessment and defect identification, generating visual reports, and improving the efficiency and accuracy of textile quality control.
Patent Information
- Application Number
- CN202511405361.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-09-29
AI Technical Summary
Existing yarn uniformity testing methods struggle to accurately acquire yarn surface feature information under complex lighting conditions, resulting in large errors in the test results and failing to meet the needs of efficient and comprehensive quality assessment.
An image processing-based approach is adopted, which acquires the initial image through a multi-source adaptive adjustment system, performs illumination equalization processing, analyzes the yarn surface features using wavelet transform and deep learning, and combines edge detection and cluster analysis to determine candidate defect regions and generate a visualization report.
It improves the accuracy and efficiency of yarn uniformity detection, can accurately identify yarn defects under complex lighting conditions, generate intuitive quality assessment reports, and support textile quality control.
Smart Images

Figure CN120876499A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image data processing technology, and in particular relates to a yarn uniformity analysis method based on image processing. Background Technology
[0002] In the textile industry, yarn uniformity is a core factor determining fabric quality and performance, directly impacting product market competitiveness and production efficiency. Research and innovation in this area are crucial for driving automation and intelligentization in the industry. However, current mainstream testing methods have significant limitations. Traditional manual visual inspection is not only inefficient but also easily influenced by the operator's subjective experience, making it difficult to adapt to the needs of large-scale production. Physical equipment-based testing methods often require direct contact with the yarn, posing a risk of sample damage, and lack the comprehensive evaluation capability for multiple quality parameters, failing to meet the requirements of complex production scenarios.
[0003] Against this backdrop, yarn uniformity detection faces numerous technical challenges. The most pressing is accurately acquiring surface feature information of yarn in complex environments. Due to uneven lighting conditions or shadow interference in production sites, traditional image acquisition methods often fail to clearly present the true shape of the yarn, leading to increased errors in subsequent analysis. This instability in image quality further affects the reliability of feature extraction, especially when dealing with yarns with complex textures or color differences. Conventional methods struggle to accurately distinguish between normal structural features and defect features, resulting in biased or even invalid detection results. This series of problems makes achieving efficient and comprehensive uniformity assessment a pressing challenge that needs to be overcome. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention proposes an image processing-based yarn uniformity analysis method, which can effectively solve the challenges of yarn image acquisition and defect detection under complex lighting conditions, thereby improving the accuracy and efficiency of yarn uniformity detection.
[0005] To achieve the above objectives, the present invention provides a yarn uniformity analysis method based on image processing, comprising:
[0006] Acquire initial yarn image data, and obtain a first yarn image based on the initial yarn image data;
[0007] Based on the brightness distribution characteristics of the first yarn image, local contrast enhancement processing is performed on the uneven illumination area, and grayscale normalization is performed on the shadow interference area of the enhanced image to obtain a second yarn image with uniform brightness.
[0008] To address the differences in texture features in the second yarn image, wavelet transform image decomposition technology is used to divide the image into multiple frequency sub-bands, extract texture detail information in the high-frequency sub-bands, and obtain a preliminary feature distribution map of the yarn surface.
[0009] Using the preliminary feature distribution map, deep learning analysis is performed on the surface features of the yarn, and adaptive feature weighting is applied to the analyzed complex texture areas to obtain a more accurate third feature distribution map.
[0010] The regions in the third feature distribution map whose feature values exceed a preset abnormal threshold are subjected to local magnification analysis, and the boundaries of subtle defects are further extracted by combining edge detection algorithms to obtain the final set of defect candidate regions.
[0011] Based on the set of defect candidate regions, the candidate regions are grouped, and a feature similarity index is calculated for each group. If the similarity index is lower than a preset discrimination threshold, the non-defect region is eliminated, and the final defect location result is determined.
[0012] Based on the final defect location results and the overall characteristic distribution of the yarn, a uniformity evaluation score is calculated. The defect density and characteristic deviation in different areas are comprehensively quantified to obtain multi-dimensional evaluation data of yarn uniformity.
[0013] Based on the multi-dimensional evaluation data, a visual analysis report is generated to intuitively present the yarn uniformity distribution, mark the specific location information of high-defect areas, and obtain the final detection and analysis results.
[0014] Technical Advantages of this Invention: This invention discloses a yarn uniformity analysis method based on image processing. Addressing the challenge of yarn image acquisition under complex lighting conditions, it acquires initial images through a multi-source adaptive adjustment system and performs illumination equalization processing. Subsequently, wavelet transform and convolutional neural networks are used to extract yarn surface features, and abnormal areas are analyzed by local magnification and edge detection to determine candidate defect regions. Through cluster analysis and feature similarity calculation, non-defective regions are eliminated, ultimately yielding accurate defect location results. This invention also employs a weighted average algorithm to calculate uniformity evaluation scores and generate a visual analysis report, intuitively presenting the yarn uniformity distribution and defect locations. This invention effectively solves the challenges of yarn image acquisition and defect detection under complex lighting conditions, improving the accuracy and efficiency of yarn uniformity detection and providing important technical support for textile quality control. Attached Figure Description
[0015] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0016] Figure 1 This is a schematic flowchart of a yarn uniformity analysis method based on image processing according to an embodiment of the present invention. Detailed Implementation
[0017] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0018] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0019] like Figure 1 As shown, this embodiment provides a yarn uniformity analysis method based on image processing, including: acquiring initial yarn image data, and obtaining a first yarn image based on the initial yarn image data;
[0020] Based on the brightness distribution characteristics of the first yarn image, local contrast enhancement processing is performed on the uneven illumination area, and grayscale normalization is performed on the shadow interference area of the enhanced image to obtain a second yarn image with uniform brightness.
[0021] To address the differences in texture features in the second yarn image, wavelet transform image decomposition technology is used to divide the image into multiple frequency sub-bands, extract texture detail information in the high-frequency sub-bands, and obtain a preliminary feature distribution map of the yarn surface.
[0022] Using the preliminary feature distribution map, deep learning analysis is performed on the surface features of the yarn, and adaptive feature weighting is applied to the analyzed complex texture areas to obtain a more accurate third feature distribution map.
[0023] The regions in the third feature distribution map whose feature values exceed a preset abnormal threshold are subjected to local magnification analysis, and the boundaries of subtle defects are further extracted by combining edge detection algorithms to obtain the final set of defect candidate regions.
[0024] Based on the set of defect candidate regions, the candidate regions are grouped, and a feature similarity index is calculated for each group. If the similarity index is lower than a preset discrimination threshold, the non-defect region is eliminated, and the final defect location result is determined.
[0025] Based on the final defect location results and the overall characteristic distribution of the yarn, a uniformity evaluation score is calculated. The defect density and characteristic deviation in different areas are comprehensively quantified to obtain multi-dimensional evaluation data of yarn uniformity.
[0026] Based on the multi-dimensional evaluation data, a visual analysis report is generated to intuitively present the yarn uniformity distribution, mark the specific location information of high-defect areas, and obtain the final detection and analysis results.
[0027] Furthermore, acquiring the initial yarn image data includes:
[0028] Based on the multi-source adaptive adjustment mechanism, and considering the yarn characteristics under complex lighting conditions, a multi-angle illumination method is adopted. Environmental interference data is obtained through a preset light intensity sensor, and the output intensity of the light source is adjusted in real time by a light intensity dynamic module to obtain the initial yarn image data.
[0029] Furthermore, obtaining the first yarn image based on the initial yarn image data includes:
[0030] Using the initial yarn image data, an image acquisition device is used to acquire an initial image under multi-angle illumination conditions. If uneven illumination distribution is detected to exceed a preset threshold due to environmental interference factors, the light source output is further adjusted through a light intensity dynamic module to obtain the first yarn image.
[0031] Specifically, in complex lighting scenarios, a multi-light source adaptive adjustment mechanism is crucial for accurately capturing yarn characteristics. For multi-angle illumination, multiple light sources can be deployed, such as an adjustable-intensity LED at the top, side, and bottom of the yarn detection area, illuminating the yarn surface at angles of 45 degrees, 90 degrees, and 135 degrees respectively. This design covers different sides of the yarn, reducing shadow interference. Combined with a light intensity sensor, assuming an ambient light intensity of 200 lux and a preset optimal detection light intensity of 500 lux, the system monitors environmental interference data in real time and adjusts the light source output to a supplementary intensity of 300 lux via a dynamic light intensity module, thus forming preliminary balanced illumination distribution data. This method effectively avoids overexposure or underexposure, improving the stability of image acquisition. Specifically, based on balanced illumination distribution data, image acquisition devices such as high-resolution industrial cameras can acquire initial images under multi-angle illumination conditions. If uneven illumination is detected, such as a top light intensity of 550 lux while the side light intensity is only 450 lux, exceeding the preset threshold of 50 lux, the system will further adjust the illumination through a dynamic light intensity module, increasing the side light source output to 500 lux, thus forming an optimized first yarn image. This dynamic adjustment mechanism can significantly improve the uniformity of the image, laying the foundation for subsequent feature extraction.
[0032] Furthermore, obtaining a second yarn image with uniform brightness includes:
[0033] Based on the brightness distribution characteristics of the first yarn image, local contrast enhancement processing is performed on the uneven lighting area, and the intermediate yarn image after preliminary adjustment is obtained by adjusting the pixel value distribution range.
[0034] For the shadow interference area in the intermediate yarn image, the gray value of the local area is standardized. If the gray value of the shadow interference area is detected to deviate from the preset threshold, the shadow interference area is adjusted a second time to obtain a gray-scale balanced transition yarn image.
[0035] By detecting the overall brightness distribution of the transition yarn image, the areas where there is still uneven illumination are refined to obtain an optimized yarn image with a more uniform brightness distribution.
[0036] Based on the brightness characteristics of the optimized yarn image, the grayscale value and contrast of the optimized yarn image are finally detected. If it is found that a local area still does not meet the preset threshold, fine-tuning is performed using a local adjustment tool to obtain a second yarn image with balanced brightness.
[0037] Specifically, the application of grayscale normalization tools is particularly important for addressing shadow interference areas in intermediate yarn images. Shadow areas often result in low grayscale values, affecting subsequent analysis. Suppose a shadow area is detected with an average grayscale value of 60, while the preset threshold is 80. The tool will normalize the grayscale value of this area, narrowing the gap with other areas. If the initial adjustment still deviates from the threshold, for example, adjusting to 75, a second adjustment will be performed, ultimately bringing the grayscale value closer to 80, forming a grayscale-balanced transitional yarn image. This method effectively reduces the interference of shadows on the overall consistency of the image. In the detection of the overall brightness distribution of transitional yarn images, the refinement processing of the brightness equalization tool is crucial. Suppose the detection finds that the brightness value of the image edge area is 120, while the central area is 180, showing a significant unevenness. The tool will increase the brightness of the edge area, for example, adjusting the value to 150, while appropriately reducing the brightness of the central area to 160, to achieve uniformity in the overall brightness distribution, resulting in an optimized yarn image. This refinement process helps ensure more consistent detail presentation across different areas of the image. For verifying the brightness characteristics of optimized yarn images, the image verification tool performs a final check on the overall grayscale and contrast. Assuming the preset grayscale value range is 100 to 200, and a local area has a grayscale value of only 90, the tool will mark that area as unacceptable. Subsequently, the local adjustment tool will fine-tune this area, for example, by increasing the pixel value to 105, to ensure it meets the preset threshold, ultimately determining the second yarn image. This verification and fine-tuning mechanism further ensures image quality, providing a reliable foundation for subsequent yarn feature analysis.
[0038] Furthermore, obtaining a preliminary feature distribution map of the yarn surface includes:
[0039] Based on the texture characteristics of the second yarn image, the image is segmented into multiple levels, and different frequency components are separated to obtain high-frequency sub-band data and obtain a frequency layered image after preliminary decomposition.
[0040] For the high-frequency subband in the frequency layered image, the texture details are separated. If the signal strength of the high-frequency subband exceeds a preset threshold, enhancement processing is performed to determine the set of detailed features on the yarn surface.
[0041] By performing distribution analysis on the set of detailed features, the extracted texture details are correlated and matched with the surface characteristics of the yarn to obtain the distribution pattern corresponding to the surface characteristics and obtain a preliminary feature distribution map of the yarn surface.
[0042] Specifically, when processing the texture characteristics of the second yarn image, an image decomposition tool can be used to perform multi-level segmentation of the image. The core of this method is to decompose the image into different frequency components to separate high-frequency sub-band data. Assuming the yarn image contains fine surface textures and background noise, the decomposition tool can divide the image into high-frequency and low-frequency components. The high-frequency component typically corresponds to the detailed texture of the yarn surface, while the low-frequency component reflects more of the overall background information. After decomposition, a frequency-layered image is obtained, laying the foundation for subsequent detail extraction. The application of detail extraction tools is particularly important for the high-frequency sub-band in the frequency-layered image. Assuming the signal intensity range of the high-frequency sub-band has a preset threshold of 50, and a signal intensity of 70 is detected in a certain area, it indicates that this area contains relatively obvious texture details. At this time, the tool will enhance this part, highlighting the subtle features of the yarn surface, such as fiber roughness or breakage points, forming a set of detail features. This method can effectively capture key information of the yarn surface, providing support for subsequent analysis. When performing distribution analysis on the set of detail features, the feature mapping tool's role is to associate and match the extracted texture details with the characteristics of the yarn surface. Suppose analysis reveals a periodic distribution of texture details in a certain area, possibly due to regular tension variations during yarn weaving. The tool maps this periodicity onto surface properties, creating a preliminary surface feature distribution map. This correlation matching helps reveal underlying patterns on the yarn surface, providing a basis for quality inspection.
[0043] Furthermore, obtaining a more accurate third feature distribution map includes:
[0044] Based on the preliminary feature distribution map, the complex texture areas on the yarn surface are divided into regions to obtain surface detail data of at least one target region, resulting in a set of region details after division.
[0045] For the set of details in the region, the texture distribution of each region is separated. If the texture complexity of the region is detected to exceed a preset threshold, the region is adaptively adjusted to determine the weighted feature set.
[0046] The weighted feature set is used to process the feature matching of the yarn surface to obtain more accurate surface detail distribution data and obtain optimized feature mapping results.
[0047] Based on the optimized feature mapping results, the distribution map of the yarn surface is updated, and the surface details of different regions are integrated to obtain a more accurate third feature distribution map.
[0048] Specifically, when processing the initial distribution map of yarn surface texture features, image segmentation tools can be used to divide complex regions. Assuming certain areas in the yarn surface image have high texture density, exhibiting interlaced or stacked characteristics, the tool will divide these areas into multiple independent small regions based on the grayscale changes or boundary strength of the texture. For example, if the grayscale value of a certain region varies between 100 and 150, significantly higher than the average of 80 for the surrounding areas, it will be marked as a separate target region, and its surface detail data will be obtained, forming a region detail set. This segmentation method helps to decompose complex texture regions into smaller units, facilitating subsequent analysis. For the region detail set, feature extraction tools can further separate the texture distribution of each region. Assuming the preset texture complexity threshold is 60, and the complexity detection value of a certain region is 75, exceeding the threshold, the tool will activate an adaptive adjustment mechanism, increasing the analysis weight of that region, for example, adjusting the weight from the default 1.0 to 1.5, highlighting its texture features, forming a weighted feature set. This weighted processing allows subsequent analysis to focus more on the details of complex regions, ensuring that important information is not overlooked. When performing depth analysis using a weighted feature set, the depth analysis tool performs feature matching on the yarn surface. If the texture features of a certain area exhibit a specific directional distribution, the tool compares them with a known database of yarn surface characteristics to confirm whether they are common weave texture features. This generates more accurate surface detail distribution data, resulting in an optimized feature mapping. This matching process effectively improves the accuracy of feature distribution, providing a reliable basis for subsequent integration.
[0049] Furthermore, obtaining the final set of defect candidate regions includes:
[0050] Based on the third feature distribution map, the target area exceeding the preset abnormal threshold is locally magnified to obtain magnified surface detail data and obtain a magnified detail view.
[0051] Based on the magnified detailed view, boundary recognition processing is performed on minor defects. If the clarity of the detected defect boundary is lower than a preset threshold, a secondary sharpening process is performed to determine the range of clear defect boundaries.
[0052] Based on the clearly defined defect boundary range, the defect region is divided, and at least one independent candidate region is extracted from it to obtain a preliminary set of defect candidate regions.
[0053] Based on the preliminary set of candidate defect regions, the surface details and distribution map of each candidate region are matched. If the matching degree is lower than a preset threshold, details are extracted and supplemented to obtain the final set of candidate defect regions.
[0054] Specifically, when processing the third feature distribution map of yarn surface features, for areas with abnormal feature values, the image scaling tool can be used to locally magnify the target area exceeding the preset abnormality threshold. Assuming the preset abnormality threshold is 120, and a certain area has a feature value of 150, significantly exceeding the threshold, the tool will magnify the image of that area to twice its original size for clearer observation of surface detail data. This magnification process makes subtle texture changes or potential defects more intuitive, providing richer visual information for subsequent analysis. For the magnified detail view, the edge detection tool can help identify the boundaries of subtle defects. Assuming the preset defect boundary clarity threshold for a certain area is 80%, but the actual detection value is only 60%, the tool will initiate a secondary sharpening process, adjusting image contrast or enhancing edge pixel values to increase clarity to over 85%, thus determining a clear defect boundary range. This processing method ensures the accuracy of defect boundaries and avoids misjudgments caused by blurred boundaries.
[0055] Furthermore, determining the final defect location results includes:
[0056] Based on the final set of candidate defect regions, the candidate regions are initially grouped. For each region in the group, its surface feature data is obtained, and at least one feature vector is extracted from it to obtain the initial grouping result.
[0057] Based on the preliminary grouping results, the similarity of the feature vectors within the group is calculated. If the calculated similarity index is lower than the preset discrimination threshold, the corresponding region is marked as a non-defect region and removed to determine the filtered region set.
[0058] By comparing the surface detail depth of the filtered region set, detailed feature data is obtained, and it is determined whether the region meets the target defect standard, thus obtaining a candidate region set that meets the standard.
[0059] Based on the set of candidate regions that meet the criteria, the regions are subjected to boundary confirmation processing. If the boundary clarity reaches a preset threshold, the region is confirmed as the final defect location, and the final defect location result is obtained.
[0060] Specifically, in the textile industry, the analysis of candidate defect regions is particularly important when dealing with yarn surface defects. Using clustering tools to initially group candidate regions allows regions with similar surface features to be grouped together. Assuming 10 candidate regions are identified in a yarn surface image, the clustering tool divides them into 3 groups based on texture density and color distribution. Within each group, surface feature data, such as texture roughness and color difference values, are further extracted to form feature vectors, laying the foundation for subsequent analysis. Based on the initial grouping results, a feature comparison tool calculates the similarity of feature vectors within each group. If the preset discrimination threshold is 70%, and the similarity between two regions in a group is only 50%, it indicates that they may not belong to the same defect type, and the tool will mark the low-similarity regions as non-defect regions and remove them. Assuming a group has 5 regions, 2 are removed, leaving 3 regions to form a filtered region set. This approach helps focus on regions with a higher probability of defect. Based on the filtered region set, an image detail extraction tool performs a deep comparison of the surface details of each region. If the texture breakage rate in the detailed feature data of a certain region reaches 80% of a preset standard, then it is determined to meet the target defect standard and included in the candidate region set that meets the standard. Conversely, if the detailed feature rate of a certain region is only 40%, it will be excluded. This depth comparison can more accurately screen out potential defect regions.
[0061] Furthermore, multi-dimensional evaluation data for yarn evenness were obtained, including:
[0062] Based on the final defect location result, the yarn surface is divided into regions, and at least one feature parameter is extracted for each region to obtain a set of regional feature distributions.
[0063] The defect density of each region is quantified using the set of regional feature distributions. If the defect density is higher than a preset threshold, it is marked as a high-density region, and a set of high-density regions is determined.
[0064] Based on the set of high-density regions, feature extraction tools are used to calculate the feature deviation of each region and obtain feature deviation data. If the feature deviation exceeds a preset threshold, it is marked as a region with abnormal deviation, and a set of regions with abnormal deviation is obtained.
[0065] By combining the set of abnormal deviation regions with the set of regional feature distributions, a weighted average calculation is used to comprehensively process the yarn characteristics and defect density of the regions, thereby obtaining multi-dimensional evaluation data of yarn uniformity.
[0066] Specifically, in the business scenario of yarn surface defect analysis, region segmentation and feature parameter extraction are particularly important for the final defect localization results. Assuming several defect areas have been located in a batch of yarn surface images, the image processing tool will divide these areas into multiple independent units, such as dividing an image into 10 small regions, each representing a different part of the yarn surface. For each region, feature parameters such as color intensity and texture continuity are extracted to form a set of regional feature distributions. The purpose of this process is to gain a more detailed understanding of the surface characteristics of each region, laying the foundation for subsequent analysis. For the set of regional feature distributions, the data comparison tool quantifies the defect density of each region. Assuming a preset defect density threshold of 5 defect points per square centimeter, if a region's defect density reaches 7 defect points per square centimeter, it is marked as a high-density region. Ultimately, assuming 3 out of 10 regions are marked as high-density regions, a high-density region set is formed. This quantification helps to quickly identify areas where yarn surface problems are concentrated, providing a focus for subsequent processing. Based on the high-density region set, the feature extraction tool further calculates the feature deviation of each region. Assuming that characteristic deviations are primarily measured through color distribution and texture uniformity, with a preset deviation threshold of 10%, a region with a color deviation reaching 15% is marked as an abnormal deviation area. Ultimately, two out of three high-density regions are marked as abnormal deviation areas, forming a set of abnormal deviation areas. This method can more accurately screen out key areas that may affect yarn quality.
[0067] Furthermore, the final detection and analysis results include:
[0068] Based on the multi-dimensional evaluation data, the yarn uniformity distribution is divided into regions, and at least one feature parameter is extracted for each region to obtain the regional distribution dataset and a preliminary distribution feature set.
[0069] Using the aforementioned distribution feature set, color mapping is performed on areas with high defect incidence, and the defect density level is determined based on the color mapping results to obtain an intuitive distribution map.
[0070] If the color value of certain areas in the distribution map is higher than a preset threshold, spatial positioning processing is performed to obtain specific area labeling information and determine the key locations to focus on.
[0071] Based on the region labeling information and the distribution map, the location information and the visualization report content are fused together to generate a final detection result that includes labels of areas with high defect incidence.
[0072] Specifically, in the business scenario of yarn surface quality inspection, the processing and analysis of multi-dimensional evaluation data is particularly important. When dividing the yarn uniformity distribution into regions using image processing tools, a complete yarn surface image can be divided into multiple small regions, such as eight equal-area units, each representing a different part of the yarn surface. Feature parameters, such as surface roughness and color differences, are extracted for each region to form a regional distribution dataset. This division and extraction method helps to capture the local characteristics of the yarn surface more meticulously, laying the foundation for subsequent analysis. Using the above distribution feature set, when color mapping is performed on areas with high defect incidence using heatmap generation tools, the color can be gradually changed from light to dark according to the defect density. For example, if a region has a large number of defect points, it is mapped to dark red, while another region with fewer defects is mapped to light yellow, ultimately generating an intuitive distribution map. This color mapping method intuitively reflects the concentration of defect distribution, facilitating the rapid identification of problem areas. The distribution of surface defects in yarn directly affects the quality of the final textile. If high-incidence areas can be identified promptly through heat maps and labeling information, production personnel can adjust processes accordingly to prevent further defect expansion. This systematic analysis and presentation not only improves detection efficiency but also provides a reliable basis for quality control, helping to reduce defect rates and ensure overall yarn quality. In one possible implementation, when determining defect density levels based on color mapping results, density can be divided into three levels: high, medium, and low, corresponding to different color ranges. For example, dark red represents high density, yellow medium density, and green low density. This grading method facilitates quick assessment of the severity of defects in each area, providing a reference for subsequent processing. Simultaneously, this intuitive grading presentation makes it easier for non-professionals to understand the test results, enhancing report readability.
[0073] This invention discloses a yarn uniformity analysis method based on image processing. Addressing the challenge of yarn image acquisition under complex lighting conditions, it utilizes a multi-source adaptive adjustment system to acquire initial images and performs illumination equalization processing. Subsequently, wavelet transform and convolutional neural networks are used to extract yarn surface features, and abnormal areas are analyzed by local magnification and edge detection to identify candidate defect regions. Through cluster analysis and feature similarity calculation, non-defective regions are eliminated, ultimately yielding accurate defect location results. This invention also employs a weighted average algorithm to calculate uniformity evaluation scores and generate a visual analysis report, intuitively presenting the yarn uniformity distribution and defect locations. This invention effectively solves the challenges of yarn image acquisition and defect detection under complex lighting conditions, improving the accuracy and efficiency of yarn uniformity detection and providing important technical support for textile quality control.
[0074] The above are merely preferred embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A yarn uniformity analysis method based on image processing, characterized in that, include: Acquire initial yarn image data, and obtain a first yarn image based on the initial yarn image data; Based on the brightness distribution characteristics of the first yarn image, local contrast enhancement processing is performed on the uneven lighting area, and grayscale normalization is performed on the shadow interference area of the enhanced image to obtain a second yarn image with uniform brightness. To address the differences in texture features in the second yarn image, wavelet transform image decomposition technology is used to divide the image into multiple frequency sub-bands, extract texture detail information in the high-frequency sub-bands, and obtain a preliminary feature distribution map of the yarn surface. Using the preliminary feature distribution map, deep learning analysis is performed on the surface features of the yarn, and adaptive feature weighting is applied to the analyzed complex texture areas to obtain a more accurate third feature distribution map. The regions in the third feature distribution map whose feature values exceed a preset abnormal threshold are subjected to local magnification analysis, and the boundaries of subtle defects are further extracted by combining edge detection algorithms to obtain the final set of defect candidate regions. Based on the set of defect candidate regions, the candidate regions are grouped, and a feature similarity index is calculated for each group. If the similarity index is lower than a preset discrimination threshold, the non-defect region is eliminated, and the final defect location result is determined. Based on the final defect location results and the overall characteristic distribution of the yarn, a uniformity evaluation score is calculated. The defect density and characteristic deviation in different areas are comprehensively quantified to obtain multi-dimensional evaluation data of yarn uniformity. Based on the multi-dimensional evaluation data, a visual analysis report is generated to intuitively present the yarn uniformity distribution, mark the specific location information of high-defect areas, and obtain the final detection and analysis results.
2. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, Obtaining initial yarn image data includes: Based on the multi-source adaptive adjustment mechanism, and considering the yarn characteristics under complex lighting conditions, a multi-angle illumination method is adopted. Environmental interference data is obtained through a preset light intensity sensor, and the output intensity of the light source is adjusted in real time by a light intensity dynamic module to obtain the initial yarn image data.
3. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, Obtaining the first yarn image based on the initial yarn image data includes: Using the initial yarn image data, an image acquisition device is used to acquire an initial image under multi-angle illumination conditions. If uneven illumination distribution is detected to exceed a preset threshold due to environmental interference factors, the light source output is further adjusted through a light intensity dynamic module to obtain the first yarn image.
4. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, Obtaining a second yarn image with uniform brightness includes: Based on the brightness distribution characteristics of the first yarn image, local contrast enhancement processing is performed on the uneven lighting area, and the intermediate yarn image after preliminary adjustment is obtained by adjusting the pixel value distribution range. For the shadow interference area in the intermediate yarn image, the gray value of the local area is standardized. If the gray value of the shadow interference area is detected to deviate from the preset threshold, the shadow interference area is adjusted a second time to obtain a gray-scale balanced transition yarn image. By detecting the overall brightness distribution of the transition yarn image, the areas where there is still uneven illumination are refined to obtain an optimized yarn image with a more uniform brightness distribution. Based on the brightness characteristics of the optimized yarn image, the grayscale value and contrast of the optimized yarn image are finally detected. If it is found that a local area still does not meet the preset threshold, fine-tuning is performed using a local adjustment tool to obtain a second yarn image with balanced brightness.
5. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, Obtaining a preliminary feature distribution map of the yarn surface includes: Based on the texture characteristics of the second yarn image, the image is segmented into multiple levels, and different frequency components are separated to obtain high-frequency sub-band data and obtain a frequency layered image after preliminary decomposition. For the high-frequency subband in the frequency layered image, the texture details are separated. If the signal strength of the high-frequency subband exceeds a preset threshold, enhancement processing is performed to determine the set of detailed features on the yarn surface. By performing distribution analysis on the set of detailed features, the extracted texture details are correlated and matched with the surface characteristics of the yarn to obtain the distribution pattern corresponding to the surface characteristics and obtain a preliminary feature distribution map of the yarn surface.
6. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, Obtaining a more accurate third feature distribution map includes: Based on the preliminary feature distribution map, the complex texture areas on the yarn surface are divided into regions to obtain surface detail data of at least one target region, resulting in a set of region details after division. For the set of details in the region, the texture distribution of each region is separated. If the texture complexity of the region is detected to exceed a preset threshold, the region is adaptively adjusted to determine the weighted feature set. The weighted feature set is used to process the feature matching of the yarn surface to obtain more accurate surface detail distribution data and obtain optimized feature mapping results. Based on the optimized feature mapping results, the distribution map of the yarn surface is updated, and the surface details of different regions are integrated to obtain a more accurate third feature distribution map.
7. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, The final set of candidate defect regions includes: Based on the third feature distribution map, the target area exceeding the preset abnormal threshold is locally magnified to obtain magnified surface detail data and obtain a magnified detail view. Based on the magnified detailed view, boundary recognition processing is performed on minor defects. If the clarity of the detected defect boundary is lower than a preset threshold, a secondary sharpening process is performed to determine the range of clear defect boundaries. Based on the clearly defined defect boundary range, the defect region is divided, and at least one independent candidate region is extracted from it to obtain a preliminary set of defect candidate regions. Based on the preliminary set of candidate defect regions, the surface details and distribution map of each candidate region are matched. If the matching degree is lower than a preset threshold, details are extracted and supplemented to obtain the final set of candidate defect regions.
8. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, The final defect location results include: Based on the final set of candidate defect regions, the candidate regions are initially grouped. For each region in the group, its surface feature data is obtained, and at least one feature vector is extracted from it to obtain the initial grouping result. Based on the preliminary grouping results, the similarity of the feature vectors within the group is calculated. If the calculated similarity index is lower than the preset discrimination threshold, the corresponding region is marked as a non-defect region and removed to determine the filtered region set. By comparing the surface detail depth of the filtered region set, detailed feature data is obtained, and it is determined whether the region meets the target defect standard, thus obtaining a candidate region set that meets the standard. Based on the set of candidate regions that meet the criteria, the regions are subjected to boundary confirmation processing. If the boundary clarity reaches a preset threshold, the region is confirmed as the final defect location, and the final defect location result is obtained.
9. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, The multi-dimensional evaluation data for obtaining yarn evenness includes: Based on the final defect location result, the yarn surface is divided into regions, and at least one feature parameter is extracted for each region to obtain a set of regional feature distributions. The defect density of each region is quantified using the set of regional feature distributions. If the defect density is higher than a preset threshold, it is marked as a high-density region, and a set of high-density regions is determined. Based on the set of high-density regions, feature extraction tools are used to calculate the feature deviation of each region and obtain feature deviation data. If the feature deviation exceeds a preset threshold, it is marked as a region with abnormal deviation, and a set of regions with abnormal deviation is obtained. By combining the set of abnormal deviation regions with the set of regional feature distributions, a weighted average calculation is used to comprehensively process the yarn characteristics and defect density of the regions, thereby obtaining multi-dimensional evaluation data of yarn uniformity.
10. The yarn uniformity analysis method based on image processing as described in claim 1, characterized in that, The final test and analysis results include: Based on the multi-dimensional evaluation data, the yarn uniformity distribution is divided into regions, and at least one feature parameter is extracted for each region to obtain the regional distribution dataset and a preliminary distribution feature set. Using the aforementioned distribution feature set, color mapping is performed on areas with high defect incidence, and the defect density level is determined based on the color mapping results to obtain an intuitive distribution map. If the color value of certain areas in the distribution map is higher than a preset threshold, spatial positioning processing is performed to obtain specific area labeling information and determine the key locations to focus on. Based on the region labeling information and the distribution map, the location information and the visualization report content are fused together to generate a final detection result that includes labels of areas with high defect incidence.
Citation Information
Patent Citations
Testing method for yarn uniformity in a woven fabric based on wavelet transform
CN103163139A
Mesh fabric defect rapid detection method based on image data processing
CN117218114A
Medical image reconstruction method and system based on deep learning
CN120355603A
Yarn weak twist and hairiness intelligent detection system based on visual stroboscopic synchronization
CN120525857A
Magnetic material defect detection system based on image recognition
CN120558971A
Cited By
Garment wrinkle detection method based on image analysis
CN121190468A
A method for detecting garment wrinkles based on image analysis
CN121190468B