Method for testing flatness of waterproof fabric
By analyzing the grayscale image of the waterproof fabric, segmenting the area and quantifying the texture regularity, and combining the gradient direction differences, accurately detecting the flatness of the waterproof fabric, the problem of inaccurate detection in the prior art is solved and the waterproof performance is improved.
Patent Information
- Application Number
- CN202411293728.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-09-14
AI Technical Summary
Existing computer vision technology cannot accurately detect the flatness of waterproof fabrics, resulting in a degradation of waterproof performance.
By obtaining the grayscale image of waterproof fabric, segmenting it into several areas, analyzing the distribution of edge pixel points and texture regularity, filtering out the reference area and leveling factor, combining the difference in gradient direction, quantifying the leveling degree, distinguishing the flattening area and wrinkling area, and calculating The flatness of the fabric.
It realizes accurate detection of the flatness of waterproof fabrics, improves the assurance of waterproof performance, and avoids mechanical errors and abnormal texture interference.
Smart Images

Figure CN119205682A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of fabric flatness detection, and in particular to a method for testing the flatness of a waterproof fabric. Background Art
[0002] In the process of producing waterproof fabrics, in order to ensure the waterproof performance of waterproof fabrics, it is necessary to ensure that the fabrics are flat enough so that the waterproof coating can be more evenly distributed on the waterproof fabrics. When wrinkles appear on the fabrics, the folded fabrics in the wrinkles cannot be coated with waterproof coating, resulting in reduced waterproof performance of the waterproof fabrics. Therefore, it is necessary to detect the flatness of the fabrics. However, due to the influence of mechanical errors in the process of producing fabrics, areas with abnormal textures may appear in local areas of the fabrics, and the abnormal texture areas will interfere with the detection of wrinkles. That is, using computer vision simply through the differences between different areas of the fabric cannot accurately obtain the flatness of the waterproof fabric. Summary of the invention
[0003] The present invention provides a method for testing the flatness of a waterproof fabric to solve the existing problem that computer vision simply detects the differences between different areas in the fabric and cannot accurately obtain the flatness of the waterproof fabric.
[0004] A method for testing the flatness of a waterproof fabric of the present invention adopts the following technical solution:
[0005] The following steps are involved:
[0006] Get a grayscale image of the waterproof fabric;
[0007] The grayscale image is divided into several regions and the edge pixels in each region are obtained; according to the distribution of the edge pixels in the region, the regularity of the texture in the region is obtained;
[0008] The reference area is selected according to the regularity of the texture in the area; the flattening factor of each area is obtained according to the difference between each area and the reference area in the edge pixel points, combined with the regularity of the texture in each area; the reference gradient direction is selected according to the gradient direction of all edge pixel points in the grayscale image; the flattening degree of each area is obtained according to the difference in the gradient direction of the edge pixel points in each area that are different from the reference gradient direction, combined with the flattening factor of each area; the flat area and the wrinkled area are selected according to the flattening degree of the area;
[0009] The flatness of the waterproof fabric is obtained based on the number of flat areas and the flatness of the wrinkled areas.
[0010] Preferably, the grayscale image is divided into a plurality of regions and edge pixels in each region are obtained, including the following specific methods:
[0011] A region of a×b is preset, and the grayscale image is divided into several regions of a×b in size; a and b are the length and width of the preset region; the sobel edge detection operator is used to obtain edge pixels in all regions.
[0012] Preferably, the obtaining of the regularity of the texture in the region includes the following specific methods:
[0013] For any region, the sequence composed of each row of pixels in the region is recorded as a row of pixel sequence, and the number of edge pixels in all row pixel sequences and the distance between adjacent edge pixels in all row pixel sequences are obtained; the average distance between adjacent edge pixels in all row pixel sequences is recorded as the reference distance of the region; according to the difference between the distance between adjacent edge pixels in all row pixel sequences and the reference distance of the region, and the variance of the number of edge pixels in all row pixel sequences, the regularity of the texture in the region is obtained;
[0014] The regularity of the texture in the region is negatively correlated with the difference between the distance between adjacent edge pixels in all row pixel sequences and the reference distance of the region, and the variance of the number of edge pixels in all row pixel sequences.
[0015] Preferably, the method of selecting the reference area according to the regularity of the texture in the area includes:
[0016] A regularity threshold is preset, and the area in which the regularity of the texture is greater than the regularity threshold is recorded as the reference area.
[0017] Preferably, the obtaining of the leveling factor of each region includes the following specific methods:
[0018] Obtain the mean grayscale number and the mean gradient value of all edge pixels in all reference areas, which are recorded as reference grayscale number and reference gradient value respectively; obtain the smoothing factor of each area according to the difference between the mean grayscale number and the mean gradient of all edge pixels in each area and the reference grayscale number and the reference gradient value, as well as the regularity of the texture in each area;
[0019] The smoothing factor of each region is negatively correlated with the number of gray levels and the gradient mean of all edge pixels in each region, and the difference between the number of reference gray levels and the reference gradient value, respectively; the smoothing factor of each region is positively correlated with the regularity of the texture in each region.
[0020] Preferably, the method of screening out the reference gradient direction according to the gradient directions of all edge pixels in the grayscale image includes the following specific methods:
[0021] The gradient direction with the highest frequency among all the gradient directions of the edge pixels in the grayscale image is recorded as the reference gradient direction.
[0022] Preferably, the obtaining of the flatness of each area includes the following specific methods:
[0023] For any region, the pixels in the region whose gradient direction is different from the baseline gradient direction are recorded as abnormal pixels, the region composed of adjacent abnormal pixels in the region is recorded as an abnormal sub-region, and the largest abnormal sub-region is recorded as a characteristic abnormal sub-region. The smoothness of the region is obtained based on the difference between the gradient direction of each abnormal pixel and the baseline gradient direction, the smoothing factor of the region and the number of pixels in the characteristic abnormal sub-region.
[0024] Preferably, the obtaining of the flatness of the area includes the following specific methods:
[0025] The sum of the differences between the gradient direction of each abnormal pixel in any region and the reference gradient direction and the product of the number of pixels in the characteristic abnormal sub-region are recorded as the wrinkle factor of the region; the ratio of the flattening factor of the region to the wrinkle factor of the region is normalized to obtain the flatness of the region.
[0026] Preferably, the method of selecting the flat area and the wrinkled area according to the flatness of the area includes:
[0027] A flatness threshold is preset. For any area, if the flatness of the area is greater than the flatness threshold, the area is a flat area; if the flatness of the area is less than or equal to the flatness threshold, the area is a wrinkled area.
[0028] Preferably, the method of obtaining the flatness of the waterproof fabric according to the number of flat areas and the flatness of the wrinkled areas includes:
[0029] The flatness of the waterproof fabric is obtained according to the proportion of the flat area in all areas in the grayscale image of the waterproof fabric and the average flatness of all wrinkled areas;
[0030] The flatness of the waterproof fabric is positively correlated with the proportion of flat areas in all areas in the grayscale image of the waterproof fabric; the flatness of the waterproof fabric is negatively correlated with the average flatness of all wrinkled areas.
[0031] The beneficial effect of the technical solution of the present invention is as follows: the present invention divides a grayscale image into several regions and obtains edge pixel points in each region; according to the distribution of edge pixel points in the region, the regularity of texture in the region is obtained. Since the texture caused by wrinkles in waterproof fabrics is not regular, the regularity of texture in the region can be obtained through the distribution of edge pixel points in the region, and whether there are wrinkles in the region can be preliminarily quantified.
[0032] The reference area is selected according to the regularity of the texture in the area, and the smoothing factor of each area is obtained in combination with the regularity of the texture in each area; since the texture generated by the wrinkles in each area is the shadow edge generated by the light, the grayscale and gradient value of the edge are greatly different from the grayscale and gradient value of the normal texture, so this can be used as a basis to obtain the smoothing factor of each area, and the larger the flatness factor, the smaller the possibility of wrinkles in the area; the flatness of each area is obtained according to the gradient direction of the edge pixels in the area and the flatness factor of the area; since the gradient direction of the wrinkle edge pixels is greatly different from the gradient direction of the texture edge pixels in the image, this can be used as a basis to combine the flatness factor of the area to accurately quantify whether there are wrinkles in the area, and then obtain the flat area and the wrinkle area; according to the number of flat areas and the flatness of the wrinkle areas, the flatness of the waterproof fabric is obtained, and the flatness of the waterproof fabric can be accurately obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.
[0034] Figure 1 A flowchart of a method for testing the flatness of a waterproof fabric according to the present invention;
[0035] Figure 2 Flow chart for testing the flatness of waterproof fabrics. DETAILED DESCRIPTION
[0036] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a waterproof fabric flatness test method proposed by the present invention, its specific implementation, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[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 specific scheme of the method for testing the flatness of a waterproof fabric provided by the present invention is described in detail below with reference to the accompanying drawings.
[0039] See also Figure 1 , which shows a flowchart of a method for testing the flatness of a waterproof fabric provided by an embodiment of the present invention, the method comprising the following steps:
[0040] Step S001: Acquire a grayscale image of the waterproof fabric.
[0041] It should be noted that in the process of producing waterproof fabrics, in order to ensure the waterproof performance of the waterproof fabrics, it is necessary to ensure that the fabrics are sufficiently flat so that the waterproof coating can be more evenly distributed on the waterproof fabrics; therefore, this embodiment proposes a waterproof fabric flatness testing method, and its specific application scenario is to detect the flatness of the waterproof fabrics in the process of producing waterproof fabrics. For this purpose, it is first necessary to collect images of the waterproof fabrics.
[0042] Specifically, an industrial high-definition camera is used to collect an image of the waterproof fabric, and the image of the waterproof fabric is gray-scaled to obtain a gray-scale image of the waterproof fabric.
[0043] Step S002: Segment the grayscale image into several regions and obtain edge pixels in each region; obtain the regularity of the texture in the region based on the distribution of edge pixels in the region.
[0044] It should be noted that this embodiment decomposes the grayscale image of the waterproof fabric into several regions, and obtains the flatness of the waterproof fabric by analyzing the flatness of each region. Since the texture produced by wrinkles in the waterproof fabric is irregular, and since the edge pixels can well show the texture features in the image, the regularity of the texture in the region can be obtained through the distribution of edge pixels in the region, and the presence of wrinkles in the region can be preliminarily quantified.
[0045] Preferably, in one embodiment of the present invention, an a×b area range is preset, and the grayscale image is divided into several areas of a×b size; a and b are the length and width of the preset area range, and the specific size can be set by itself in combination with actual conditions, and this embodiment does not limit it. In this embodiment, a=30 and b=20 are used for description; the Sobel edge detection operator is used to obtain edge pixel points in all areas; since the Sobel edge detection operator is a well-known prior art, it will not be described in detail in this embodiment.
[0046] Further, for any region, the sequence composed of each row of pixels in the region is recorded as a row of pixel sequence, and the number of edge pixels in all row pixel sequences in the region and the distance between adjacent edge pixels in all row pixel sequences are obtained; the average of the distances between adjacent edge pixels in all row pixel sequences is recorded as the reference distance of the region; according to the difference between the distances between adjacent edge pixels in all row pixel sequences and the reference distance of the region, and the variance of the number of edge pixels in all row pixel sequences, the regularity of the texture in the region is obtained;
[0047] The regularity of the texture in the region is negatively correlated with the difference between the distance between adjacent edge pixels in all row pixel sequences and the reference distance of the region, and the variance of the number of edge pixels in all row pixel sequences. The specific calculation formula is:
[0048]
[0049] In the formula, τ represents the regularity of the texture in the region; σ represents the variance of the number of edge pixels in all row pixel sequences; N represents the number of pixel sequences in the region; M i Indicates the number of edge pixels in the i-th row of pixel sequences in the region; X i,j represents the index value of the jth edge pixel in the i-th row of pixel sequence in the region; X i,j-1 Represents the index value of the j-1th edge pixel in the pixel sequence of the i-th row in the region; represents the reference distance of the region; || represents the absolute value function; norm{} represents the linear normalization function, and its normalization object is all regions
[0050] It should be noted that σ is the variance of the number of edge pixels in all row pixel sequences in the region. The larger the value of σ, the greater the difference in the number of edge pixels between different pixel sequences in the region, and the less regular the texture in the region. is the base distance of the region, which represents the average distance between adjacent edge pixels in all row pixel sequences in the region; therefore It represents the difference between the distance between adjacent edge pixels in each row of pixel sequence in the region and the mean distance between adjacent edge pixels in all row pixel sequences in the region. The greater the difference, the greater the distribution difference of edge pixels in different row pixel sequences in the region, so the texture in the region is less regular. Therefore, σ is related to The smaller the value, the more regular the texture in the area.
[0051] At this point, the regularity of the texture in each area is obtained.
[0052] Step S003: Filter out the benchmark area according to the regularity of the texture in the area; obtain the smoothing factor of each area according to the difference between each area and the benchmark area in edge pixels, combined with the regularity of the texture in each area; filter out the benchmark gradient direction according to the gradient direction of all edge pixels in the grayscale image; obtain the flatness of each area according to the difference in gradient direction of edge pixels in each area that are different from the benchmark gradient direction, combined with the flatness factor of each area; filter out the flat area and the wrinkled area according to the flatness of the area.
[0053] It should be noted that the texture generated by wrinkles in each area is the shadow edge produced by illumination. The grayscale and gradient values of the edges are very different from those of normal textures. Therefore, the smoothing factor of each area can be obtained based on this. In the process of obtaining normal textures, in order to avoid the interference of textures generated by wrinkles, it is also necessary to screen out the reference area according to the regularity of the texture in the area, and obtain the smoothing factor of each area based on the difference in edge pixels between each area and the reference area and the regularity of the texture in each area.
[0054] It should be further explained that since the wrinkles in the waterproof fabric are usually wrinkles on a small area, that is, the texture of the wrinkles accounts for a small proportion in the grayscale image of the waterproof fabric, and since the texture generated by the wrinkles is the shadow edge generated by light, the edge pixels in the area with wrinkles and most of the texture edge pixels in the grayscale image have a large difference in the gradient direction. Since the larger the smoothing factor of the area, the less wrinkle features there are in the area, the difference in the gradient direction between the gradient direction of each area and the gradient direction of most of the texture edge pixels in the grayscale image can be combined with the smoothing factor of each area to obtain the smoothness of each area, and then the flat area and the wrinkled area can be screened out.
[0055] Preferably, in one embodiment of the present invention, a regularity threshold G is preset. The specific value of G can be set according to actual conditions. This embodiment does not limit it. In this embodiment, G=0.9 is used for description, and the area in which the texture regularity is greater than G is recorded as the reference area.
[0056] Furthermore, the mean grayscale quantity and the mean gradient value of all edge pixels in all benchmark areas are obtained, which are recorded as benchmark grayscale quantity and benchmark gradient value respectively; the smoothing factor of each area is obtained according to the difference between the mean grayscale quantity and gradient of all edge pixels in each area and the benchmark grayscale quantity and benchmark gradient value, as well as the regularity of the texture in each area.
[0057] The smoothing factor of each region is negatively correlated with the number of gray levels and the gradient mean of all edge pixels in each region, and the difference between the number of reference gray levels and the reference gradient value, respectively; the smoothing factor of each region is positively correlated with the regularity of the texture in each region.
[0058] In an example, the specific calculation formula is:
[0059]
[0060] Where R represents the smoothing factor of the region; τ represents the regularity of the texture in the region; W represents the number of gray levels of all edge pixels in the region; represents the number of reference gray levels; D represents the gradient mean of all edge pixels in the region; represents the base gradient value; || represents the absolute value function.
[0061] It should be noted that and The larger the value of , the greater the difference in grayscale and gradient value between the region and other regions with regular textures, and the greater the possibility of wrinkles in the region. Since the texture produced by wrinkles is irregular, the larger the value of τ, the smaller the possibility of wrinkles in the region. Therefore, the larger the value of R, the smaller the possibility of wrinkles in the region, and the larger the smoothing factor of the region.
[0062] It should be further explained that the wrinkled texture accounts for a small proportion in the grayscale image of the waterproof fabric. Therefore, the gradient direction that can characterize the texture edge pixel points in the grayscale image can be screened out through the frequency of occurrence of the gradient direction of each edge pixel point in the grayscale image. Furthermore, the difference in the gradient direction in each area and the gradient direction of most texture edge pixels in the grayscale image is combined with the smoothing factor of each area to obtain the smoothness of each area, and then the flat area and the wrinkled area are screened out.
[0063] Preferably, in one embodiment of the present invention, the gradient direction with the highest frequency among the gradient directions of all edge pixels in the grayscale image is recorded as the reference gradient direction;
[0064] Furthermore, for any region, pixels in the region whose gradient direction is different from the reference gradient direction are recorded as abnormal pixels, and the region composed of adjacent abnormal pixels in the region is recorded as an abnormal sub-region, and the largest abnormal sub-region is recorded as a characteristic abnormal sub-region. The degree of flatness of the region is obtained according to the difference between the gradient direction of each abnormal pixel and the reference gradient direction, the flattening factor of the region, and the number of pixels in the characteristic abnormal sub-region;
[0065] The sum of the differences between the gradient direction of each abnormal pixel in any region and the reference gradient direction, and the product of the number of pixels in the characteristic abnormal sub-region, is recorded as the wrinkle factor of the region; the ratio of the flattening factor of the region to the wrinkle factor of the region is normalized to obtain the flatness of the region. The specific calculation formula is:
[0066]
[0067] In the formula, ρ represents the flatness of the region; n represents the number of abnormal pixels in the region; R represents the flatness factor of the region; θ v represents the gradient direction of the vth abnormal pixel in the region; || represents the absolute value function; represents the reference gradient direction; m represents the number of pixels in the feature abnormal sub-region; norm() represents the linear normalization function, and its normalization object is all regions
[0068] It should be noted that The larger the value of is, the greater the difference between the gradient direction of all abnormal pixels in the region and the reference gradient direction is, that is, the gradient direction of the edge pixels in the region is more different. m represents the number of pixels in the characteristic abnormal sub-region. Since wrinkles usually appear in a concentrated manner in a region, the largest abnormal sub-region is recorded as the characteristic abnormal sub-region. It indicates the wrinkle factor of the region. The smaller the wrinkle factor of the region, the flatter the region. Since the larger the value of R, the smaller the possibility of wrinkles in the region, the larger the value of ρ, the flatter the region. Furthermore, the flat region and wrinkle region can be obtained by the flatness of the region.
[0069] Preferably, in one embodiment of the present invention, a flatness threshold K is preset. The specific value of K can be set according to actual conditions. This embodiment does not limit it. In this embodiment, K=0.8 is used for description. For any area, if the flatness of the area is greater than K, the area is a flat area. If the flatness of the area is less than or equal to K, the area is a wrinkled area.
[0070] At this point, a flat area and a wrinkled area are obtained.
[0071] Step S004: Obtain the flatness of the waterproof fabric according to the number of flat areas and the flatness of the wrinkled areas.
[0072] It should be noted that after obtaining the flat area and the wrinkled area by analyzing the texture in each area, the flatness of the waterproof fabric can be accurately obtained by combining the proportion of the flat area in the waterproof fabric with the flatness of the wrinkled area.
[0073] Preferably, in one embodiment of the present invention, the flatness of the waterproof fabric is obtained according to the proportion of the flat area in all areas in the grayscale image of the waterproof fabric, combined with the average flatness of all wrinkled areas;
[0074] The flatness of the waterproof fabric is positively correlated with the proportion of flat areas in all areas in the grayscale image of the waterproof fabric; the flatness of the waterproof fabric is negatively correlated with the average flatness of all wrinkled areas.
[0075] In an example, the specific calculation formula is:
[0076]
[0077] Where P represents the flatness of the waterproof fabric; H represents the number of regions in the grayscale image of the waterproof fabric; h represents the number of flat regions in the grayscale image of the waterproof fabric; z represents the number of wrinkled regions in the grayscale image of the waterproof fabric; ρ z Represents the flatness of the vth wrinkle area; exp() represents an exponential function with a natural constant as the base. This embodiment adopts the exp(-α) model to present the inverse proportional relationship and normalization processing. α is the input of the model. The implementer can set the inverse proportional function and normalization function according to the actual situation.
[0078] It should be noted that It represents the proportion of flat area in waterproof fabric. The larger the value is, the more flat areas there are in the waterproof fabric, and the flatter the waterproof fabric is; It represents the average flatness of all wrinkle areas. The larger the value of, the more wrinkled the wrinkle area in the waterproof fabric; therefore The larger the value, the smoother the waterproof fabric.
[0079] Furthermore, a flatness threshold F is preset. The specific value of F can be set according to the actual situation. This embodiment does not limit it. In this embodiment, F=0.98 is used for description. If the flatness of the waterproof fabric is greater than or equal to the flatness threshold, the waterproof fabric is flat; if the flatness of the waterproof fabric is less than the flatness threshold, the waterproof fabric is uneven.
[0080] like Figure 2 As shown, it is a flow chart for detecting the flatness of waterproof fabrics.
[0081] At this point, this embodiment is completed.
[0082] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for testing the flatness of a waterproof fabric, characterized in that: The method comprises the following steps: Get a grayscale image of the waterproof fabric; The grayscale image is divided into several regions and the edge pixels in each region are obtained; according to the distribution of the edge pixels in the region, the regularity of the texture in the region is obtained; The reference area is selected according to the regularity of the texture in the area; the flattening factor of each area is obtained according to the difference between each area and the reference area in the edge pixel points, combined with the regularity of the texture in each area; the reference gradient direction is selected according to the gradient direction of all edge pixel points in the grayscale image; the flattening degree of each area is obtained according to the difference in the gradient direction of the edge pixel points in each area that are different from the reference gradient direction, combined with the flattening factor of each area; the flat area and the wrinkled area are selected according to the flattening degree of the area; The flatness of the waterproof fabric is obtained based on the number of flat areas and the flatness of the wrinkled areas.
2. A method for testing the flatness of a waterproof fabric according to claim 1, characterized in that: The specific method of dividing the grayscale image into several regions and obtaining edge pixels in each region includes: A region of a×b is preset, and the grayscale image is divided into several regions of a×b in size; a and b are the length and width of the preset region; the sobel edge detection operator is used to obtain edge pixels in all regions.
3. A method for testing the flatness of waterproof fabric according to claim 1, characterized in that: The specific method of obtaining the regularity of the texture in the region includes: For any region, the sequence composed of each row of pixels in the region is recorded as a row of pixel sequence, and the number of edge pixels in all row pixel sequences and the distance between adjacent edge pixels in all row pixel sequences are obtained; the average distance between adjacent edge pixels in all row pixel sequences is recorded as the reference distance of the region; according to the difference between the distance between adjacent edge pixels in all row pixel sequences and the reference distance of the region, and the variance of the number of edge pixels in all row pixel sequences, the regularity of the texture in the region is obtained; The regularity of the texture in the region is negatively correlated with the difference between the distance between adjacent edge pixels in all row pixel sequences and the reference distance of the region, and the variance of the number of edge pixels in all row pixel sequences.
4. A method for testing the flatness of a waterproof fabric according to claim 1, characterized in that: The specific method of selecting the reference area according to the regularity of the texture in the area includes: A regularity threshold is preset, and the area in which the regularity of the texture is greater than the regularity threshold is recorded as the reference area.
5. A method for testing the flatness of waterproof fabric according to claim 1, characterized in that: The specific method of obtaining the leveling factor of each area includes: Obtain the mean grayscale quantity and the mean gradient value of all edge pixels in all reference areas, which are recorded as the reference grayscale quantity and the reference gradient value respectively; Obtain the smoothing factor of each region based on the number of gray levels and the mean gradient of all edge pixels in each region, the difference between the number of reference gray levels and the reference gradient value, and the regularity of the texture in each region; The smoothing factor of each region is negatively correlated with the number of gray levels and the gradient mean of all edge pixels in each region, and the difference between the number of reference gray levels and the reference gradient value, respectively; the smoothing factor of each region is positively correlated with the regularity of the texture in each region.
6. A method for testing the flatness of waterproof fabric according to claim 1, characterized in that: The specific method of screening out the reference gradient direction according to the gradient directions of all edge pixels in the grayscale image includes: The gradient direction with the highest frequency among all the gradient directions of the edge pixels in the grayscale image is recorded as the reference gradient direction.
7. A method for testing the flatness of waterproof fabric according to claim 1, characterized in that: The specific method of obtaining the flatness of each area includes: For any region, the pixels in the region whose gradient direction is different from the baseline gradient direction are recorded as abnormal pixels, the region composed of adjacent abnormal pixels in the region is recorded as an abnormal sub-region, and the largest abnormal sub-region is recorded as a characteristic abnormal sub-region. The smoothness of the region is obtained based on the difference between the gradient direction of each abnormal pixel and the baseline gradient direction, the smoothing factor of the region and the number of pixels in the characteristic abnormal sub-region.
8. A method for testing the flatness of waterproof fabric according to claim 7, characterized in that: The method of obtaining the flatness of the area includes: The sum of the differences between the gradient direction of each abnormal pixel in any region and the reference gradient direction and the product of the number of pixels in the characteristic abnormal sub-region are recorded as the wrinkle factor of the region; The ratio of the flattening factor of the region to the wrinkle factor of the region is normalized to obtain the flattening degree of the region.
9. A method for testing the flatness of waterproof fabric according to claim 1, characterized in that: The method of selecting the flat area and the wrinkled area according to the flatness of the area includes: A flatness threshold is preset. For any area, if the flatness of the area is greater than the flatness threshold, the area is a flat area; if the flatness of the area is less than or equal to the flatness threshold, the area is a wrinkled area.
10. A method for testing the flatness of waterproof fabric according to claim 1, characterized in that: The method of obtaining the flatness of the waterproof fabric according to the number of flat areas and the flatness of the wrinkled areas includes: The flatness of the waterproof fabric is obtained according to the proportion of the flat area in all areas in the grayscale image of the waterproof fabric and the average flatness of all wrinkled areas; The flatness of the waterproof fabric is positively correlated with the proportion of flat areas in all areas in the grayscale image of the waterproof fabric; the flatness of the waterproof fabric is negatively correlated with the average flatness of all wrinkled areas.
Citation Information
Patent Citations
Poultry and veterinary auxiliary system based on abnormal egg laying detection
CN114782421A
Intelligent adjusting method of cloth plaiting machine for textile production
CN114821284A
Surfboard surface flatness online detection method and system
CN116758077A
Packaging box surface flatness detection method and system
CN117437279A
Clothing cutting piece quality detection system and method thereof
CN118096715A
