A method for controlling temperature and humidity of air conditioner in spinning workshop

By matching and classifying the edges of the yarn image and combining with index enhancement technology, the problem of indistinguishable background texture and hairy features in the yarn image is solved, and the accuracy of temperature and humidity regulation and production efficiency of spinning workshops is improved.

CN118882188BActive Publication Date: 2024-12-03SHAANXI BOYU TEXTILE CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411378967.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2024-12-03
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

In the temperature and humidity control of spinning workshops, the background texture and hairy characteristics in the yarn image are similar, which makes it difficult to distinguish between background texture and hairy characteristics after the unified standard enhancement, which affects the accuracy of temperature and humidity control in the spinning workshop.

Method used

By matching and classifying edges in the yarn image, the hair edge probability is determined using the matching distance and grayscale value of the edges, exponentially enhance the distance and grayscale value of the pixel points, highlighting hair characteristics, and eliminating background and noise interference.

Benefits of technology

It improves the accuracy and contrast of hair recognition, provides scientific basis for regulating the temperature and humidity of air conditioners, and improves the quality control level and production efficiency of spinning production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118882188B_ABST
    Figure CN118882188B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and more specifically, to a method for controlling the temperature and humidity of an air conditioner in a spinning workshop, the method comprising: dividing all edges in the yarn image at the current moment into two categories according to the distance between each edge in the yarn image at the current moment and its matching edge in the yarn image at the previous moment, determining the hairiness edge probability of each edge in the first category according to the distance between each edge in the first category and its matching edge; determining the reference edge of each pixel point, determining the hairiness possibility of the pixel point according to the distance from the pixel point to the reference edge, the gray value of the pixel point, and the hairiness edge probability of the reference edge; exponentially enhancing the yarn image at the current moment according to the hairiness possibility, determining the hairiness H value according to the enhanced image, thereby controlling the temperature and humidity of the air conditioner. The present invention enhances the hairiness details in the yarn image, obtains a more accurate hairiness H value, and improves the accuracy of the temperature and humidity control of the air conditioner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology. More specifically, the present invention relates to a method for controlling temperature and humidity of an air conditioner in a spinning workshop. Background Art

[0002] In the spinning workshop, the control of temperature and humidity is crucial to the quality and production efficiency of textiles. During the spinning process, the hygroscopicity of the fiber makes the relative humidity of the environment directly affect the physical properties of the fiber, such as strength and elasticity. Therefore, maintaining a suitable temperature and humidity environment can effectively prevent the generation of static electricity and breakage of the fiber and reduce the scrap rate. When the temperature and humidity are abnormal, it may cause an increase in yarn hairiness, so the temperature and humidity of the spinning workshop can be adjusted according to the number and length of hairiness on the yarn.

[0003] Since the hairiness in the yarn image is not clear, in order to accurately evaluate the number and length of hairiness on the yarn, it is necessary to enhance the hairiness in the yarn image. The Chinese patent document with the announcement number CN117670843B discloses a color yarn broken yarn detection method, device, equipment and storage medium, the method includes: setting the monitoring area and various values, obtaining color image data; converting the color image data into grayscale image data; performing grayscale value scaling and contrast enhancement on the grayscale image data, and outputting enhanced image data; performing threshold segmentation, extracting pixels with grayscale values ​​between 0-10, and outputting the area to be processed; separating the non-connected areas, performing open operations, and outputting the separated areas; extracting sub-pixel precision line skeletons; judging the distance between the sub-pixel precision line skeletons, if it exceeds the set spacing value, it is considered as broken yarn; when the broken yarn image is detected and the set number of sheets is processed continuously, an alarm is issued.

[0004] In the above scheme, the grayscale image data is enhanced by grayscale value scaling and contrast enhancement. However, this method adopts a unified standard to enhance each pixel in the grayscale image. Since the texture of the background in the yarn image is similar to the characteristics of the hairiness, adopting a unified standard to enhance each pixel may cause the texture of the background in the yarn image to be similar to the characteristics after the hairiness enhancement, which affects the recognition of the hairiness on the yarn and further affects the accuracy of the temperature and humidity control in the spinning workshop. Summary of the invention

[0005] In order to solve the technical problem that the use of a unified standard to enhance each pixel may result in the texture of the background in the yarn image being similar to the features after the hairiness enhancement, affecting the recognition of the hairiness on the yarn, and further affecting the accuracy of the temperature and humidity control in the spinning workshop, the present invention proposes a method for controlling the temperature and humidity of the spinning workshop air conditioner, which comprises the following steps:

[0006] Take any edge in the yarn image at the current moment as the target edge, match the target edge with each edge in the yarn image at the previous moment, and determine the matching edge of the target edge; divide all edges in the yarn image at the current moment into two categories according to the distance between each edge in the yarn image at the current moment and its matching edge, and take the category with the larger distance mean as the first category, and take the category with the smaller distance mean as the second category; determine the hairy edge probability of each edge in the first category according to the distance between each edge in the first category and its matching edge; take 0 as the hairy edge probability of each edge in the second category; For each pixel point in the yarn image at the current moment, a reference edge of the pixel point is determined according to the distance from the pixel point to each edge and the hairiness edge probability of each edge; the hairiness possibility of the pixel point is determined, and the hairiness possibility is positively correlated with the hairiness edge probability of the reference edge of the pixel point and the grayscale value of the pixel point, and negatively correlated with the distance from the pixel point to the reference edge; the yarn image at the current moment is exponentially enhanced according to the hairiness possibility of each pixel point to obtain an enhanced image, and the index during exponential enhancement is negatively correlated with the hairiness possibility of the pixel point; and the hairiness H value is determined according to the enhanced image, so as to control the temperature and humidity of the air conditioner according to the hairiness H value.

[0007] The present invention matches the edges in the yarn images at different times, and classifies the edges according to the matching results, so as to eliminate the interference of the edges of the texture on the background in the yarn image and the edges of the yarn on the hairiness edges. The present invention determines the hairiness edge probability of each edge in the first category according to the distance between each edge in the first category and its matching edge, so as to further eliminate the interference of noise on the hairiness edge; the present invention determines the hairiness possibility of each pixel point according to the hairiness edge probability of the reference edge of each pixel point in the yarn image, and exponentially enhances the yarn image according to the hairiness possibility, so as to achieve key enhancement of the hairiness pixel points, improve the contrast between the hairiness and the background and the texture on the background, effectively highlight the hairiness characteristics, make the hairiness H value evaluation more accurate, provide a scientific basis for the regulation of air conditioning temperature and humidity, help to improve the quality control level of spinning production, reduce the defective product rate, and improve the overall production efficiency.

[0008] Preferably, the target edge is matched with each edge in the yarn image at the previous moment to determine the matching edge of the target edge, including: performing DTW matching on the target edge and each edge in the yarn image at the previous moment to obtain matching pixel points of each pixel point in the target edge on each edge in the yarn image at the previous moment; determining the matching rate between the target edge and each edge in the yarn image at the previous moment according to the length difference between the target edge and each edge in the yarn image at the previous moment, the distance between each pixel point in the target edge and its matching pixel point on each edge in the yarn image at the previous moment, and the grayscale difference; determining the matching edge of the target edge according to the matching rate.

[0009] Preferably, the matching ratio satisfies the expression: ;in, is the distance between the target edge and the yarn image at the previous moment. Matching ratio between strip edges; is the length of the target edge; is the yarn image at the previous moment. Length of the strip edge; The first Pixels Compared with the yarn image at the previous moment Matching pixels on the edge of the strip The distance between is the serial number of the pixel point on the target edge; Pixel Gray value of To match pixels Gray value of represents the variance function; is the absolute value symbol; is a natural exponential function.

[0010] Preferably, determining the matching edge of the target edge according to the matching rate includes: when the maximum matching rate between the target edge and the edges in the yarn image at the previous moment is greater than a preset matching threshold, taking the edge corresponding to the maximum matching rate in the yarn image at the previous moment as the matching edge of the target edge.

[0011] Preferably, the hairiness edge probability of each edge in the first category satisfies the expression: ;in, For the first category The probability of hairiness edge at the edge of the strip; For the first category The edge of a strip and its matching edge distance; is the mode of the distances between all edges in the first category and their matching edges; the current moment is used express, for Instead of The distance of the matching edge in the yarn image at the moment; is the absolute value symbol; is a natural exponential function; the method for obtaining the distance between each edge and its matching edge in the first category is: taking the average of the distances between each pixel point on each edge and the corresponding matching pixel point on its matching edge as the distance between each edge and its matching edge.

[0012] The present invention takes into account that the texture position on the background in the yarn image at different times remains unchanged, while the position of the hairiness on the yarn changes in the yarn image at different times, and the amount of change is basically the same. Therefore, the present invention determines the probability of the hairiness edge based on the difference between the distance between each edge in the first category and its matching edge and the distance mode. The result is more accurate and can eliminate the interference of noise on the hairiness edge to a certain extent.

[0013] Preferably, the reference edge of the pixel point is determined based on the distance from the pixel point to each edge and the hairy edge probability of each edge, including: for each edge in the yarn image at the current moment, calculating the distance between the pixel point and each edge pixel on the edge, and taking the minimum distance as the distance from the pixel point to the edge; taking the edge corresponding to the minimum value of the distance from the pixel point to each edge as the edge closest to the pixel point; if there are multiple edges closest to the pixel point, taking the edge with the highest hairy edge probability as the reference edge of the pixel point, and if there is only one edge closest to the pixel point, taking that edge as the reference edge of the pixel point.

[0014] Preferably, the hairiness probability of a pixel satisfies the expression: ;in, is the number of the yarn image at the current moment The hairiness probability of each pixel; is the number of the yarn image at the current moment The hairiness edge probability of the reference edge of pixels; For the The distance from a pixel to the reference edge; is a hyperparameter; For the The gray value of each pixel; For the The maximum gray value of all pixels in the reference edge of pixels; is the natural exponential function; is the hyperbolic tangent function.

[0015] Preferably, the yarn image at the current moment is exponentially enhanced according to the hairiness possibility of each pixel point, including: the gray value of each pixel point after enhancement satisfies the expression: ;in, is the number of the yarn image at the current moment The gray value of each pixel after enhancement; is the number of the yarn image at the current moment The gray value of each pixel; is the number of the yarn image at the current moment The hairiness probability of each pixel; is a natural exponential function.

[0016] The present invention enhances the pixels according to the hairiness possibility of the pixels, and can achieve key enhancement for the pixels with a high hairiness possibility, thereby improving the contrast between the hairiness and the background as well as the texture on the background, and effectively highlighting the hairiness characteristics.

[0017] Preferably, all edges in the yarn image at the current moment are divided into two categories according to the distance between each edge in the yarn image at the current moment and its matching edge, including: counting the number of occurrences of different numerical values ​​of the distance between all edges in the yarn image at the current moment and their matching edges, constructing a distance histogram with distance as the horizontal axis and the number of occurrences as the vertical axis; performing Otsu threshold segmentation on the distance histogram, and dividing all edges corresponding to each distance in the yarn image at the current moment into two categories.

[0018] The present invention takes into account that the position of the texture on the background in the yarn image at different times remains unchanged, while the position of the hairiness on the yarn changes in the yarn image at different times. Therefore, Otsu threshold segmentation is used to divide the edges in the yarn image into two categories, one of which is more likely to be the hairiness edge, and the other is more likely to be the edge of the texture on the background and the yarn edge. Through classification, the interference of the edge of the texture on the background and the yarn edge on the hairiness edge in the yarn image is eliminated.

[0019] Preferably, the method for obtaining each edge in the yarn image at the current moment is: edge detection is performed on the yarn image at the current moment, and for each edge obtained by edge detection, if there are more than two edge pixels in the 8-neighborhood of the edge pixel on the edge, the edge is segmented and merged: the edge pixel point containing more than two edge pixels in the 8-neighborhood is used as the segmentation point, and the edge is segmented into multiple segments according to all the segmentation points on the edge; the gradient direction and unit length of the edge pixel point constitute the gradient vector of the edge pixel point, and the sum of the gradient vectors of all edge pixels in each segment is used as the gradient vector of each segment; for each segment obtained by segmentation according to a segmentation point, the angle between the gradient vectors of each segment is calculated, and in the order of the angle from small to large, two segments with an angle less than a preset merging angle are merged into the same segment according to the segmentation point, and each segment can be merged at most once according to the segmentation point; each segment finally obtained is regarded as a new edge.

[0020] During edge detection, the hairiness edge may be detected as the same edge as the yarn edge or the edge of the background texture. The present invention divides and merges the edges to make the hairiness edge independent, thus avoiding interference of the yarn edge or the edge of the background texture on the hairiness edge.

[0021] The present invention has the following beneficial effects:

[0022] The present invention eliminates the interference of the edge of the texture on the background, the edge of the yarn and the noise on the feather edge in the yarn image, and the feather edge probability of the acquired edge is more accurate. The feather possibility of each pixel point is determined according to the feather edge probability, and then the yarn image is exponentially enhanced, thereby realizing the key enhancement of the feather pixel points, improving the contrast between the feather and the background and the texture on the background, and being able to effectively highlight the feather characteristics, making the feather H value evaluation more accurate, providing a scientific basis for the regulation of air-conditioning temperature and humidity, and helping to improve the quality control level of spinning production, reduce the defective product rate, and improve the overall production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] 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:

[0024] Figure 1 This is a flowchart of the steps of a method for controlling temperature and humidity of an air conditioner in a spinning workshop according to an embodiment of the present invention;

[0025] Figure 2 is a yarn image in an embodiment of the present invention;

[0026] Figure 3 The edge diagram obtained by edge detection of yarn image;

[0027] Figure 4 is the gradient amplitude histogram of the yarn image;

[0028] Figure 5 Schematic diagram of edge segmentation and merging;

[0029] Figure 6 An enhanced image of a spinning image obtained by the method of the present invention;

[0030] Figure 7 This is an enhanced image of the spinning image obtained by using the existing exponential enhancement. DETAILED DESCRIPTION

[0031] 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.

[0032] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0033] See also Figure 1 , which shows a flowchart of a method for controlling temperature and humidity of an air conditioner in a spinning workshop provided by an embodiment of the present invention, the method comprising the following steps:

[0034] S001. Real-time collection of yarn images in the spinning process.

[0035] It should be noted that the spinning process includes drafting, twisting, and winding. Drafting is used to draw the coarse yarn into a desired fineness of whiskers, twisting is used to twist the whiskers into a fine yarn with a certain twist, and winding is used to wind the fine yarn into a certain package for storage, transportation, and further processing. After twisting, a certain amount of hairiness will be generated on the yarn, and the hairiness affects the yarn uniformity and strength, and will reduce the wear resistance of the yarn. More hairiness will cause uneven dyeing of the fabric, affecting the production efficiency and quality of the subsequent process. The temperature and humidity of the spinning workshop are an important factor affecting the hairiness. Therefore, the present invention collects the yarn image after twisting and before tube winding in the spinning process, identifies the hairiness in the yarn image, and subsequently adjusts the temperature and humidity of the spinning workshop according to the amount of hairiness.

[0036] Specifically, the yarn image after twisting and before tube winding in the spinning process is collected in real time. For the convenience of calculation, the yarn image collected in the present invention is a grayscale image. The collection interval of the yarn image in the present invention is 0.02 seconds, and the implementer can set the collection interval according to the actual implementation situation.

[0037] Since the yarn is continuously stretched, twisted, and wound during the spinning process, the yarn position changes in real time, which results in motion blur in the collected yarn image, making the hairiness on the yarn unclear, for example Figure 2 This is a yarn image at a certain moment, and some of the hairiness on the yarn is not clear. Therefore, the yarn image needs to be enhanced.

[0038] S002. Acquire each edge in the yarn image.

[0039] Specifically, for the yarn image at any time, the canny operator is used to perform edge detection on the yarn image to obtain all the edges in the yarn image. Figure 3 For Figure 2 The edge diagram of the yarn image shown is obtained by edge detection.

[0040] It should be noted that, since the hairiness on the yarn is not clear, in order to detect the edge of the hairiness, a lower threshold needs to be set during edge detection.

[0041] In one embodiment, when the canny operator is used to perform edge detection on the yarn image, the low threshold and the high threshold used are manually set, for example, the low threshold is 15 and the high threshold is 80. In other embodiments, the implementer can set it according to the actual implementation situation.

[0042] In another embodiment, when the canny operator is used to perform edge detection on the yarn image, the method for obtaining the low threshold and the high threshold is:

[0043] The gradient amplitude of each pixel in the yarn image is obtained by the Sobel operator. The gradient amplitude is the horizontal axis and the number of pixels corresponding to the gradient amplitude is the vertical axis to construct the gradient amplitude histogram of the yarn image. Figure 4 for Figure 2 The gradient amplitude histogram of the yarn image is shown. The gradient amplitude histogram is curve fitted to obtain the slope of each gradient amplitude on the fitting curve, and the gradient amplitude with the largest absolute value of the slope is used as the low threshold of the canny operator, and the gradient amplitude greater than the low threshold and with the largest absolute value of the difference between the slope and the slope of the previous gradient amplitude is used as the high threshold of the canny operator.

[0044] It should be noted that, since the hairiness is formed when the fibers are exposed on the surface of the yarn body during the spinning process, the edge of the hairiness is connected to the edge of the yarn in the yarn image. Therefore, when edge detection is performed on the yarn image, the edge of each hairiness and the edge of the yarn will be detected as the same edge. When the hairiness partially overlaps or connects with the edge of the texture in the background, the hairiness and the edge of the texture in the background will also be detected as the same edge. Therefore, in order to accurately identify the hairiness, the present invention segments the edge obtained by edge detection.

[0045] Specifically, for each edge detected, if there are only 1 or 2 edge pixels in the 8-neighborhood of all edge pixels on the edge, the edge is not segmented; if there are edge pixels on the edge and the 8-neighborhood contains more than 2 edge pixels, the edge needs to be segmented and merged, specifically:

[0046] The edge pixels that contain more than 2 edge pixels in the 8-neighborhood are used as segmentation points, and the edge is segmented into multiple segments based on all the segmentation points on the edge. For each segment obtained by segmentation based on a segmentation point, the segment contains the segmentation point, and only one edge pixel in the segment is located in the 8-neighborhood of the segmentation point. For example Figure 5 This is a schematic diagram of edge segmentation and merging. Figure 5 (1) in the figure shows the process of segmentation based on the segmentation points. Figure 5 The black dots in the figure indicate the split points.

[0047] The gradient direction and unit length of the edge pixel point constitute the gradient vector of the edge pixel point, and the sum of the gradient vectors of all edge pixel points in each segment is used as the gradient vector of each segment. For each segment obtained by segmentation according to a segmentation point, calculate the angle between the gradient vectors of each segment obtained by segmentation according to a segmentation point; in the order of the angle from small to large, merge the two segments with an angle less than the preset merging angle into the same segment according to the segmentation point, and require that each segment can only be merged once at most according to the segmentation point. Among them, the merging angle is set by the implementer according to the actual implementation situation, for example .For example Figure 5 (2) in Fig. 2 shows the process of merging according to the segmentation points. Each segment obtained in the end is regarded as a new edge.

[0048] It should be noted that the present invention judges each edge obtained by edge detection, and segments and merges the edges containing more than 2 edge pixels in the 8 neighborhoods of the edge pixels, so that only 1 or 2 edge pixels belong to the edge in the 8 neighborhoods of all edge pixels on each edge finally obtained. In the subsequent steps of this solution, the "edges" that appear refer to the edges obtained after processing in this step.

[0049] S003. Match the target edge in the yarn image at the current moment with each edge in the yarn image at the previous moment to determine the matching edge of the target edge.

[0050] It should be noted that when performing edge detection on the yarn image, a lower threshold is set, resulting in the detected edge not only including the edge of the yarn and the feather, but also including the edge generated by the texture on the background and the noise. In the yarn images at adjacent moments, the positions of the noise and the edge of the same feather change, while the position of the edge of the same texture on the background remains unchanged, so the present invention matches the edges in the yarn images at adjacent moments.

[0051] Specifically, any edge in the yarn image at the current moment is taken as the target edge, and DTW matching is performed on the target edge and each edge in the yarn image at the previous moment to obtain the matching pixel points of each pixel in the target edge on each edge in the yarn image at the previous moment. According to the length difference between the target edge and each edge in the yarn image at the previous moment, and the distance and grayscale difference between each pixel in the target edge and its matching pixel points on each edge in the yarn image at the previous moment, the matching rate between the target edge and each edge in the yarn image at the previous moment is determined:

[0052]

[0053] in, is the distance between the target edge and the yarn image at the previous moment. Matching ratio between strip edges; is the length of the target edge, that is, the number of pixels on the target edge; is the yarn image at the previous moment. The length of the edge of the strip, that is, the length of the first The number of pixels on the edge of the strip; The first Pixels Compared with the yarn image at the previous moment Matching pixels on the edge of the strip The distance between the pixels The coordinates and matching pixels in the yarn image at the current moment The Euclidean distance between the coordinates in the yarn image at the previous moment is obtained; is the serial number of the pixel point on the target edge; The first Pixels Gray value of The first The pixel point in the yarn image at the previous moment Matching pixels on the edge of the strip Gray value of represents the variance function, is the relationship between all pixel points on the target edge and the first pixel point in the yarn image at the previous moment. The variance of the distances between matching pixels on the strip edge; is the absolute value symbol; is a natural exponential function.

[0054] Indicates the target edge and the yarn image at the previous moment The length difference of the edge of the strip is The reason for adding 1 is to prevent the denominator from being 0. The smaller the distance between the target edge and the yarn image at the previous moment, the The edge of the strip is more likely to be the edge of the same feather or the edge of the same texture on the background or the edge of the yarn. At this time, the target edge is the same as the first As the yarn moves, the same feather in the yarn image at adjacent moments moves in translation, and the distances between the corresponding pixels of the same feather edge in the yarn image at adjacent moments are basically the same. The distance between the corresponding pixels of the same texture edge in the background in the yarn image at adjacent moments is 0. Therefore, when all the pixels on the target edge are aligned with their first pixels in the yarn image at the previous moment, Variance of distances between matching pixels on strip edges The smaller the distance between the target edge and the yarn image at the previous moment, the The edge of the yarn is more likely to be the edge of the same feather or the edge of the same texture on the background. At this time, the target edge is the same as the first The greater the matching ratio between strip edges; is the relationship between each pixel point in the target edge and its first pixel point in the yarn image at the previous moment. The average grayscale difference between the matching pixels on the edge of the yarn is basically the same between the corresponding pixels of the same feather edge or the same texture edge on the background in the yarn image at adjacent moments. The smaller the distance between the target edge and the yarn image at the previous moment, the The edge of the yarn is more likely to be the edge of the same feather or the edge of the same texture on the background. At this time, the target edge is the same as the first The greater the matching rate between strip edges.

[0055] When the maximum matching rate between the target edge and each edge in the yarn image at the previous moment is greater than the preset matching threshold, the edge corresponding to the maximum matching rate in the yarn image at the previous moment is used as the matching edge of the target edge. The average of the distances between each pixel point on the target edge and the corresponding matching pixel point on its matching edge is used as the distance between the target edge and its matching edge.

[0056] When the maximum matching rate between the target edge and the edges in the yarn image at the previous moment is not greater than the preset matching threshold, the target edge is more likely to be an edge formed by noise, and the target edge is no longer regarded as an edge.

[0057] The matching threshold is set by the implementer according to the actual implementation situation. Since the matching rate ranges from [0,1], the setting range of the matching threshold should also be [0,1]. For example, the matching threshold is 0.12.

[0058] S004. Divide all edges in the yarn image at the current moment into two categories, determine the hairiness edge probability of each edge in each category, determine the reference edge of the pixel point according to the distance from the pixel point to each edge and the hairiness edge probability of each edge, and determine the hairiness possibility of the pixel point according to the distance from the pixel point to the reference edge, the grayscale value of the pixel point and the hairiness edge probability of the reference edge.

[0059] It should be noted that each edge in the yarn image at the current moment and its matching edge may be the edge of the same hairiness, or the edge of the same texture on the background, or the edge of the yarn, or noise. In the yarn images at adjacent moments, the positions of the noise and the same hairiness edge change, while the positions of the edge of the same texture on the background and the edge of the yarn remain unchanged. Therefore, the present invention distinguishes the hairiness edge from other edges according to the distance between each edge in the yarn image at the current moment and its matching edge.

[0060] Specifically, the number of different values ​​of the distance between all edges and their matching edges in the yarn image at the current moment is counted, and a distance histogram is constructed with the distance as the horizontal axis and the number of occurrences as the vertical axis. The distance histogram is segmented by Otsu threshold, and all edges corresponding to each distance in the yarn image at the current moment are divided into two categories, with the category with a large distance mean as the first category and the category with a small distance mean as the second category.

[0061] Determine the hairiness edge probability of each edge in the first category based on the distances corresponding to each edge in the first category:

[0062]

[0063] in, For the first category The probability of hairiness edge at the edge of the strip; For the first category The edge of the strip and its matching edge distance; is the mode of the distances between all edges in the first category and their matching edges; the current moment is used express, for Instead of The distance of the matching edge in the yarn image at the moment; is the absolute value symbol; is a natural exponential function.

[0064] The first category is the category with the larger mean distance between the two categories. The first category is more likely to be the edge whose position changes in the yarn image at two adjacent moments, such as hairy edges, noise, etc. Since the yarn moves at a constant speed in the spinning process, the displacement of different hairy edges in the yarn images at two adjacent moments is the same, while the positions of different noises in the yarn images at two adjacent moments are irregular. Therefore, the mode of the distances between all edges in the first category and their matching edges is It is more likely to be the displacement of the hairiness in the yarn image at two adjacent moments. The distance between the edge of the strip and its matching edge and majority The smaller the difference between The edge of the strip is more likely to be the edge of the feather. and majority The greater the difference between The edge of the strip is more likely to be noise. Since the collection interval of the yarn images at adjacent moments is the same, the displacement of the hairiness in the yarn images at three consecutive moments is the same, while the position of the noise in the yarn images at different moments is irregular. and The smaller the difference between The edge of the strip is more likely to be the edge of the feather. and The greater the difference between The edges of the stripes are more likely to be noise.

[0065] The second category is the category with the smallest distance mean value among the two categories, and the second category is more likely to be the edge whose position does not change in the yarn image at two adjacent moments, such as the texture edge on the background, the yarn edge, etc. Therefore, 0 is taken as the hairiness edge probability of each edge in the second category.

[0066] At this point, the hairiness edge probability of each edge in the yarn image at the current moment is obtained.

[0067] For each edge in the yarn image at the current moment, the distance between the pixel point and each edge pixel on the edge is calculated, and the minimum distance is used as the distance from the pixel point to the edge. The edge corresponding to the minimum value of the distance from the pixel point to each edge is used as the edge closest to the pixel point. There may be multiple edges closest to the pixel point, and the edge with the highest probability of hairiness edge is used as the reference edge of the pixel point.

[0068] According to the hairiness edge probability of the reference edge of each pixel in the yarn image at the current moment, the distance from each pixel to the reference edge and the gray value of each pixel, the hairiness possibility of each pixel is determined:

[0069]

[0070] in, is the number of the yarn image at the current moment The hairiness probability of each pixel; is the number of the yarn image at the current moment The hairiness edge probability of the reference edge of pixels; For the The distance from a pixel to the reference edge; is a hyperparameter used to prevent Too large, resulting in Always close to 0, hyperparameter The empirical value of is 5. Implementers can set the hyperparameter according to the actual implementation situation. ; For the The gray value of each pixel; For the The maximum gray value of all pixels in the reference edge of pixels. To prevent Too large, resulting in Always close to 1; is the natural exponential function; is the hyperbolic tangent function.

[0071] When The greater the probability of a feather edge for the reference edge of a pixel, the more likely it is that one side of the reference edge is feather and the other side is other image features, such as background. The closer the pixel is to its reference edge, the The pixel point is more likely to be the image feature on the side of its reference edge. Since the feather is brighter than the background, the gray value of the feather is larger than the gray value of the background. The larger the gray value of the pixel, the The greater the probability of a hairy edge of the reference edge of the pixel point, the greater the probability of a hairy edge of the reference edge of the pixel point. The closer the pixel is to its reference edge, the The more pixels there are, the greater the possibility of hairiness.

[0072] S005. Exponentially enhance the yarn image at the current moment according to the hairiness possibility of each pixel point to obtain an enhanced image.

[0073] According to the hairiness possibility of each pixel point of the yarn image at the current moment, the yarn image at the current moment is enhanced:

[0074]

[0075] in, is the number of the yarn image at the current moment The gray value of each pixel after enhancement; is the number of the yarn image at the current moment The gray value of each pixel; is the number of the yarn image at the current moment The hairiness probability of each pixel; is a natural exponential function.

[0076] The enhancement method in the present invention is exponential enhancement. As the The pixel enhancement index is the index of the pixel enhancement. When the possibility of hairiness is greater, the index is The smaller the The gray value of each pixel after enhancement is larger; when the possibility of hairiness is smaller, the index The larger and closer to 1, the The grayscale value of each pixel after enhancement remains basically unchanged. This increases the contrast between the feather pixels and the background texture pixels and noise, making the feather clearer.

[0077] So far, the enhancement of the spinning image at the current moment has been achieved, for example Figure 6 In order to adopt the method of the present invention Figure 2 The spinning image shown in FIG. 1 is enhanced to obtain an enhanced image. The existing exponential enhancement algorithm uses the same exponent to enhance all pixels in the image. Figure 7 To enhance the existing index Figure 2 The enhanced image is obtained by enhancing the spinning image shown. It can be seen that Figure 6 Compared with the hairiness Figure 7 The hairiness in the film is clearer, so the method of the present invention is better than the traditional exponential enhancement method.

[0078] S006. Determine the hairiness H value according to the enhanced image, so as to adjust the temperature and humidity of the air conditioner according to the hairiness H value.

[0079] It should be noted that the hairiness H value is an important indicator for evaluating the number and length of yarn hairiness. The hairiness H value is the cumulative length of all hairiness extending out of the main body of the yarn of 1 cm in length. The cumulative length is calculated in millimeters. The hairiness H value of a section of yarn is usually the average value of the entire measured length of the section of yarn. The present invention obtains the hairiness H value in the yarn image at the current moment based on the enhanced image.

[0080] Specifically, the enhanced image of the yarn image at the current moment is input into the trained fully connected neural network, and the hairiness H value at the current moment is output. The specific contents of the neural network are as follows: the input of the neural network is the enhanced image of the yarn image, and the output is the hairiness H value; the data set of the neural network is a data set composed of enhanced images of images of different yarns, and the labels are the hairiness H values ​​corresponding to the enhanced images of the images of different yarns, which are obtained by manually measuring the hairiness on the yarn; the loss function of the neural network is the mean square error loss function.

[0081] It should be noted that the number and length of the hairiness on the yarn are not only related to the temperature and humidity of the spinning workshop, but also to the operating parameters of each component in the spinning process, such as spindle speed, draft multiple, twist, yarn guide hook position, etc. When the operating parameters of each component are constant, the present invention controls the formation of hairiness on the yarn by regulating the temperature and humidity of the spinning workshop.

[0082] Specifically, when the operating parameters of each component in the spinning process remain unchanged, if the hairiness H value at the current moment exceeds the preset standard value, or the growth amount of the hairiness H value at the current moment compared with the hairiness H value at the previous moment exceeds the preset growth threshold, the relevant staff will be notified to adjust the temperature and humidity of the air conditioner to control the formation of hairiness on the yarn in the future. The standard value and growth threshold are set by the implementation personnel according to the actual implementation situation. For example, when the yarn is a pure cotton double-ply yarn, the standard value is set to 2.1 and the growth threshold is set to 0.5.

[0083] 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 controlling temperature and humidity of an air conditioner in a spinning workshop, characterized in that: include: Collect yarn images in the spinning process in real time and obtain each edge in the yarn image; Taking any edge in the yarn image at the current moment as the target edge, matching the target edge with each edge in the yarn image at the previous moment, and determining the matching edge of the target edge, including: performing DTW matching on the target edge and each edge in the yarn image at the previous moment, obtaining the matching pixel points of each pixel point in the target edge on each edge in the yarn image at the previous moment; determining the matching rate between the target edge and each edge in the yarn image at the previous moment according to the length difference between the target edge and each edge in the yarn image at the previous moment, the distance between each pixel point in the target edge and its matching pixel point on each edge in the yarn image at the previous moment, and the grayscale difference; determining the matching edge of the target edge according to the matching rate; According to the distance between each edge in the yarn image at the current moment and its matching edge, all edges in the yarn image at the current moment are divided into two categories, and the category with a large distance mean is taken as the first category, and the category with a small distance mean is taken as the second category; the hairiness edge probability of each edge in the first category is determined according to the distance between each edge in the first category and its matching edge; and 0 is taken as the hairiness edge probability of each edge in the second category; For each pixel point in the yarn image at the current moment, a reference edge of the pixel point is determined according to the distance from the pixel point to each edge and the hairiness edge probability of each edge, including: for each edge in the yarn image at the current moment, the distance between the pixel point and each edge pixel point on the edge is calculated, and the minimum distance is used as the distance from the pixel point to the edge; the edge corresponding to the minimum value of the distance from the pixel point to each edge is used as the edge closest to the pixel point; if there are multiple edges closest to the pixel point, the edge with the largest hairiness edge probability is used as the reference edge of the pixel point, and if there is only one edge closest to the pixel point, the edge is used as the reference edge of the pixel point; the hairiness possibility of the pixel point is determined, and the hairiness possibility is positively correlated with the hairiness edge probability of the reference edge of the pixel point and the grayscale value of the pixel point, and is negatively correlated with the distance from the pixel point to the reference edge; According to the hairiness possibility of each pixel point, the yarn image at the current moment is exponentially enhanced to obtain an enhanced image. The index during exponential enhancement is negatively correlated with the hairiness possibility of the pixel point. The hairiness H value is determined according to the enhanced image so that the air conditioning temperature and humidity can be adjusted according to the hairiness H value.

2. A spinning workshop air conditioning temperature and humidity control method according to claim 1, characterized in that: The matching rate satisfies the expression: ; in, is the distance between the target edge and the yarn image at the previous moment. Matching ratio between strip edges; is the length of the target edge; is the yarn image at the previous moment. The length of the strip edge; The first Pixels Compared with the yarn image at the previous moment Matching pixels on the edge of the strip The distance between is the serial number of the pixel point on the target edge; Pixel Gray value of To match pixels Gray value of represents the variance function; is the absolute value symbol; is a natural exponential function.

3. A spinning workshop air conditioning temperature and humidity control method according to claim 1, characterized in that: The matching edge of the target edge is determined according to the matching rate, including: When the maximum matching rate between the target edge and each edge in the yarn image at the previous moment is greater than a preset matching threshold, the edge corresponding to the maximum matching rate in the yarn image at the previous moment is used as the matching edge of the target edge.

4. A spinning workshop air conditioning temperature and humidity control method according to claim 1, characterized in that: The hairiness edge probability of each edge in the first category satisfies the expression: ; in, For the first category The probability of hairiness edge at the edge of the strip; For the first category The edge of a strip and its matching edge distance; is the mode of the distances between all edges in the first category and their matching edges; the current moment is used express, for Instead of The distance of the matching edge in the yarn image at the moment; is the absolute value symbol; is the natural exponential function; The method for obtaining the distance between each edge and its matching edge in the first category is: taking the average of the distances between each pixel point on each edge and the corresponding matching pixel point on its matching edge as the distance between each edge and its matching edge.

5. A spinning workshop air conditioning temperature and humidity control method according to claim 1, characterized in that: The hairiness probability of a pixel satisfies the expression: ; in, is the number of the yarn image at the current moment The hairiness probability of each pixel; is the number of the yarn image at the current moment The hairiness edge probability of the reference edge of pixels; For the The distance from a pixel to the reference edge; is a hyperparameter; For the The gray value of each pixel; For the The maximum gray value of all pixels in the reference edge of pixels; is the natural exponential function; is the hyperbolic tangent function.

6. A spinning workshop air conditioning temperature and humidity control method according to claim 1, characterized in that: The yarn image at the current moment is exponentially enhanced according to the hairiness probability of each pixel point, including: The gray value of each pixel after enhancement satisfies the expression: ; in, is the number of the yarn image at the current moment The gray value of each pixel after enhancement; is the number of the yarn image at the current moment The gray value of each pixel; is the number of the yarn image at the current moment The hairiness probability of each pixel; is a natural exponential function.

7. A spinning workshop air conditioning temperature and humidity control method according to claim 1, characterized in that: According to the distance between each edge in the yarn image at the current moment and its matching edge, all edges in the yarn image at the current moment are divided into two categories, including: The number of times different values ​​of the distance between all edges in the yarn image at the current moment and their matching edges appear is counted, and a distance histogram is constructed with distance as the horizontal axis and the number of occurrences as the vertical axis. The distance histogram is segmented using Otsu thresholding, and all edges corresponding to each distance in the yarn image at the current moment are divided into two categories.

8. A method for controlling temperature and humidity of a spinning workshop air conditioner according to any one of claims 1 to 7, characterized in that: The method for obtaining each edge in the yarn image at the current moment is: The yarn image at the current moment is subjected to edge detection. For each edge obtained by edge detection, if there are more than two edge pixels in the 8-neighborhood of the edge pixel on the edge, the edge is segmented and merged: the edge pixel that contains more than two edge pixels in the 8-neighborhood is taken as the segmentation point, and the edge is segmented into multiple segments according to all the segmentation points on the edge; the gradient direction and unit length of the edge pixel constitute the gradient vector of the edge pixel, and the sum of the gradient vectors of all edge pixels in each segment is taken as the gradient vector of each segment; for each segment obtained by segmentation according to a segmentation point, the angle between the gradient vectors of each segment is calculated, and in the order of the angle from small to large, two segments with an angle less than a preset merging angle are merged into the same segment according to the segmentation point, and each segment can be merged at most once according to the segmentation point; each segment finally obtained is regarded as a new edge.

Citation Information

Cited By

  • Spinning workshop air conditioner temperature and humidity regulation and control method

    CN120799617A