A method for detecting fluff in a singeing process of textile fabrics
By tiling and feature analysis of the images after woven fabrics, combined with edge detection methods, the problems of missed and missed detection in fluff detection are solved, and the accuracy and reliability of the detection are improved.
Patent Information
- Application Number
- CN202411918419.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Traditional edge detection algorithms are prone to missed or mis-checked when detecting textile fabric fluffs after wool burning process, resulting in the unqualified fabric being misjudged as qualified, affecting product quality.
A velvet detection method is proposed. By tiling the surface images of textile fabrics after woven hair, the regional parameters are determined based on the diversity and fluctuation of the grayscale values of the pixel points, the degree of velvet is calculated based on the velvet feature amount of the target pixel points, the velvet pixel points are screened, and the velvet area is determined through edge detection.
It improves the accuracy of velvet detection, reduces misjudgment, ensures the reliability of fabric quality evaluation, and overcomes the missed and mis-checking problems of traditional algorithms when detecting velvets.
Smart Images

Figure CN119359716B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and specifically to a method for detecting fluff used in a singeing process of textile fabrics. Background Art
[0002] In the textile industry, the singeing process is crucial to improving the quality of textile fabrics. This process is mainly to remove excess fluff on the surface of the fabric, making the surface of the fabric smooth and flat. The appearance quality and feel of the fabric after singeing can be significantly improved, such as obtaining better smoothness and glossiness, making the fabric look more beautiful, and at the same time, the feel will be more delicate and comfortable.
[0003] After the textile fabric has gone through the singeing process, the surface of the textile fabric is tested for fuzz to determine whether the fuzz removal is thorough. If the fuzz removal is not thorough, it indicates that there are defects on the surface of the fabric, resulting in a rough surface of the fabric, and further process adjustments are required. It can be seen that fuzz detection is of great significance to the quality control of the singeing process.
[0004] The prior art usually applies the Canny edge detection algorithm to the defect detection process of textile fabrics. For example, the Chinese patent document with the existing authorization announcement number CN112070765B discloses a cloth detection method based on bilateral filtering combined with improved OTSU, which includes the following steps: preprocessing the cloth image collected by the industrial camera, wherein the preprocessing includes bilateral filtering and median filtering; then threshold segmenting the processed image using the improved OTSU; finally, judging whether there are defects in the segmented image, if there are no defects, continue to collect images for defect detection; if there are defects, perform edge detection and mark the defects. The technical solution is to first detect the defects on the surface of the cloth, and then detect the boundary range of the defects through the edge detection algorithm, so as to outline the shape and size of the defects, which is helpful for subsequent more detailed analysis.
[0005] However, the fluff on textile fabrics after the singeing process has unique properties, various shapes and complex grayscale expressions. Even different parts of the same fluff have grayscale differences. This complexity causes the traditional edge detection algorithm to have reduced accuracy in detecting fluff, which is prone to missed detection or false detection, causing unqualified fabrics to be misjudged as qualified, ultimately affecting product quality. Summary of the invention
[0006] In order to solve the problem that the traditional edge detection algorithm is prone to missed detection or false detection when detecting fluff, resulting in unqualified fabrics being misjudged as qualified, which ultimately affects product quality, the present invention proposes a fluff detection method for a textile fabric singeing process, comprising:
[0007] The surface image of the textile fabric after singeing is divided into blocks, and the regional parameters of the blocks are determined according to the diversity of the gray values of the pixels in the blocks and the volatility of the gray values, and the regional parameters are used to reflect the gray characteristics of the blocks;
[0008] Determine the target pixel in the block according to the number of pixels of each gray value in the block, and determine the hair feature of the target pixel according to the difference in regional parameters and gray value between the target pixel in the block and other target pixels connected to it;
[0009] The degree of fuzziness of the target pixel is calculated based on the fuzziness feature of the target pixel and the regional parameters of the block: , For the The degree of fuzziness of the target pixel, All blocks in the The number of other target pixels connected to the target pixel. and Respectively with The target pixel connected to the The regional parameters of the blocks where the other target pixels are located, The fluff feature value of target pixel points, For the The fluff feature value of target pixel points, is the natural exponential function, To take the absolute value sign;
[0010] The fluff pixels are determined according to the fluff degree, and edge detection is performed on the fluff pixels to determine the fluff area, thereby achieving fluff detection.
[0011] This technical solution is an effective image processing strategy for grayscale image segmentation. The surface image of textile fabrics may have complex textures and lighting changes. Blocking can decompose large problems into small problems, which is easier to analyze. Furthermore, considering the diversity and volatility of grayscale values to determine regional parameters, using regional parameters to reflect the grayscale characteristics of the blocks can capture rich information about the grayscale of pixels in each small block. For example, different distributions of fluff may cause different local change patterns of grayscale values. This method helps to extract these features. For blocks with high diversity and volatility of grayscale values, it may mean that the block has a complex structure, such as the aggregation of fluff, while relatively uniform and small-volatility blocks may be flat parts of the fabric. In this way, different regional types can be preliminarily distinguished based on regional parameters, laying the foundation for subsequent accurate detection of fluff. Furthermore, by determining the target pixel points based on the number of pixels, it is possible to focus on pixels that are representative in number, which are more likely to be key pixels related to fluff. Considering the regional parameters and grayscale differences between the target pixel and the connected target pixel to determine the fluff feature is a comprehensive analysis method, because the fluff does not exist in isolation in the image, and it has a specific relationship with the surrounding pixels in grayscale and regional features. This relationship can be used as an important basis for judging the fluff. When determining the fluff feature, it is assumed that the regional parameters of the target pixel and the connected target pixel are different and the grayscale difference is also large, which may indicate that the target pixel is located at the edge of the fluff or at the junction of the fluff and other parts of the fabric. On the contrary, if the difference is small, it may not be a fluff pixel. This comprehensive judgment method can more accurately describe the possibility that each target pixel is fluff. Furthermore, the fluff feature of the target pixel and the regional parameters of the block are organically combined, and the relationship between the target pixel and the surrounding pixels at different levels is considered. This quantitative fluff degree calculation method can more accurately describe the degree to which each target pixel belongs to fluff, rather than a simple binary judgment. A suitable fluff degree threshold is set, and the target pixel above the threshold is judged as a fluff pixel. This can effectively screen out the real fluff pixels, reduce misjudgment, and perform edge detection on these fluff pixels, for example, some classic edge detection algorithms can be used. Since the fluff pixels have been determined, edge detection can more accurately find the boundary between the fluff and non-fluff areas, thereby accurately determining the fluff area. This method can overcome the problems of missed detection and false detection of traditional edge detection algorithms when detecting fluff, improve the accuracy of detection, and ensure the reliability of fabric quality assessment.
[0012] Preferably, the fluff feature value of the target pixel point in the block is determined according to the following formula:
[0013]
[0014] In the formula , For the The first The fluff feature value of target pixel points, It is The same as the The number of other target pixels connected to the target pixel. It is The first The target pixel and the connected The difference in grayscale values of other target pixels, For the The regional parameters of the blocks, For the The first The regional parameters of adjacent blocks, For the The number of adjacent blocks of a block, is the normalization function.
[0015] This technical solution introduces the regional parameters of adjacent blocks and the information of connected target pixels. The formula can reflect the relationship between the target pixels in the local area (within the block) and the surrounding area (adjacent blocks). The presence of fluff not only affects the pixel features within the block itself, but also generates associations with the surrounding blocks. This relationship is crucial for fluff detection.
[0016] Preferably, the method for determining the fluff pixel points according to the fluff degree is:
[0017] An upper limit and a lower limit of the fuzz degree are preset, and the fuzz degrees of all target pixel points in the grayscale image are counted; among all target pixel points, the grayscale value of the target pixel point whose fuzz degree is closest to the upper limit of the fuzz degree is used as the upper limit of the grayscale value, and the grayscale value of the target pixel point whose fuzz degree is closest to the lower limit of the fuzz degree is used as the lower limit of the grayscale value; a grayscale value range is determined based on the upper and lower limits of the grayscale value, and all pixel points with grayscale values within the grayscale value range are used as fuzz pixel points.
[0018] Preferably, the method for determining the villi area is:
[0019] The edge detection algorithm is used to detect the edge of the fluff pixels, and the detected edge pixels are used as the edge pixels of the fluff area. The edge pixels are filled with the area filling method to obtain the fluff area.
[0020] Preferably, the method for determining the regional parameters of the blocks is: taking the product of the diversity of the grayscale values of the pixels in the blocks and the volatility of the grayscale values as the regional parameters of the blocks.
[0021] This technical solution combines the grayscale value diversity and grayscale value volatility of pixels to determine regional parameters, which can comprehensively describe the grayscale characteristics of the blocks. This comprehensive consideration avoids the one-sidedness that may be caused by using only a single feature to describe the blocks, and more comprehensively reflects the complex situation of pixels within the blocks. In the fuzz detection scenario, the presence of fuzz often leads to rich changes in the grayscale values of local images. The regional parameters determined in this way can better capture these changes and provide more representative feature information for the subsequent accurate identification of fuzz areas.
[0022] Preferably, the method for determining the target pixel in a block according to the number of pixels of each gray value in the block is:
[0023] The grayscale values of all pixels in the block are counted to obtain the number of pixels of each grayscale value, and a preset pixel number threshold is set; if the number of pixels of a certain grayscale value is less than the number threshold, the pixel corresponding to this grayscale value is used as the target pixel.
[0024] This technical solution and method of determining target pixels can highlight those pixels corresponding to relatively small grayscale values in the block. In fluff detection, the fluff may present a different grayscale value from the main body of the cloth in the image due to its special material, shape, lighting conditions and other factors, and the number is usually relatively small. In this way, you can focus on pixels that may be fluff, providing key focus for subsequent more accurate detection of fluff. Setting a quantity threshold can exclude pixels corresponding to a large number of common grayscale values. These pixels often belong to the main part of the cloth and are unlikely to be fluff. This can reduce the interference of a large number of non-fluff pixels on the detection process and improve the efficiency and accuracy of detection.
[0025] Preferably, the neighboring blocks of a block are eight adjacent blocks around the block.
[0026] Preferably, the method for acquiring other target pixel points connected to the target pixel point is:
[0027] First, each target pixel is taken as the initial target pixel to be connected, and the eight-neighborhood area around the target pixel to be connected is set as the search range, and other target pixels are searched within the search range. Each other target pixel found is taken as a new target pixel to be connected. Then, the process is repeated until no other target pixels exist in the eight-neighborhood area of all new target pixels to be connected. Then, the search is stopped and all the target pixels to be connected found at this time are taken as all other target pixels connected to the target pixel.
[0028] Preferably, the diversity of the grayscale values of the pixels in the block is determined by the ratio of the number of grayscale value types to the number of pixels, and the volatility of the grayscale values of the pixels in the block is determined by the variance of the grayscale values.
[0029] This technical solution reflects the richness of grayscale values in a block through the ratio of the number of grayscale value types to the number of pixels, and measures the volatility of grayscale values through variance, which is of great significance for detecting villi, because the presence of villi will increase the diversity and volatility of grayscale values. It provides specific quantifiable indicators for analyzing images, so that the grayscale features between different blocks can be compared and evaluated. In villi detection, blocks that may contain villi can be identified more specifically based on these indicators.
[0030] The present invention has the following effects: the present invention divides the grayscale image into blocks, comprehensively considers the diversity and volatility of grayscale values to determine regional parameters, determines the fluff feature quantity according to the number of pixel points and the difference with the connected points, accurately describes the possibility that the target pixel point is fluff, calculates the fluff degree by combining the fluff feature quantity and the regional parameters, accurately screens the fluff pixels, reduces misjudgment, uses edge detection and regional filling to determine the fluff area, overcomes the problems of missed detection and false detection of traditional algorithms, improves the efficiency and accuracy of fluff detection, and ensures the reliability of fabric quality evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0032] Figure 1 It is a schematic flow chart of the method of the present invention. DETAILED DESCRIPTION
[0033] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0034] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0035] Reference Figure 1 The method for detecting fluff in a textile fabric singeing process provided by the present invention comprises steps S1 to S5:
[0036] S1: Collect the surface image of the textile fabric after singeing, and pre-process it to obtain the corresponding grayscale image.
[0037] During the fluff singeing process, first, a high-precision, high-resolution professional HD camera is used to capture the surface image of the textile fabric. Subsequently, the collected surface image of the textile fabric is preprocessed, including converting the surface image into a grayscale image through grayscale processing, and then enhancing the contrast and filtering and denoising processing to remove the noise generated by environmental factors or the equipment itself during the image acquisition process, avoid these noises from interfering with fluff detection, and improve the quality and reliability of the image.
[0038] S2: Divide the grayscale image into blocks, and determine the regional parameters of the blocks according to the diversity of the grayscale values of the pixels in the blocks and the volatility of the grayscale values.
[0039] First, based on the length and width of the grayscale image, it is divided into multiple blocks of equal size. For each block, the diversity of the grayscale values of the pixels in the block and the volatility of the grayscale values of the pixels in the block are evaluated.
[0040] Among them, the diversity of grayscale values of pixels in each block reflects the richness of different grayscale values in the block. Specifically, the ratio of the number of grayscale value types in the block to the number of pixels in the block is taken as the diversity of grayscale values of pixels in the block.
[0041] When there is only one grayscale value in a block, its diversity is the lowest. This may correspond to the flat and uniformly colored part of the fabric, where there is basically no complex structure such as fluff. When there are multiple grayscale values in the block, the diversity increases. For areas with fluff, the types of grayscale values increase due to factors such as the height, density, and color difference of the fluff with the main body of the fabric. For example, fluff may cast a shadow under light, resulting in different grayscale levels in the same local area.
[0042] The volatility of the grayscale value of each pixel in each block describes the degree of change of the grayscale value in the block, and specifically, the variance of the grayscale values of all pixels in the block is taken as the volatility of the grayscale value of the pixel in the block.
[0043] When the fluctuation of the grayscale value of a pixel in a block is smaller, it means that the grayscale value of the pixel in the block is relatively stable, which means that the flat part of the cloth has no obvious texture or structural changes. For the fluff area, the shape of the fluff is irregular, which will cause the grayscale value to fluctuate greatly. For example, the bending and crossing of the fluff will cause uneven local illumination, which will cause frequent changes in the grayscale value.
[0044] Next, the regional parameters of the blocks are determined by comprehensively considering the diversity of the grayscale values of the pixels in the blocks and the volatility of the grayscale values of the pixels. Specifically, the product of the diversity and volatility of the grayscale values of the pixels in each block is taken as the regional parameter of the block.
[0045] When the diversity and volatility of the grayscale values of pixels in a block are both low, the regional parameter of the block is also low, indicating that the block is likely to be a simple, fuzz-free area of the fabric. If one of the diversity and volatility of the grayscale values of pixels in the block is high, the regional parameter of the block will increase accordingly. For example, when the diversity is high but the volatility is low, it may mean that there are many objects with different grayscale values in the block, but they are relatively stable, which does not conform to the characteristics of fuzz; when the volatility is high but the diversity is low, it may be due to the changes of single grayscale objects under the influence of light or other factors. When both the diversity and volatility are high, the regional parameter will reach a higher value, which means that the block is more likely to have fuzz. Through such regional parameter calculation, it is possible to preliminarily distinguish between blocks containing fuzz and blocks without fuzz, which provides an important preliminary screening condition for subsequent fuzz detection and improves the accuracy and efficiency of fuzz detection.
[0046] S3: Select a target pixel point of the block, and jointly determine the fluff feature value of the target pixel point according to the difference in regional parameters and grayscale values between the target pixel point in the block and other target pixel points connected to it.
[0047] After the textile fabric is singed, if there are both fluff and singed areas in a block, the pixels in this block will show a variety of different grayscale values. This is because the fluff and the singed areas will produce different grayscale expressions from the main body of the fabric under the influence of factors such as light, and the grayscale value will gradually change along the direction of the fluff, showing a certain regularity.
[0048] In this case, the target pixel in the block may be a fluff pixel. At the same time, since the fluff is usually connected on the fabric, when determining that the pixels corresponding to a small number of gray values are fluff pixels, these small number of fluff pixels are often distributed continuously in space. In this way, by analyzing the position continuity of a small number of pixels, it is possible to further determine whether it is fluff, providing a basis for fluff detection.
[0049] Among them, the method of selecting the target pixel point of each block is:
[0050] Count the grayscale values of all pixels in the block to get the number of pixels of each grayscale value. The preset pixel number threshold is 60% of the number of all pixels in the block. If the number of pixels of a certain grayscale value is less than the number threshold, the pixel corresponding to the grayscale value is used as the target pixel. For example, there are 100 pixels in a block, and there are 50 pixels with a grayscale value of 180, which accounts for 50%, less than 60%. Then the 50 pixels corresponding to the grayscale value of 180 are the target pixels. The number threshold is an empirical value and can be set by yourself.
[0051] If the regional parameters of a target pixel point in a block are significantly different from those of an adjacent block, and the target pixel point is connected to a large number of other target pixels, the smaller the grayscale difference between the target pixel point and the other target pixels connected to it (the more similar the grayscale values are), the more the target pixel point conforms to the characteristics of villi. Therefore, the villi feature value of the target pixel point in the block is determined according to the following formula:
[0052]
[0053] In the formula , For the The first The fluff feature value of target pixel points, It is The same as the The number of other target pixels connected to the target pixel. It is The first The target pixel and the connected The difference in grayscale values of other target pixels, For the The regional parameters of the blocks, For the The first The area parameters of adjacent blocks are used, and the eight adjacent blocks of each block are regarded as all the adjacent blocks of the block. For the The number of adjacent blocks of a block, is the normalization function, is a natural exponential function.
[0054] In this formula, Reflects the The block where the target pixel is located ( The regional parameters of the first block The difference in regional parameters of adjacent blocks is considered. If the difference between the regional parameters of a block and its adjacent blocks is greater, it means that the block is more likely to contain villi. This consideration of adjacent blocks helps to improve the accuracy of detection, especially for cases where the villi boundaries or distribution are more complex.
[0055] In this formula, if A larger value of indicates that the target pixel is connected to multiple other target pixels. In actual fluff images, fluff usually exists in clusters or pieces. A large number of other connected target pixels are more likely to be part of the fluff. When a target pixel is detected to be connected to other target pixels with similar features, the possibility of the target pixel being a fluff pixel increases.
[0056] In this formula, since the grayscale value of the hair usually fluctuates within a certain range, and the grayscale values of the connected hairs are similar and have a certain regularity, if the grayscale difference between a target pixel and other target pixels connected to it is smaller (the grayscale values are similar), that is, The smaller it is, the more likely the target pixel is to be fluff. On the contrary, if the grayscale difference is too large, it is less likely that it is fluff. By summing the grayscale differences of the target pixel and all the target pixels connected to it, we can comprehensively evaluate the grayscale changes of the target pixel and other target pixels connected to it, so as to determine whether the target pixel meets the characteristics of fluff.
[0057] In this formula, through Comprehensively evaluate the grayscale changes of the target pixel and other target pixels connected to it to determine whether the target pixel meets the characteristics of villi. The more target pixels are connected to it, the more ( The larger the The smaller the grayscale difference between a target pixel and other connected target pixels ( The smaller the gray value, the more similar the gray value is. The more likely the target pixel is to be fluff, the The larger the fluff feature value of the target pixel point, the greater the fluff feature value of the target pixel point.
[0058] The method for obtaining all other target pixels connected to each target pixel is as follows:
[0059] First, each target pixel is taken as the initial target pixel to be connected, and the eight-neighborhood area around the target pixel to be connected is set as the search range, and other target pixels are searched within the search range. Each other target pixel found is taken as a new target pixel to be connected. Then, the process is repeated until no other target pixels exist in the eight-neighborhood area of all new target pixels to be connected. Then, the search is stopped and all the target pixels to be connected found at this time are taken as all other target pixels connected to the target pixel.
[0060] In summary, this step can reflect the relationship between the target pixel in the local area (within the block) and the surrounding area (adjacent blocks) by introducing the regional parameters of adjacent blocks and the information of connected target pixels. Because the presence of villi will not only affect the grayscale value characteristics of the pixels in the block itself, but also be associated with the surrounding blocks. For the boundary of villi or the situation where the distribution of villi is more complex, considering the regional parameters of adjacent blocks can better capture the existence of villi. At the same time, by analyzing the relationship between the target pixel and the connected pixel, clustered or patchy villi areas can be accurately identified. For example, at the boundary of villi, the presence of villi will cause obvious differences in the characteristics of the block and the adjacent blocks. The formula The difference can be effectively detected in part. For the patchy villi area, the Some pixels can be determined to be fluff based on the number and grayscale difference between the target pixel and the connected pixels.
[0061] S4: Calculate the degree of fuzz at the target pixel based on the fuzz feature value of the target pixel and the regional parameters of the divided blocks.
[0062] In the blocks of the textile fabric image, the pixels corresponding to the fluff part have quantity characteristics and continuity characteristics, as well as characteristics of approximate fluff feature quantities.
[0063] Among them, the characteristic of the number of pixels is reflected in that the number of pixels corresponding to the fluff part is relatively small compared to the total number of pixels in the entire block. This is because the fluff is usually only a small part of the structure on the surface of the fabric. Compared with the main body of the fabric, the area it occupies is smaller, so it is reflected as a smaller number at the pixel level.
[0064] Among them, the continuity feature is reflected in the following: a piece of fluff is continuous in physical form, which is reflected in the image that the pixels that make up the fluff are also continuously distributed. The real fluff is a complete fiber, and the pixels of the fluff part in the image will be adjacent in space, showing continuity.
[0065] Among them, the characteristics of the approximate fluff feature quantities are reflected in that the fluff feature quantities of the pixel points of the same fluff will be relatively close, because the same fluff has similarities in material, shape, light reflection, etc., so the fluff feature quantities of these pixel points will be relatively close.
[0066] Therefore, all other connected pixels of each target pixel are obtained, and analysis is performed based on these connected pixels. If these connected pixels are all target pixels (pixels with a small number that meet the quantity characteristics of villi pixels), and their villi feature quantities are similar (meeting the continuity characteristics and the characteristics of the approximate villi feature quantities), then in terms of probability, the locations of these target pixels are most likely the locations of the villi pixels. This judgment method utilizes the characteristics of villi pixels in terms of pixel quantity, spatial distribution, and feature quantities, and provides an effective basis for accurately detecting the villi position.
[0067] Based on the above, the degree of fluff at each target pixel is calculated using the following formula:
[0068]
[0069] middle, For the The degree of fuzziness of the target pixel, All blocks in the The number of other target pixels connected to the target pixel. For the The target pixel connected to the The regional parameters of the blocks where the other target pixels are located, For the The first The fluff feature value of target pixel points, For the The target pixel connected to the The fluff feature values of other target pixels, is the natural exponential function, To take the absolute value sign.
[0070] This formula calculates the degree of fuzz by integrating multiple factors and is the core calculation step of the entire detection method. It organically combines the fuzz feature value of the target pixel and the regional parameters of the block, and takes into account the relationship between the target pixel and the surrounding pixels at different levels. This quantitative fuzz degree calculation method can more accurately describe the degree to which each target pixel belongs to fuzz, rather than a simple binary judgment (either it is fuzz or not).
[0071] In this formula, reflects the spatial connectivity of the target pixel, that is, the number of other target pixels connected to the target pixel. If The larger the value, the more likely it is that the target pixel is in a more closely connected area, and the more likely it is a dense fuzz pixel, which reflects the interaction between the regional parameters of the block and the fuzz feature of the connected target pixel. The regional parameters can reflect certain characteristics of the block, such as texture, grayscale distribution, etc., and combined with the fuzz feature, they can better describe the properties of the connected target pixels.
[0072] By considering the difference in the fluff feature quantity between the target pixel and the connected target pixels, this difference can reflect the similarity between the target pixel and the surrounding pixels, thereby further determining whether the target pixel is a fluff pixel. From the formula, The bigger, the The more other target pixels are connected to the first target pixel, the more likely it is that the The target pixel is located in the area with denser villi, which has a positive impact on the degree of villi. The formula reflects the interaction between the regional parameters of the block where the target pixel is located and the fuzz feature of the target pixel. The combination of the two can better describe the properties of the connected target pixels. and When the values of are large, the value of the numerator will increase, thereby increasing the degree of fuzz. Indicates the difference in the fluff feature quantity between the target pixel and other connected target pixels The increase of The value of will increase rapidly. A larger difference means that the target pixel is less similar to other connected target pixels in terms of the properties of the villi. Therefore, by increasing To reduce the degree of fuzz On the contrary, if the difference between the target pixel and other connected target pixels means that the target pixel and other connected target pixels are more similar in villi properties, then by reducing To increase the degree of fluff .
[0073] Through such calculation, a degree of fuzziness that is more in line with the actual situation can be assigned to each target pixel.
[0074] S5: Determine the fluff pixel points according to the fluff degree, perform edge detection on the fluff pixel points to determine the fluff area, and implement fluff detection.
[0075] First, the upper limit of the fuzziness is preset to 0.8 and the lower limit of the fuzziness is preset to 0.6. The fuzziness of all target pixels in the grayscale image is counted. Among all target pixels, the grayscale value of the target pixel whose fuzziness is closest to the upper limit of the fuzziness is taken as the upper limit of the grayscale value, and the grayscale value of the target pixel whose fuzziness is closest to the lower limit of the fuzziness is taken as the lower limit of the grayscale value. A grayscale value range is determined based on the upper and lower limits of the grayscale value, and all pixels whose grayscale values are within the grayscale value range are taken as fuzzy pixels. Among them, the upper and lower limits of the fuzziness are both empirical values and can be set by yourself. This step uses the approximate range of the grayscale values of the fuzzy pixels to circle out a set of fuzzy pixels that is more likely to be included from all the pixels in the image.
[0076] Next, edge detection is performed on the screened fuzzy pixels using the Canny edge detection algorithm. This is because if edge detection is performed on the entire image, it may be interfered by a large number of irrelevant edges (such as the texture of the fabric itself, pattern edges, etc.). By searching for edges in this smaller set of pixels that are more likely to be in the fuzzy area, we can focus more on the edges that may appear in the fuzzy area, thereby improving detection efficiency and accuracy.
[0077] Finally, determine the edge and range of the fluff area:
[0078] The edge pixels obtained by edge detection can help determine the edge of the fuzzy area. Since the fuzzy area usually has a certain shape and boundary, these edge pixels are like the outline of the shape of the fuzzy area. Based on these edges, the scope of the entire fuzzy area can be further inferred. For example, starting from the edge pixels, through some area filling or boundary tracing methods, the pixels inside the edge can also be determined as part of the fuzzy area, thereby obtaining a complete fuzzy area.
[0079] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0080] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
Claims
1. A method for detecting fluff in a textile fabric singeing process, characterized in that: include: The surface image of the textile fabric after singeing is divided into blocks, and the regional parameters of the blocks are determined according to the diversity of the gray values of the pixels in the blocks and the volatility of the gray values, and the regional parameters are used to reflect the gray characteristics of the blocks; The target pixel in the block is determined according to the number of pixels of each gray value in the block, and the hair feature of the target pixel is determined according to the difference in regional parameters and gray value between the target pixel in the block and other target pixels connected to it, satisfying the formula: In the formula , For the The first The fluff feature value of target pixel points, It is The same as the The number of other target pixels connected to the target pixel. It is The first The target pixel and the connected The difference in grayscale values of other target pixels, For the The regional parameters of the blocks, For the The first The regional parameters of adjacent blocks, For the The number of adjacent blocks of a block, is the normalization function; The degree of fuzziness of the target pixel is calculated based on the fuzziness feature of the target pixel and the regional parameters of the block: , For the The degree of fuzziness of the target pixel, All blocks in the The number of other target pixels connected to the target pixel. and Respectively with The target pixel connected to the The regional parameters of the blocks where the other target pixels are located, The fluff feature values of other target pixels, For the The fluff feature value of target pixel points, is the natural exponential function, To take the absolute value sign; The fluff pixels are determined according to the fluff degree, and edge detection is performed on all the fluff pixels to determine the fluff area, thereby achieving fluff detection.
2. The method for detecting fluff in a singeing process of textile fabrics according to claim 1, characterized in that: The method for determining the fluff pixel points according to the fluff degree is: An upper limit and a lower limit of the fuzz degree are preset, and the fuzz degrees of all target pixel points in the grayscale image are counted; among all target pixel points, the grayscale value of the target pixel point whose fuzz degree is closest to the upper limit of the fuzz degree is used as the upper limit of the grayscale value, and the grayscale value of the target pixel point whose fuzz degree is closest to the lower limit of the fuzz degree is used as the lower limit of the grayscale value; a grayscale value range is determined based on the upper and lower limits of the grayscale value, and all pixel points whose grayscale values are within the grayscale value range are used as fuzz pixel points.
3. The method for detecting fluff in a singeing process of textile fabrics according to claim 1, characterized in that: The method for determining the villi area is: The edge detection algorithm is used to detect the edge of the fluff pixels, and the detected edge pixels are used as the edge pixels of the fluff area. The edge pixels are filled with the area filling method to obtain the fluff area.
4. The method for detecting fluff in a textile fabric singeing process according to claim 1, characterized in that: The method for determining the regional parameters of the blocks is: the product of the diversity of the grayscale values of the pixels in the blocks and the volatility of the grayscale values is used as the regional parameters of the blocks.
5. The method for detecting fluff in a textile fabric singeing process according to claim 1, characterized in that: The method for determining the target pixel in a block according to the number of pixels of each gray value in the block is: The grayscale values of all pixels in the block are counted to obtain the number of pixels of each grayscale value, and a preset pixel number threshold is set; if the number of pixels of a certain grayscale value is less than the number threshold, the pixel corresponding to this grayscale value is used as the target pixel.
6. The method for detecting fluff in a textile fabric singeing process according to claim 1, characterized in that: The neighboring blocks of a block are the eight adjacent blocks surrounding the block.
7. The method for detecting fluff in a textile fabric singeing process according to claim 1, characterized in that: The method for obtaining other target pixels connected to the target pixel is as follows: First, each target pixel is taken as the initial target pixel to be connected, and the eight-neighborhood area around the target pixel to be connected is set as the search range, and other target pixels are searched within the search range. Each other target pixel found is taken as a new target pixel to be connected. Then, the process is repeated until no other target pixels exist in the eight-neighborhood area of all new target pixels to be connected. Then, the search is stopped and all the target pixels to be connected found at this time are taken as all other target pixels connected to the target pixel.
8. The method for detecting fluff in a textile fabric singeing process according to claim 4, characterized in that: The diversity of the grayscale values of the pixels in the block is determined by the ratio of the number of grayscale value types to the number of pixels, and the volatility of the grayscale values of the pixels in the block is determined by the variance of the grayscale values.
Citation Information
Patent Citations
A fabric detection method based on bilateral filtering combined with improved OTSU
CN112070765B
A fluff fabric surface quality measuring device and method
CN109727230A
Self-adaptive textile grey cloth singeing control method
CN115272317A