Cloth dyeing uniformity visual detection method and system
By performing grayscale uneven analysis and grayscale irregular change measurement on the dyed fabric images, the dyeing uneven areas are marked, which solves the problem of misleading detection results in the prior art and improves the accuracy of cloth quality detection.
Patent Information
- Application Number
- CN202510155246.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2045-02-12
AI Technical Summary
The prior art is difficult to accurately detect the uniformity of fabric dyeing, especially under the influence of external tension, which leads to misleading detection results and affects the evaluation of fabric quality.
By obtaining the dyed fabric image, determining the area to be analyzed, calculating the grayscale unevenness, filtering out the grayscale unevenness area, and constructing a measurement of the grayscale irregular change, marking the dyed and coloring unevenness area, and performing cloth quality detection.
It improves the accuracy of fabric quality detection, can more accurately reflect the uneven color areas caused by improper dyeing process, and reduces the interference of external tension on the detection results.
Smart Images

Figure CN120088216A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of visual detection, and particularly to a visual detection method and system for the coloring uniformity of fabric dyeing. Background Art
[0002] Fabric dyeing needs to meet the requirements of product design. If the quality of fabric dyeing is poor, it will affect the visual performance of the product and the normal sales of the product. In production practice, multiple factors such as dye quality, fabric characteristics, technological process, and environmental conditions may all lead to unqualified fabric coloring, making the dyed products unable to meet the established quality standards. The coloring uniformity after fabric dyeing is an important indicator to measure the product quality. In order to ensure the quality of fabric dyeing, it is necessary to detect the coloring uniformity of fabric dyeing in a timely manner.
[0003] The prior art usually directly detects the quality of the coloring uniformity of fabric dyeing by identifying the color non-uniform areas in the fabric, without fully considering the interference that external tension may have on the detection results. The application of external tension will introduce false dyeing non-uniform areas in the image, thus misleading the detection results and causing deviation in the quality evaluation of the fabric. Summary of the Invention
[0004] In order to solve the technical problem that it is difficult to detect the dyeing non-uniform areas in the prior art, resulting in poor fabric quality evaluation effect, the purpose of the present invention is to provide a visual detection method and system for the coloring uniformity of fabric dyeing, and the specific technical solutions adopted are as follows:
[0005] A visual detection method for the coloring uniformity of fabric dyeing, the method includes the following steps:
[0006] Obtain a dyed fabric image;
[0007] According to the edge distribution of the dyed fabric image, determine each area to be analyzed in the dyed fabric image; according to the difference in the gray values of the pixel points in the area to be analyzed, obtain the gray non-uniformity of each area to be analyzed; screen out the gray non-uniform areas from all the areas to be analyzed in the dyed fabric image according to the gray non-uniformity.
[0008] According to the change direction of the gray values of the pixel points in the gray non-uniform area, obtain the gray non-standard change measure of the gray non-uniform area; mark the dyeing non-uniform areas in the gray non-uniform area according to the gray non-standard change measure; perform fabric quality detection according to all the dyeing non-uniform areas in the dyed fabric image.
[0009] Further, the method for obtaining the area to be analyzed specifically includes:
[0010] In the dyed fabric image, the region enclosed by each closed edge is used as each region to be analyzed in the dyed fabric image.
[0011] Further, the method for obtaining the gray-scale non-uniformity specifically includes:
[0012] In the region to be analyzed, the pixel points on the edge are used as edge pixel points, and the pixel points other than the edge pixel points are used as internal pixel points; calculate the mean value of the gradient values of all the edge pixel points to obtain a first non-uniformity parameter; calculate the variance of the gray-scale values corresponding to all the internal pixel points to obtain a second non-uniformity parameter; calculate the product of the first non-uniformity parameter and the second non-uniformity parameter and perform normalization processing to obtain the gray-scale non-uniformity of the region to be analyzed.
[0013] Further, the method for obtaining the gray-scale non-uniform region specifically includes:
[0014] In the dyed fabric image, mark each region to be analyzed with a gray-scale non-uniformity greater than a preset non-uniformity threshold as each gray-scale non-uniform region.
[0015] Further, the method for obtaining the gray-scale non-standard change measure specifically includes:
[0016] Cluster all pixel points according to the horizontal line angles of the pixel points in the gray-scale non-uniform region to obtain each straight-line region of the gray-scale non-uniform region;
[0017] Construct a fitted straight line for the straight-line region according to the horizontal line angles of all pixel points in the straight-line region;
[0018] Obtain the local non-standard 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] Fusion positively the local non-standard measures of all straight-line regions in the gray-scale non-uniform region to obtain the gray-scale non-standard change measure of the gray-scale non-uniform region.
[0020] Further, the method for obtaining the fitted straight line specifically includes:
[0021] In the straight-line region, use the number of pixel points corresponding to the horizontal line angle 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; the fitted straight line passes through the center point of the straight-line region.
[0022] Further, the method for obtaining the local non-standard measure specifically includes:
[0023] In the straight-line region, use the total number of intersection points of all fitted straight lines as the first gray-scale non-standard measure of the straight-line region;
[0024] In the straight-line region, calculate the average Euclidean distance between all pixel points and the clustering center point to obtain the second gray-scale non-uniformity metric of the straight-line region;
[0025] Calculate the sum value of the first gray-scale non-uniformity metric and the second gray-scale non-uniformity metric to obtain the local non-uniformity metric of the straight-line region.
[0026] Furthermore, the method for obtaining the local non-uniformity metric specifically includes:
[0027] Calculate the accumulated value of the local non-uniformity metrics of all straight-line regions and perform normalization processing to obtain the gray-scale non-uniformity change metric of the gray-scale uneven region.
[0028] Furthermore, the method for obtaining the unevenly dyed and colored region specifically includes:
[0029] Mark the gray-scale uneven regions with the gray-scale non-uniformity change metric greater than the preset non-uniformity threshold as unevenly dyed and colored regions.
[0030] The present invention provides a visual detection system for the evenness of cloth dyeing and coloring, including 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 detection method for the evenness of cloth dyeing and coloring are implemented.
[0031] The present invention has the following beneficial effects:
[0032] The evenness of dyeing and coloring is an important indicator to measure its quality. In order to accurately evaluate the evenness of cloth dyeing, it is first necessary to analyze specific regions in the image rather than generally process the entire image. By determining the regions to be analyzed, it is possible to focus more on the regions that may have uneven dyeing problems; by measuring the gray-scale unevenness of the regions to be analyzed, the degree of color unevenness of the regions to be analyzed can be measured, and then the gray-scale uneven regions can be screened out from all the regions to be analyzed in the dyed cloth image. The gray-scale uneven regions initially reflect the regions with uneven colors in the dyed cloth image. In order to more accurately screen out the regions with uneven colors caused by improper dyeing processes, it is first considered that improper dyeing processes often result in irregular gray-scale value changes of pixel points. A gray-scale non-uniformity change metric is constructed to reflect the possibility that the gray-scale uneven regions are regions with uneven colors caused by improper dyeing processes. Then, based on the gray-scale non-uniformity change metric, the unevenly dyed and colored regions in the gray-scale uneven regions are marked. The unevenly dyed and colored regions more accurately reflect the regions with uneven colors caused by improper dyeing processes, thereby improving the accuracy of cloth quality detection. Description of the Drawings
[0033] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0034] Figure 1 Flowchart of a method for visually detecting the coloring uniformity of dyed fabric provided by an embodiment of the present invention;
[0035] Figure 2 Flowchart of a method for obtaining a measure of non - standard gray - scale variation provided by an embodiment of the present invention. Detailed implementation manners
[0036] To further elaborate on the technical means and effects adopted by the present invention to achieve the intended invention purpose, the following, in combination with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features, and effects of a method and system for visually detecting the coloring uniformity of dyed fabric proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. In addition, the specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs.
[0038] The following specifically describes the specific solutions of a method and system for visually detecting the coloring uniformity of dyed fabric provided by the present invention with reference to the accompanying drawings.
[0039] The embodiments of the present invention provide a method and system for visually detecting the coloring uniformity of dyed fabric. Please refer to Figure 1 , which shows the flowchart of a method for visually detecting the coloring uniformity of dyed fabric provided by an embodiment of the present invention. The method includes the following steps:
[0040] Step S1: Obtain an image of the dyed fabric.
[0041] Since poor dyed fabric effect will lead to the product not meeting the design requirements and resulting in poor visual effect of the product. To ensure the quality of dyed fabric, first, an image of the dyed fabric needs to be obtained to provide data support for subsequent quality inspection of the dyed fabric.
[0042] As a kind of fabric, polyester is widely used in the field of textile processing due to its excellent performance. Taking polyester as an example, this invention illustrates the quality inspection of dyed polyester. The dyed fabric image is obtained from the detection system, and the specific obtaining process includes:
[0043] First, according to the steps of the hosiery dyeing method, a new batch of polyester filament products is sampled, knitted into a hosiery band, scoured and dyed. In this process, the polyester filaments are knitted into the shape of a hosiery band and dyed to simulate the dyeing effect in actual use. Then, the dyed hosiery band is put on the color judgment frame or color judgment board, and uniform tension is applied to ensure that the hosiery band is flat and the color distribution is uniform. Then, the position of the camera is fixed to ensure that parameters such as the distance and angle between the camera and the hosiery band are consistent to reduce errors during the shooting process, and the camera is started to shoot the dyed polyester hosiery band to obtain the original image. In order to ensure the image quality in the subsequent image processing process, the original image also needs to be subjected to image preprocessing operations to obtain the dyed fabric image. It should be noted that the hosiery dyeing method is a well-known prior art to those skilled in the art and will not be elaborated here.
[0044] The specific image preprocessing operations are well-known technical means to those skilled in the art and will not be limited here. In the embodiment of this invention, the image preprocessing operations include grayscale conversion, noise reduction, and contrast enhancement. The embodiment of this invention uses histogram equalization for contrast enhancement, Gaussian filtering for noise reduction, and weighted average method for grayscale conversion, and the implementer can set according to the actual situation. It should be noted that, for the convenience of calculation, all the index data involved in the calculation in the embodiment of this invention have undergone data preprocessing to eliminate the influence of dimension. The specific means of eliminating the influence of dimension are well-known technical means to those skilled in the art and will not be limited here.
[0045] Step S2: Determine each region to be analyzed in the dyed fabric image according to the edge distribution of the dyed fabric image; obtain the gray non-uniformity of each region to be analyzed according to the difference in the gray values of the pixel points in the region to be analyzed; screen out the gray non-uniform regions from all the regions to be analyzed in the dyed fabric image according to the gray non-uniformity.
[0046] The uniformity of dyeing and coloring is an important indicator to measure its quality. In order to accurately evaluate the dyeing uniformity of the fabric, it is first necessary to analyze specific regions in the image rather than generally process the entire image. By determining the regions to be analyzed, it is possible to focus more on analyzing the regions that may have problems with uneven dyeing; by using the gray non-uniformity to measure the degree of uneven color in the regions to be analyzed, and then screening out the gray non-uniform regions from all the regions to be analyzed in the dyed fabric image according to the gray non-uniformity, the gray non-uniform regions initially reflect the regions with uneven color in the dyed fabric image.
[0047] To determine the area to be analyzed, preferably, in an embodiment of the present invention, the 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 area to be analyzed in the dyed fabric image. It should be noted that the method for obtaining the closed edge is a well-known prior art to those skilled in the art and will only be briefly described here: Using the Canny edge detection algorithm, each edge in the dyed fabric image is extracted, and then the edge tracking algorithm is used to determine whether the edge is closed, so as to obtain all closed edges. The Canny edge detection algorithm and the edge tracking algorithm are both well-known prior arts to those skilled in the art and will not be elaborated here.
[0049] Regarding the above steps, considering that if the entire image is generally processed, small areas with uneven colors may be masked by large areas with uniform colors in the image, resulting in misjudgment. Using the area enclosed by the closed edge as the area to be analyzed can avoid this situation. Because the area enclosed by the closed edge is usually the area where the color or texture changes significantly, and these areas are more likely to have problems with uneven colors. Using the area enclosed by each closed edge as each area to be analyzed in the dyed fabric image helps to better determine the area with uneven colors subsequently.
[0050] To measure the degree of uneven color in the area to be analyzed, preferably, in an embodiment of the present invention, the method for obtaining the gray-scale unevenness specifically includes:
[0051] In the area to be analyzed, the pixel points on the edge are used as edge pixel points, and the pixel points other than the edge pixel points are used as internal pixel points; calculate the mean value of the gradient values of all edge pixel points to obtain the first uneven parameter; calculate the variance of the gray-scale values corresponding to all internal pixel points to obtain the second uneven parameter; calculate the product of the first uneven parameter and the second uneven parameter and perform normalization processing to obtain the gray-scale unevenness of the area to be analyzed. It should be noted that the methods for obtaining the edge and the gradient value are well-known prior arts to those skilled in the art and will not be elaborated here. It should be noted that the normalization method is: using the norm normalization function for normalization, restricting the numerical range to between 0 and 1. Among them, normalization is a well-known technical means to those skilled in the art, and the choice of 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 rate of change of the gray level at the pixel, that is, the steepness of the color transition. Calculate the average value of the gradient values of all edge pixels to obtain the first non-uniformity parameter. The first non-uniformity parameter reflects the severity of the color transition in the edge region. Calculate the variance of the gray level values corresponding to all internal pixels to obtain the second non-uniformity parameter. Variance is an important indicator to measure the degree of dispersion of data distribution. The second non-uniformity parameter reflects the degree of color non-uniformity in the internal region. In order to more comprehensively evaluate the color non-uniformity of the region to be analyzed, calculate the product of the first non-uniformity parameter and the second non-uniformity parameter and perform normalization processing to obtain the gray level non-uniformity degree of the region to be analyzed. The larger the gray level non-uniformity degree, the greater the degree of color non-uniformity of the region to be analyzed.
[0053] In order to analyze the regions with color non-uniformity in the dyed fabric image, preferably, in an embodiment of the present invention, the method for obtaining the gray level non-uniform region specifically includes:
[0054] In the dyed fabric image, mark each region to be analyzed with a gray level non-uniformity degree greater than the preset non-uniformity threshold as each gray level non-uniform region. In an embodiment of the present invention, the preset non-uniformity threshold is 0.57. The preset non-uniformity threshold is used to determine whether the region to be analyzed belongs to the gray level non-uniform region, and the implementer can set it according to the implementation scenario.
[0055] For the above steps, in the dyed fabric image, traverse all regions to be analyzed. For each region to be analyzed, compare its gray level non-uniformity degree with the preset non-uniformity threshold. If the gray level non-uniformity degree is greater than the preset non-uniformity threshold, mark the region to be analyzed as a gray level non-uniform region. The gray level non-uniform region can initially reflect the regions with color non-uniformity in the dyed fabric image.
[0056] In the quality inspection process of the coloring uniformity of the fabric dyeing, traditional methods mainly rely on identifying the regions with color non-uniformity in the fabric image. However, this method often ignores the significant impact that external tension may have on the detection results. External tension, such as the stretching or compression of the fabric during the detection process, will cause false regions with dyeing non-uniformity to appear in the image. These regions are not truly caused by improper dyeing processes but by physical deformation. This kind of interference will mislead the quality inspection system and lead to misjudgment of the fabric quality.
[0057] Step S3: According to the situation of the change direction of the gray level values of the pixels in the gray level non-uniform region, obtain the gray level non-standard change measure of the gray level non-uniform region; according to the gray level non-standard change measure, mark the regions with uneven dyeing and coloring in the gray level non-uniform region; perform fabric quality inspection according to all the regions with uneven dyeing and coloring in the dyed fabric image.
[0058] The gray-scale uneven area can reflect the uneven color area in the dyed fabric image. To more accurately screen out the color uneven areas caused by improper dyeing processes, first, considering that improper dyeing processes often result in irregular gray-scale value changes of pixel points, a measure of irregular gray-scale change is constructed to reflect the possibility that the gray-scale uneven area is a color uneven area caused by improper dyeing processes. Then, based on the measure of irregular gray-scale change, the uneven dyeing areas in the gray-scale uneven area are marked. The uneven dyeing areas can more accurately reflect the color uneven areas caused by improper dyeing processes, thereby improving the accuracy of fabric quality inspection.
[0059] Please refer to Figure 2 , which shows a flowchart of a method for obtaining a measure of irregular gray-scale change in an embodiment of the present invention. Preferably, in an embodiment of the present invention, the method for obtaining a measure of irregular gray-scale change specifically includes:
[0060] Step S301: Cluster all pixel points according to the horizontal line angle of the pixel points in the gray-scale uneven area to obtain each straight-line area of the gray-scale uneven area.
[0061] By clustering the straight-line areas, it is provided for subsequent analysis of the color change direction in the gray-scale uneven area, and then to determine whether it is caused by external tension.
[0062] Preferably, in an embodiment of the present invention, the method for obtaining the gray-scale uneven area specifically includes:
[0063] Based on the region growing algorithm, cluster all pixel points according to the horizontal line angle of the pixel points in the gray-scale uneven area to obtain each straight-line area of the gray-scale uneven area. It should be noted that the horizontal line angle of the pixel points is a well-known technical means in the art and can be obtained by the LSD (Line Segment Detector) algorithm.
[0064] It should be noted that the region growing algorithm is a well-known technical means in the art. Here, only a brief description of the steps of using the region growing algorithm to cluster all pixel points according to the horizontal line angle of the pixel points in the gray-scale uneven area to obtain each straight-line area of the gray-scale uneven area is given:
[0065] (1) Set each seed point in the region with uneven gray scale, and take each seed point as the initial growth region; (2) Each growth region performs region growth according to a preset growth criterion to form each updated growth region; (3) Repeat (2) until the growth region meets the iteration termination condition; (4) Until all growth regions meet the preset iteration termination condition, output each growth region, and take each growth region as each straight line region. Preset growth criterion: If the cosine value of the horizontal line angle difference between the edge pixel point of the growth region and its adjacent pixel point is less than the preset similarity threshold, add the adjacent pixel point to the growth region. Preset iteration termination condition: None of the edge pixel points of the growth region meet the growth criterion. In an embodiment of the present invention, the pixels within the eight-neighborhood of the edge pixel point are used as the adjacent pixel points of the edge pixel point. It should be noted that the eight-neighborhood is an existing technology well-known to those skilled in the art and will not be elaborated here. In an embodiment of the present invention, the preset similarity threshold is 0.8, and the implementer can set it according to the implementation scenario by himself.
[0066] For the above steps, considering that when the fabric is subjected to external tension, the internal fibers may be stretched or compressed, resulting in a certain directionality in the color change. This directionality is manifested as a series of similar horizontal line angles in the image. According to the horizontal line angles of the pixel points in the region with uneven gray scale, all pixel points are clustered to obtain each straight line region in the region with uneven gray scale. The straight line region represents the region of the trend of similar gray value changes in the image, and indirectly reflects the color change trend caused by external tension in the region with uneven gray scale.
[0067] Step S302: Construct a fitting straight line for the straight line region according to the horizontal line angles of all pixel points in the straight line region.
[0068] To more accurately describe the directional characteristics of the straight line region and provide a basis for subsequent analysis and processing.
[0069] Preferably, in an embodiment of the present invention, the method for obtaining the fitting straight line specifically includes:
[0070] In the straight line region, take the number of pixel points corresponding to the horizontal line angle as the frequency of the horizontal line angle; the angle of the fitting straight line is the horizontal line angle corresponding to the maximum frequency; the fitting straight line passes through the center point of the straight line region.
[0071] For the above steps, first, within the straight-line region, count the number of pixel points corresponding to each horizontal-line angle, that is, calculate the frequency of each horizontal-line angle. This step is to find out which horizontal-line angle dominates in the straight-line region. Then, find the horizontal-line angle with the highest frequency and use it as the angle of the fitted straight line. This is because the angle with the highest frequency represents the direction of most pixel points in the straight-line region and thus can best represent the directional characteristics of the straight-line region. Finally, determine the position of the fitted straight line. In the embodiment of the present invention, the fitted straight line is set to pass through the center point of the straight-line region. This is because the center point can better reflect the overall position characteristics of the straight-line region and at the same time make the fitted straight line more representative. The fitted straight line can accurately describe the directional characteristics of the straight-line region, which is crucial for analyzing the color change trend of the fabric when subjected to external tension. Through the fitted straight line, the direction and trend of the color change can be more intuitively understood, thereby determining whether the fabric is subjected to uniform tension.
[0072] Step S303: Obtain the local non-standard measure of the straight-line region according to the distribution of the fitted straight lines in the straight-line region and the spatial distribution of the pixel points in the straight-line region.
[0073] Preferably, in an embodiment of the present invention, the method for obtaining the local non-standard measure specifically includes:
[0074] In the straight-line region, take the total number of intersection points of all the fitted straight lines as the first gray-scale non-standard measure of the straight-line region;
[0075] In the straight-line region, calculate the average Euclidean distance between all pixel points and the clustering center point to obtain the second gray-scale non-standard measure of the straight-line region;
[0076] Calculate the sum value of the first gray-scale non-standard measure and the second gray-scale non-standard measure to obtain the local non-standard measure of the straight-line region. It should be noted that the clustering center point of the straight-line region is a well-known technical means to those skilled in the art and will not be elaborated here.
[0077] For the above steps, first, count the total number of intersection points of all the fitted lines in the straight-line region. These intersection points represent the directional mutations or inconsistencies in the straight-line region. Therefore, the number of intersection points can be used as the first grayscale non-conformance metric for measuring the normality of the straight-line region. The larger the first grayscale non-conformance metric, the more intersection points there are, indicating that the normality of the straight-line region is worse, that is, there are more directional mutations or inconsistencies. Next, calculate the average Euclidean distance between each pixel point in the straight-line region and the cluster center point. The average Euclidean distance reflects the degree of dispersion of the pixel points relative to the cluster center point, that is, the spatial distribution of the pixel points within the straight-line region. The larger the second grayscale non-conformance metric, the more dispersed the pixel points are and the worse the normality. Finally, add the first grayscale non-conformance metric and the second grayscale non-conformance metric to obtain the local non-conformance metric of the straight-line region. The local non-conformance metric combines the degree of directional mutation and the degree of dispersion of pixel points in the straight-line region, and can more comprehensively evaluate the normality of the straight-line region. The local non-conformance metric provides a quantitative index to evaluate the normality of the straight-line region. This helps to more objectively judge whether the fabric has received uniform tension during the dyeing process.
[0078] Step S304: Positively fuse the local non-conformance metrics of all straight-line regions in the grayscale non-uniform region to obtain the grayscale non-conformance change metric of the grayscale non-uniform region.
[0079] By positively fusing the local non-conformance metrics of all straight-line regions, a grayscale non-conformance change metric is constructed, which can reflect the possibility of the color non-uniform region caused by improper dyeing process in the grayscale non-uniform region.
[0080] It should be noted that positive fusion is an existing technology well-known to those skilled in the art. Positive fusion can use simple multiplication, arithmetic mean or other suitable fusion methods. In an embodiment of the present invention, the cumulative value of the local non-conformance metrics of all straight-line regions in the grayscale non-uniform region is calculated and normalized to obtain the grayscale non-conformance change metric of the grayscale non-uniform region. It should be noted that the normalization method used is: normalize using the norm normalization function to limit the numerical range between 0 and 1. Among them, normalization is a technical means well-known to those skilled in the art, and the choice of the normalization function can be linear normalization or standard normalization, etc. The specific normalization method is not limited here.
[0081] For the above steps, considering that a uniform tension is applied to the dyed fabric during the detection process, if the normality of the gray-scale uneven area is lower, it means that the color distribution is more likely to be uneven due to uneven dyeing. The local non-normality measure reflects the non-normality of a single straight-line area. By calculating the cumulative value of the local non-normality measures of all straight-line areas and performing normalization, the gray-scale non-normality change measure of the gray-scale uneven area is obtained. The higher the gray-scale non-normality change measure, the lower the normality of the gray-scale uneven area, and the more likely it is that the color distribution is uneven due to the dyeing process.
[0082] Preferably, in an embodiment of the present invention, in order to screen out the areas with uneven color caused by improper dyeing process, the method for obtaining the uneven dyeing area specifically includes:
[0083] Mark the gray-scale uneven areas with a gray-scale non-normality change measure greater than the preset non-normality threshold as uneven dyeing areas. In an embodiment of the present invention, the preset non-normality threshold is 0.7, and the implementer can set it according to the implementation scenario.
[0084] For the above steps, mark the gray-scale uneven areas with a gray-scale non-normality change measure greater than the preset non-normality threshold as uneven dyeing areas. These areas are considered to be areas where there may be problems such as improper dyeing process or uneven stress, and further quality inspection and analysis are required.
[0085] Preferably, in an embodiment of the present invention, the specific method for fabric quality inspection includes:
[0086] The inspector uses a gray scale card or a special color comparison tool to compare the color of the marked uneven dyeing area with the control color change. Record the color differences, including changes in hue, saturation, and brightness. According to the color comparison results, combined with the dyeing standards and quality requirements of polyester fabrics, evaluate the dyeing uniformity grade of the polyester sample. The dyeing uniformity grade can be divided into multiple quality levels, such as excellent, good, general, poor, etc., and the specific levels can be set according to actual needs. Organize the dyeing uniformity grade evaluation results and related image data into a report. Report the report to relevant staff, including quality inspectors, production managers, etc.
[0087] The present invention also proposes a visual inspection system for fabric dyeing uniformity, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is used to run the corresponding computer program, and when the computer program runs in the processor, it can implement the above-described visual inspection method for fabric dyeing uniformity.
[0088] In summary, the embodiments of the present invention provide a visual detection method and system for the coloring uniformity of dyed fabrics. First, each region to be analyzed in the dyed fabric image is determined according to the edge distribution of the dyed fabric image; the gray-scale non-uniformity of each region to be analyzed is obtained according to the difference in the gray-scale values of the pixel points in the region to be analyzed; the gray-scale non-standard change measure of the gray-scale non-uniform region is obtained according to the change direction of the gray-scale values of the pixel points in the gray-scale non-uniform region; the uneven coloring regions in the gray-scale non-uniform region are marked according to the gray-scale non-standard change measure; and the fabric quality is detected according to all the uneven coloring regions in the dyed fabric image. By deeply analyzing the influence of the application of external tension on the image, the present invention screens out the uneven coloring regions to more accurately reflect the color-uneven regions caused by improper dyeing processes, thereby improving the accuracy of fabric quality detection.
[0089] It should be noted that the above sequence of the embodiments of the present invention is only for description and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0090] Each embodiment in this specification is described in a progressive manner, and the same or similar parts among the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.
Claims
1. A method for visually detecting the uniformity of dyeing of cloth, characterized in that: The method comprises the following steps: Acquire a dyed cloth image; Determine each area to be analyzed in the dyed cloth image according to the edge distribution of the dyed cloth image; obtain the grayscale unevenness of each area to be analyzed according to the difference of the grayscale values of the pixels in the area to be analyzed; and filter out the grayscale uneven area from all the areas to be analyzed in the dyed cloth image according to the grayscale unevenness; According to the change direction of the grayscale value of the pixel point in the grayscale uneven area, the grayscale irregular change measurement of the grayscale uneven area is obtained; according to the grayscale irregular change measurement, the dyeing and coloring uneven area in the grayscale uneven area is marked; according to all the dyeing and coloring uneven areas of the dyed cloth image, the cloth quality detection is performed.
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. A method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: The method for obtaining the grayscale unevenness specifically includes: In the area to be analyzed, the pixel points on the edge are taken as edge pixel points, and the pixel points other than the edge pixel points are taken as internal pixel points; the mean of the gradient values of all the edge pixel points is calculated to obtain a first non-uniform parameter; the variance of the grayscale values corresponding to all the internal pixel points is calculated to obtain a second non-uniform parameter; the product of the first non-uniform parameter and the second non-uniform parameter is calculated and normalized to obtain the grayscale non-uniformity of the area to be analyzed.
4. A method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: 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 each grayscale uneven area.
5. A method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: The method for obtaining the grayscale irregularity change measurement specifically includes: According to the horizontal line angles of the pixels in the grayscale uneven area, all the pixels are clustered to obtain the straight line areas in the grayscale uneven area; According to the horizontal line angles of all pixel points in the straight line area, a fitting straight line of the straight line area is constructed; According to the distribution of the fitted straight line in the straight line area and the spatial distribution of the pixel points in the straight line area, a local irregularity measure of the straight line area is obtained; The local irregularity measures of all straight line regions in the grayscale uneven region are forwardly fused to obtain the grayscale irregularity change measure of the grayscale uneven region.
6. A method for visually inspecting the uniformity of dyeing of cloth according to claim 5, characterized in that: The method for obtaining the fitting 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 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.
7. A method for visually inspecting the uniformity of dyeing of cloth according to claim 5, 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 taken 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 measure 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.
8. A method for visually inspecting the uniformity of dyeing of cloth according to claim 5, 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 irregular grayscale change measure of the uneven grayscale region.
9. A method for visually inspecting the uniformity of dyeing of cloth according to claim 1, characterized in that: The method for obtaining the unevenly dyed coloring area specifically comprises: The grayscale uneven area where the grayscale irregularity change measure is greater than a preset irregularity threshold is marked as an unevenly stained coloring area.
10. A visual inspection system for dyeing uniformity of cloth, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: 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 9 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
Line segment detection method, apparatus, device, and computer-readable storage medium
US20210150729A1
Detection of cognitive impairment in human brains from images
US20230282351A1