A method and system for visually detecting fabric dyeing uniformity
By determining the area to be analyzed in the fabric dyeing detection and calculating the grayscale unevenness and irregular change measurements, the false dyeing unevenness caused by external tension is solved, and a more accurate cloth quality evaluation is achieved.
Patent Information
- Application Number
- CN202510155246.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2045-02-12
AI Technical Summary
In the prior art, in the quality detection of fabric dyeing, false uneven dyeing areas caused by external tension mislead the detection results, resulting in inaccurate quality assessment.
By obtaining the dyed fabric image, determining the area to be analyzed, calculating the grayscale unevenness and grayscale irregular change measurements, marking the dyeing and color unevenness areas, and filtering out the color unevenness areas caused by improper dyeing process.
It improves the accuracy of fabric quality detection, accurately identify uneven color areas caused by improper dyeing process, and reduces misjudgment caused by external tension.
Smart Images

Figure CN120088216B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual inspection, and in particular to a method and system for visual inspection of cloth dyeing and coloring uniformity. Background Art
[0002] Fabric dyeing must meet product design requirements. Poor dyeing quality can negatively impact the product's visual appeal and sales. In production, multiple factors, including dye quality, fabric characteristics, process flow, and environmental conditions, can lead to substandard fabric dyeing, preventing the dyed product from meeting established quality standards. Color uniformity after dyeing is a crucial indicator of product quality. To ensure dyeing quality, timely testing of this uniformity is essential.
[0003] Existing techniques typically assess fabric dyeing uniformity by directly identifying areas of uneven color within the fabric, without fully considering the potential interference of external tension on the test results. The application of external tension can introduce false uneven areas of color in the image, misleading the test results and biasing the fabric quality assessment. Summary of the Invention
[0004] In order to solve the technical problem that the existing technology has difficulty in detecting uneven dyeing areas, resulting in poor fabric quality assessment results, the purpose of the present invention is to provide a method and system for visually inspecting fabric dyeing uniformity. The technical solutions adopted are as follows:
[0005] A method for visually detecting the uniformity of dyeing and coloring of cloth, comprising the following steps:
[0006] Acquire dyed cloth images;
[0007] Determining each region to be analyzed in the dyed fabric image based on the edge distribution of the dyed fabric image; obtaining grayscale unevenness of each region to be analyzed based on the difference in grayscale values of pixels in the region to be analyzed; and screening out grayscale uneven regions from all regions to be analyzed in the dyed fabric image based on the grayscale unevenness;
[0008] According to the direction of grayscale value change of pixel points in the grayscale uneven area, a grayscale irregularity change measurement of the grayscale uneven area is obtained; according to the grayscale irregularity change measurement, the dyeing and coloring uneven areas in the grayscale uneven area are marked; and based on all the dyeing and coloring uneven areas of the dyed cloth image, cloth quality detection is performed.
[0009] Furthermore, the method for obtaining the area to be analyzed specifically includes:
[0010] In the dyed cloth image, the area enclosed by each closed edge is used as each area to be analyzed in the dyed cloth image.
[0011] Furthermore, the method for obtaining grayscale unevenness specifically includes:
[0012] In the area to be analyzed, the pixel points on the edge are regarded as edge pixel points, and the pixel points other than the edge pixel points are regarded as internal pixel points; the mean of the gradient values of all the edge pixel points is calculated to obtain a first unevenness parameter; the variance of the grayscale values corresponding to all the internal pixel points is calculated to obtain a second unevenness parameter; the product of the first unevenness parameter and the second unevenness parameter is calculated and normalized to obtain the grayscale unevenness of the area to be analyzed.
[0013] Furthermore, the method for obtaining the grayscale uneven area specifically includes:
[0014] In the dyed cloth image, each area to be analyzed whose grayscale unevenness is greater than a preset unevenness threshold is marked as a grayscale uneven area.
[0015] Furthermore, the method for obtaining the grayscale irregularity change metric specifically includes:
[0016] Cluster all pixels according to the horizontal line angles of the pixels in the grayscale uneven area to obtain the linear areas in the grayscale uneven area;
[0017] Construct a fitting straight line in the straight line area based on the horizontal line angles of all pixels in the straight line area;
[0018] Obtaining a local irregularity measure of the straight line region according to the distribution of the fitted straight line in the straight line region and the spatial distribution of the pixel points in the straight line region;
[0019] The local irregularity measures of all straight line regions in the grayscale uneven region are forward fused to obtain the grayscale irregularity change measure of the grayscale uneven region.
[0020] Furthermore, the method for obtaining the fitting straight line specifically includes:
[0021] In the straight line area, the number of pixels corresponding to the horizontal line angle is used as the frequency of the horizontal line angle; the angle of the fitted straight line corresponds to the horizontal line angle with the maximum frequency; and the fitted straight line passes through the center point of the straight line area.
[0022] Furthermore, the method for obtaining the local irregularity metric specifically includes:
[0023] In the straight line region, the total number of intersections of all fitted straight lines is used as the first grayscale irregularity measure of the straight line region;
[0024] In the straight line area, the mean of the Euclidean distances between all pixels and the cluster center is calculated to obtain the second grayscale irregularity metric of the straight line area;
[0025] The sum of the first grayscale irregularity metric and the second grayscale irregularity metric is calculated to obtain a local irregularity metric of the straight line region.
[0026] Furthermore, the method for obtaining the local irregularity metric specifically includes:
[0027] The accumulated values of the local irregularity measures of all straight line regions are calculated and normalized to obtain the grayscale irregularity change measure of the grayscale uneven region.
[0028] Furthermore, the method for obtaining the unevenly dyed area specifically includes:
[0029] The grayscale uneven area where the grayscale irregularity change measure is greater than a preset irregularity threshold is marked as an unevenly stained area.
[0030] The present invention provides a visual inspection system for the color uniformity of fabric dyeing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the visual inspection method for the color uniformity of fabric dyeing are implemented.
[0031] The present invention has the following beneficial effects:
[0032] Dyeing uniformity is an important indicator of fabric quality. To accurately assess fabric dyeing uniformity, it is first necessary to analyze specific areas within the image, rather than a general analysis of the entire image. By identifying the areas to be analyzed, the analysis can be more focused on areas where dyeing unevenness may occur. Grayscale unevenness is used to measure the degree of color unevenness in the areas to be analyzed. Based on the grayscale unevenness, the uneven grayscale areas are then screened out from all the areas to be analyzed in the dyed fabric image. These uneven grayscale areas initially reflect the areas of uneven color in the dyed fabric image. To more accurately screen out areas of uneven color caused by improper dyeing processes, considering that improper dyeing processes often cause irregular grayscale value changes in pixel points, a grayscale irregularity variation metric is constructed to reflect the possibility that the uneven grayscale areas are caused by improper dyeing processes. Based on the grayscale irregularity variation metric, the uneven dyeing areas within the uneven grayscale areas are marked. This uneven dyeing area more accurately reflects the uneven color areas caused by improper dyeing processes, thereby improving the accuracy of fabric quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0034] Figure 1 A flowchart of a method for visually inspecting dyeing uniformity of fabric provided by one embodiment of the present invention;
[0035] Figure 2 A flow chart of a method for obtaining a grayscale irregularity change metric provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0036] To further illustrate the technical means and effectiveness of the present invention in achieving its intended objectives, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail a method and system for visually inspecting dyeing uniformity of fabrics, including its specific implementation, structure, features, and effectiveness. In the following description, references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.
[0037] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0038] The following describes in detail a method and system for visually inspecting the uniformity of dyeing and coloring of fabrics provided by the present invention with reference to the accompanying drawings.
[0039] The present invention provides a method and system for visually inspecting the uniformity of dyeing and coloring of fabrics. Figure 1 , which shows a flow chart of a method for visually inspecting dyeing uniformity of cloth provided by one embodiment of the present invention, the method comprising the following steps:
[0040] Step S1: Acquire a dyed cloth image.
[0041] Poor dyeing results in products that fail to meet design requirements, resulting in poor visual effects. To ensure dyeing quality, it is first necessary to obtain dyed fabric images to provide data support for subsequent dyed fabric quality testing.
[0042] Polyester, a type of fabric, is widely used in textile processing due to its excellent properties. This paper uses polyester as an example to illustrate the quality inspection of dyed polyester. The dyed fabric image is obtained from the detection system. The specific acquisition process includes:
[0043] First, according to the steps of the hosiery dyeing method, a new batch of polyester filament products is sampled, woven into garters, scouring and dyeing are carried out. During this process, the polyester filaments are woven into the shape of garters and dyed to simulate the dyeing effect in actual use. Next, the dyed garters are put on a color judgment frame or color judgment plate, and uniform tension is applied to ensure that the garters are flat and the color distribution is uniform. Then, the position of the camera is fixed to ensure that the distance, angle and other parameters between the camera and the garter are consistent to reduce errors during the shooting process. The camera is started to shoot the dyed polyester garters and obtain the original image. In order to ensure the image quality of the subsequent image processing process, the original image needs to be subjected to image preprocessing operations to obtain the dyed fabric image. It should be noted that the hosiery dyeing method is an existing technology well known to those skilled in the art and will not be described in detail here.
[0044] The specific image preprocessing operations are technical means well known to those skilled in the art and are not limited here. In the embodiment of the present invention, the image preprocessing operations include grayscale, noise reduction, and contrast enhancement. The embodiment of the present invention uses histogram equalization to enhance contrast, uses Gaussian filtering for noise reduction, and uses weighted averaging for grayscale. The implementer can set it according to the actual situation. It should be noted that, in order to facilitate calculations, all indicator data involved in the calculations in the embodiment of the present invention are subjected to data preprocessing to eliminate the dimension effect. The specific means of removing the dimension effect are technical means well known to those skilled in the art and are not limited here.
[0045] Step S2: Determine each area to be analyzed in the dyed fabric image based on the edge distribution of the dyed fabric image; obtain the grayscale unevenness of each area to be analyzed based on the difference in the grayscale values of the pixels in the area to be analyzed; and filter out grayscale uneven areas from all areas to be analyzed in the dyed fabric image based on the grayscale unevenness.
[0046] Dyeing uniformity is a key quality indicator. To accurately assess dyeing uniformity in fabrics, it's first necessary to analyze specific areas within the image, rather than a blanket analysis of the entire image. By identifying the areas to be analyzed, the analysis can be more focused on areas where dyeing unevenness may be a problem. Grayscale unevenness is used to measure the degree of color unevenness in the areas to be analyzed. This grayscale unevenness is then used to filter out areas of uneven grayscale from all areas to be analyzed in the dyed fabric image. These areas provide a preliminary indication of areas of uneven color within the dyed fabric image.
[0047] In order to determine the area to be analyzed, preferably, in one embodiment of the present invention, a method for obtaining the area to be analyzed specifically includes:
[0048] In the dyed fabric image, the area enclosed by each closed edge is used as each region to be analyzed in the dyed fabric image. It should be noted that the method for obtaining closed edges is well known to those skilled in the art and is briefly described here: the Canny edge detection algorithm is used to extract each edge in the dyed fabric image. Then, an edge tracking algorithm is used to determine whether the edges are closed, thereby obtaining all closed edges. Both the Canny edge detection algorithm and the edge tracking algorithm are well known to those skilled in the art and are not described in detail here.
[0049] Regarding the above steps, considering that a blanket processing of the entire image might mask small areas of uneven color due to large areas of uniform color, leading to misjudgment, we considered that using the area enclosed by closed edges as the analysis area can avoid this. Because the areas enclosed by closed edges are often areas with significant changes in color or texture, these areas are more likely to have color unevenness. Using the area enclosed by each closed edge as each area to be analyzed in the dyed fabric image helps to better identify areas of uneven color.
[0050] In order to measure the color unevenness of the area to be analyzed, preferably, in one embodiment of the present invention, the method for obtaining the grayscale unevenness specifically includes:
[0051] In the area to be analyzed, the pixel points on the edge are regarded as edge pixel points, and the pixel points other than the edge pixel points are regarded as internal pixel points; the mean of the gradient values of all edge pixel points is calculated to obtain the first unevenness parameter; the variance of the grayscale values corresponding to all internal pixel points is calculated to obtain the second unevenness parameter; the product of the first unevenness parameter and the second unevenness parameter is calculated and normalized to obtain the grayscale unevenness of the area to be analyzed. It should be noted that the method for obtaining edge and gradient values is an existing technology well known to those skilled in the art and will not be described in detail here. It should be noted that the normalization method used is: normalization is performed using the norm normalization function to limit the numerical range to between 0 and 1. Normalization is a technical means well known to those skilled in the art, and the normalization function can be linear normalization or standard normalization, etc. The specific normalization method is not limited here.
[0052] For the above steps, for each edge pixel, calculate its gradient value. The gradient value reflects the speed of grayscale change at the pixel point, that is, the steepness of the color transition. The gradient values of all edge pixels are averaged to obtain the first unevenness parameter. The first unevenness parameter reflects the intensity of the color transition in the edge area. The variance of the grayscale values corresponding to all internal pixels is calculated to obtain the second unevenness parameter. The variance is an important indicator to measure the degree of discreteness of data distribution. The second unevenness parameter reflects the degree of color unevenness in the internal area. In order to more comprehensively evaluate the color unevenness of the area to be analyzed, the product of the first unevenness parameter and the second unevenness parameter is calculated and normalized to obtain the grayscale unevenness of the area to be analyzed. The greater the grayscale unevenness, the greater the color unevenness of the area to be analyzed.
[0053] In order to analyze the color-uneven region in the dyed fabric image, preferably, in one embodiment of the present invention, the method for obtaining the grayscale-uneven region specifically includes:
[0054] In the dyed fabric image, each area to be analyzed whose grayscale unevenness exceeds a preset unevenness threshold is marked as a grayscale uneven region. In one embodiment of the present invention, the preset unevenness threshold is 0.57. The preset unevenness threshold is used to determine whether the area to be analyzed is a grayscale uneven region and can be set by the implementer according to the implementation scenario.
[0055] Following the above steps, all regions to be analyzed in the dyed fabric image are traversed. For each region to be analyzed, its grayscale unevenness is compared with a preset unevenness threshold. If the grayscale unevenness exceeds the preset unevenness threshold, the region to be analyzed is marked as a grayscale uneven region. Grayscale uneven regions can preliminarily reflect areas of color unevenness in the dyed fabric image.
[0056] Traditional methods for inspecting fabric dyeing uniformity rely on identifying areas of color unevenness within fabric images. However, this approach often overlooks the significant impact that external tension can have on inspection results. External tension, such as stretching or compression applied to the fabric during inspection, can cause false uneven dyeing areas to appear in the image. These areas are caused by physical deformation rather than actual dyeing process errors. This interference can mislead the quality inspection system and lead to incorrect judgments of fabric quality.
[0057] Step S3: Obtain a grayscale irregularity change measure for the grayscale irregularity region based on the grayscale irregularity change direction of the pixel points in the grayscale irregularity region; mark the unevenly dyed and colored regions in the grayscale irregularity region based on the grayscale irregularity change measure; and perform fabric quality inspection based on all unevenly dyed and colored regions of the dyed fabric image.
[0058] Uneven grayscale areas can reflect areas with uneven colors in dyed fabric images. In order to more accurately screen out uneven color areas caused by improper dyeing process, we first consider that improper dyeing process often causes irregular grayscale value changes in pixel grayscale values. We construct a grayscale irregularity change metric to reflect the possibility that the uneven grayscale area is the uneven color area caused by improper dyeing process. Based on the grayscale irregularity change metric, we mark the uneven dyeing area in the uneven grayscale area. The uneven dyeing area more accurately reflects the uneven color area caused by improper dyeing process, thereby improving the accuracy of fabric quality detection.
[0059] See also Figure 2 , which shows a flow chart of a method for obtaining a grayscale irregularity change metric in one embodiment of the present invention. Preferably, in one embodiment of the present invention, the method for obtaining a grayscale irregularity change metric specifically includes:
[0060] Step S301: clustering all pixels in the grayscale uneven region according to the horizontal line angles of the pixels to obtain straight line regions in the grayscale uneven region.
[0061] By clustering the straight line areas, we can analyze the color change direction in the grayscale uneven area and determine whether it is caused by external tension.
[0062] Preferably, in one embodiment of the present invention, the method for obtaining the grayscale uneven area specifically includes:
[0063] Using a region growing algorithm, all pixels are clustered based on their horizontal angles within the grayscale-uneven region to obtain linear regions within the grayscale-uneven region. It should be noted that the horizontal angle of a pixel is a well-known technique used by those skilled in the art and can be obtained using the LSD (Line Segment Detector) algorithm.
[0064] It should be noted that the region growing algorithm is a technical means well known to those skilled in the art. Here, we will only briefly describe the steps of using the region growing algorithm to cluster all pixels according to the horizontal line angles of the pixels in the grayscale uneven area to obtain each straight line area in the grayscale uneven area:
[0065] (1) Set each seed point in the grayscale uneven area and use each seed point as the initial growth area; (2) Each growth area performs regional growth according to the preset growth criterion to form each updated growth area; (3) Repeat (2) until the growth area meets the iteration termination condition; (4) until all growth areas meet the preset iteration termination condition, output each growth area, and use each growth area as each straight line area. Preset growth criterion: If the cosine value of the horizontal line angle difference value between the edge pixel point of the growth area and its adjacent pixel point is less than the preset similarity threshold, the adjacent pixel point is added to the growth area. Preset iteration termination condition: None of the edge pixel points of the growth area meet the growth criterion. In one embodiment of the present invention, the pixel points within the eight neighborhoods of the edge pixel point are used as the adjacent pixel points of the edge pixel point. It should be noted that the eight neighborhoods are a prior art well known to those skilled in the art and will not be described in detail here. In one embodiment of the present invention, the preset similarity threshold is 0.8, and the implementer can set it according to the implementation scenario.
[0066] In the above steps, we consider that when fabric is subjected to external tension, its internal fibers may stretch or compress, resulting in a certain directionality in color change. This directionality is manifested in the image as a series of similar horizontal line angles. Based on the horizontal line angles of the pixels in the grayscale unevenness area, all pixels are clustered to obtain the individual straight line regions in the grayscale unevenness area. These straight line regions represent areas with similar grayscale value change trends in the image, indirectly reflecting the color change trend caused by external tension in the grayscale unevenness area.
[0067] Step S302: constructing a fitting straight line of the straight line area according to the horizontal line angles of all pixels in the straight line area.
[0068] In order to more accurately describe the directional characteristics of the straight line area and provide a basis for subsequent analysis and processing.
[0069] Preferably, in one embodiment of the present invention, the method for obtaining the fitted straight line specifically includes:
[0070] In the straight line area, the number of pixels corresponding to the horizontal line angle is used as the frequency of the horizontal line angle; the angle of the fitted straight line is the horizontal line angle corresponding to the maximum frequency; and the fitted straight line passes through the center point of the straight line area.
[0071] In the above steps, first, the number of pixels corresponding to each horizontal angle within the straight region is counted, that is, the frequency of each horizontal angle is calculated. This step is to determine which horizontal angle is dominant within the straight region. Then, the horizontal angle with the highest frequency is found and used as the angle of the fitted line. This is because the angle with the highest frequency represents the direction of the majority of pixels within the straight region and therefore best represents the directional characteristics of that region. Finally, the position of the fitted line is determined. In an embodiment of the present invention, the fitted line is set to pass through the center point of the straight region. This is because the center point can better reflect the overall positional characteristics of the straight region and make the fitted line more representative. The fitted line can accurately describe the directional characteristics of the straight region, which is crucial for analyzing the color change trend of fabric when subjected to external tension. The fitted line can more intuitively understand the direction and trend of color change, thereby determining whether the fabric is subjected to uniform tension.
[0072] Step S303: obtaining a local irregularity measure of the straight line region according to the distribution of the fitted straight lines and the spatial distribution of the pixels in the straight line region.
[0073] Preferably, in one embodiment of the present invention, the method for obtaining the local irregularity metric specifically includes:
[0074] In the straight line region, the total number of intersections of all fitted straight lines is used as the first grayscale irregularity measure of the straight line region;
[0075] In the straight line area, the mean of the Euclidean distances between all pixels and the cluster center is calculated to obtain the second grayscale irregularity metric of the straight line area;
[0076] The sum of the first grayscale irregularity measure and the second grayscale irregularity measure is calculated to obtain the local irregularity measure of the straight line region. It should be noted that the cluster center point of the straight line region is a technical means well known to those skilled in the art and will not be described in detail here.
[0077] In the above steps, the total number of intersections of all fitted lines in the linear region is first counted. These intersections represent sudden changes or inconsistencies in the directional characteristics of the linear region. Therefore, the number of intersections can be used as a first grayscale irregularity metric to measure the regularity of the linear region. A larger first grayscale irregularity metric indicates a greater number of intersections, indicating poorer regularity of the linear region, i.e., more sudden changes or inconsistencies in the directional characteristics. Next, the mean Euclidean distance between each pixel in the linear region and the cluster center is calculated. The mean Euclidean distance reflects the degree of dispersion of the pixels relative to the cluster center, i.e., the spatial distribution of the pixels within the linear region. A larger second grayscale irregularity metric indicates greater pixel dispersion and poorer regularity. Finally, the first and second grayscale irregularity metric are added together to obtain the local irregularity metric of the linear region. The local irregularity metric combines the degree of sudden changes in directional characteristics and the degree of dispersion of the pixels in the linear region, providing a more comprehensive assessment of the regularity of the linear region. The local irregularity metric provides a quantitative indicator for evaluating the regularity of the linear region. This helps to more objectively determine whether the fabric is subjected to uniform tension during the dyeing process.
[0078] Step S304: forwardly fuse the local irregularity measures of all straight line regions in the grayscale uneven region to obtain the grayscale irregularity change measure of the grayscale uneven region.
[0079] By forward fusing the local irregularity measures of all straight line regions, a grayscale irregularity change measure is constructed, which can reflect the possibility that the grayscale irregularity region is caused by an improper dyeing process.
[0080] It should be noted that forward fusion is an existing technology well known to those skilled in the art, and forward fusion can adopt simple product, arithmetic mean or other suitable fusion methods. In one embodiment of the present invention, the cumulative value of the local irregularity measurement of all straight line areas in the grayscale uneven area is calculated and normalized to obtain the grayscale irregularity change measurement of the grayscale uneven area. It should be noted that the normalization method adopted is: normalization is performed using the norm normalization function to limit the numerical range to between 0 and 1. Normalization is a technical means well known to those skilled in the art, and the choice of normalization function can be linear normalization or standard normalization, etc. The specific normalization method is not limited here.
[0081] Regarding the above steps, considering that uniform tension is applied to the dyed fabric during the testing process, the lower the normalization of the grayscale uneven area, the more likely it is that the uneven color distribution is caused by uneven dyeing. The local irregularity metric reflects the irregularity of a single straight line area. By calculating the cumulative value of the local irregularity metrics of all straight line areas and normalizing them, the grayscale irregularity variation metric for the grayscale uneven area is obtained. The higher the grayscale irregularity variation metric, the lower the normalization of the grayscale uneven area, and the more likely it is that the uneven color distribution is caused by the dyeing process.
[0082] In order to screen out the color uneven areas caused by improper dyeing process, preferably, in one embodiment of the present invention, the method for obtaining the color uneven areas includes:
[0083] The grayscale uneven area with a grayscale irregularity change measure greater than a preset irregularity threshold is marked as an unevenly colored area. In one embodiment of the present invention, the preset irregularity threshold is 0.7, which can be set by the implementer according to the implementation scenario.
[0084] In the above steps, areas with uneven grayscale variation greater than a preset threshold are marked as unevenly dyed areas. These areas are considered to have issues such as improper dyeing or uneven stress, and require further quality testing and analysis.
[0085] Preferably, in one embodiment of the present invention, the specific method for fabric quality detection includes:
[0086] Using a grayscale chart or specialized color comparison tool, inspectors compare the color of the marked unevenly dyed areas with the color change control. Color differences, including changes in hue, saturation, and brightness, are recorded. Based on the color comparison results and the dyeing standards and quality requirements for polyester fabrics, the dyeing uniformity grade of the polyester sample is assessed. Dyeing uniformity can be categorized into multiple quality levels, such as excellent, good, fair, and poor, with specific levels adjustable based on actual needs. The dyeing uniformity grade assessment results and associated image data are compiled into a report. This report is then submitted to relevant personnel, including quality inspectors and production managers.
[0087] The present invention also proposes a visual inspection system for the uniformity of dyeing and coloring of fabrics, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to execute the corresponding computer program. When the computer program executes in the processor, the method for visual inspection of the uniformity of dyeing and coloring of fabrics described above can be implemented.
[0088] In summary, the embodiments of the present invention provide a method and system for visual inspection of fabric dyeing and coloring uniformity. First, each area to be analyzed in the dyed fabric image is determined based on the edge distribution of the dyed fabric image; the grayscale unevenness of each area to be analyzed is obtained based on the difference in the grayscale values of the pixels in the area to be analyzed; the grayscale irregularity change measurement of the grayscale irregularity area is obtained based on the direction of change of the grayscale values of the pixels in the grayscale irregularity area; the dyeing and coloring uneven area in the grayscale irregularity area is marked based on the grayscale irregularity change measurement; and the fabric quality is inspected based on all the dyeing and coloring uneven areas in the dyed fabric image. The present invention screens out the dyeing and coloring uneven areas by deeply analyzing the effect of the application of external tension on the image to more accurately reflect the color uneven areas caused by improper dyeing process, thereby improving the accuracy of fabric quality inspection.
[0089] It should be noted that the order in which the embodiments of the present invention are described above is for illustrative purposes only and does not necessarily represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0090] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A method for visually inspecting the uniformity of dyeing of cloth, characterized in that: The method comprises the following steps: Acquire dyed cloth images; Determining each region to be analyzed in the dyed fabric image based on the edge distribution of the dyed fabric image; obtaining grayscale unevenness of each region to be analyzed based on the difference in grayscale values of pixels in the region to be analyzed; and screening out grayscale uneven regions from all regions to be analyzed in the dyed fabric image based on the grayscale unevenness; Obtaining a grayscale irregularity change metric for the grayscale uneven region based on a change direction of grayscale values of pixels in the grayscale uneven region; marking unevenly dyed and colored regions in the grayscale uneven region based on the grayscale irregularity change metric; and performing fabric quality inspection based on all unevenly dyed and colored regions in the dyed fabric image. The method for obtaining the grayscale irregularity change metric specifically includes: Cluster all pixels according to the horizontal line angles of the pixels in the grayscale uneven area to obtain the linear areas in the grayscale uneven area; Construct a fitting straight line in the straight line area based on the horizontal line angles of all pixels in the straight line area; Obtaining a local irregularity measure of the straight line region according to the distribution of the fitted straight line in the straight line region and the spatial distribution of the pixel points in the straight line region; The local irregularity measures of all straight line regions in the grayscale uneven region are forward fused to obtain the grayscale irregularity change measure of the grayscale uneven region.
2. A method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: The method for obtaining the area to be analyzed specifically includes: In the dyed cloth image, the area enclosed by each closed edge is used as each area to be analyzed in the dyed cloth image.
3. The method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: The method for obtaining grayscale unevenness specifically includes: In the area to be analyzed, the pixel points on the edge are regarded as edge pixel points, and the pixel points other than the edge pixel points are regarded as internal pixel points; the mean of the gradient values of all the edge pixel points is calculated to obtain a first unevenness parameter; the variance of the grayscale values corresponding to all the internal pixel points is calculated to obtain a second unevenness parameter; the product of the first unevenness parameter and the second unevenness parameter is calculated and normalized to obtain the grayscale unevenness of the area to be analyzed.
4. The method for visually inspecting the uniformity of dyeing of cloth according to claim 1, wherein: The method for obtaining the grayscale uneven area specifically includes: In the dyed cloth image, each area to be analyzed whose grayscale unevenness is greater than a preset unevenness threshold is marked as a grayscale uneven area.
5. The method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: The method for obtaining the fitted straight line specifically includes: In the straight line area, the number of pixels corresponding to the horizontal line angle is used as the frequency of the horizontal line angle; the angle of the fitted straight line corresponds to the horizontal line angle with the maximum frequency; and the fitted straight line passes through the center point of the straight line area.
6. The method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: The method for obtaining the local irregularity metric specifically includes: In the straight line region, the total number of intersections of all fitted straight lines is used as the first grayscale irregularity measure of the straight line region; In the straight line area, the mean of the Euclidean distances between all pixels and the cluster center is calculated to obtain the second grayscale irregularity metric of the straight line area; The sum of the first grayscale irregularity metric and the second grayscale irregularity metric is calculated to obtain a local irregularity metric of the straight line region.
7. The method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: The method for obtaining the local irregularity metric specifically includes: The accumulated values of the local irregularity measures of all straight line regions are calculated and normalized to obtain the grayscale irregularity change measure of the grayscale uneven region.
8. The method for visually inspecting dyeing uniformity of cloth according to claim 1, wherein: The method for obtaining the unevenly dyed area specifically includes: The grayscale uneven area where the grayscale irregularity change measure is greater than a preset irregularity threshold is marked as an unevenly stained area.
9. A system for visually inspecting the uniformity of dyed fabric, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for visually detecting dyeing uniformity of cloth as claimed in any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Solar wing panel quality detection method based on image data
CN116596936A
Visual detection method and system for surface defects of optoelectronic device
CN118521591A