원시데이터 수집 시스템
선정목록으로

The Detection of Yarn Roll’s Margin in Complex Background

간접 관련 산업용 섬유 · (17) 스펀본드 부직포 (1) 에어백(9) 타이어코드(10) 아라미드

기본 정보

저자
  1. Junru Wang — School of Mechanical Engineering, Zhejiang Sci-Tech University, Hangzhou 310018, China
  2. Zhiwei Shi — School of Mechanical Engineering, Zhejiang Sci-Tech University, Hangzhou 310018, China
  3. Wei‐Min Shi — School of Mechanical Engineering, Zhejiang Sci-Tech University, Hangzhou 310018, China
  4. Hongpeng Wang — School of Mechanical Engineering, Zhejiang Sci-Tech University, Hangzhou 310018, China
DOI
10.3390/s23041993
저널
Sensors
발행년도
2023
발행기관
Multidisciplinary Digital Publishing Institute
피인용수
5
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.3390/s23041993
토픽
Textile materials and evaluations
OpenAlex ID
W4319982350

평가 내용

관련도
간접 관련
사업분야
산업용 섬유 · (17) 스펀본드 부직포
부 분야
(1) 에어백, (9) 타이어코드, (10) 아라미드
R&D 측면
공정·제조
확신도
0.80
근거 용어
yarn roll, textile automation, online detection, yarn consumption speed, cylinder yarn
판단 근거
본 논문은 섬유 자동화 공정에서 실(yarn) 롤의 잔량을 정밀하게 감지하는 비전 알고리즘을 다루고 있습니다. 이는 코오롱인더스트리의 산업용 섬유(에어백, 타이어코드, 아라미드 등) 제조 공정 자동화 및 생산 효율화에 적용 가능한 기술입니다.
R&D 활용 포인트
산업용 섬유(아라미드, 타이어코드 등) 생산 라인의 자동화 시스템 구축 시, 실 소모량을 실시간 모니터링하고 교체 시점을 예측하는 스마트 팩토리 공정 제어 기술로 활용 가능합니다.
평가 입력
초록 1,537자

초록

Online detection of yarn roll’s margin is one of the key issues in textile automation, which is related to the speed and scheduling of bobbin (empty yarn roll) replacement. The actual industrial site is characterized by uneven lighting, restricted shooting angles, diverse yarn colors and cylinder yarn types, and complex backgrounds. Due to the above characteristics, the neural network detection error is large, and the contour detection extraction edge accuracy is low. In this paper, an improved neural network algorithm is proposed, and the improved Yolo algorithm and the contour detection algorithm are integrated. First, the image is entered in the Yolo model to detect each yarn roll and its dimensions; second, the contour and dimensions of each yarn roll are accurately detected based on Yolo; third, the diameter of the yarn rolls detected by Yolo and the contour detection algorithm are fused, and then the length of the yarn rolls and the edges of the yarn rolls are calculated as measurements; finally, in order to completely eliminate the error detection, the yarn consumption speed is used to estimate the residual yarn volume and the measured and estimated values are fused using a Kalman filter. This method overcomes the effects of complex backgrounds and illumination while being applicable to different types of yarn rolls. It is experimentally verified that the average measurement error of the cylinder yarn diameter is less than 8.6 mm, and the measurement error of the cylinder yarn length does not exceed 3 cm.

본문 50,333자

본문 펼치기
Online detection of yarn roll's margin is one of the key issues in textile automation, which is related to the speed and scheduling of bobbin (empty yarn roll) replacement. The actual industrial site is characterized by uneven lighting, restricted shooting angles, diverse yarn colors and cylinder yarn types, and complex backgrounds. Due to the above characteristics, the neural network detection error is large, and the contour detection extraction edge accuracy is low. In this paper, an improved neural network algorithm is proposed, and the improved Yolo algorithm and the contour detection algorithm are integrated. First, the image is entered in the Yolo model to detect each yarn roll and its dimensions; second, the contour and dimensions of each yarn roll are accurately detected based on Yolo; third, the diameter of the yarn rolls detected by Yolo and the contour detection algorithm are fused, and then the length of the yarn rolls and the edges of the yarn rolls are calculated as measurements; finally, in order to completely eliminate the error detection, the yarn consumption speed is used to estimate the residual yarn volume and the measured and estimated values are fused using a Kalman filter. This method overcomes the effects of complex backgrounds and illumination while being applicable to different types of yarn rolls. It is experimentally verified that the average measurement error of the cylinder yarn diameter is less than 8.6 mm, and the measurement error of the cylinder yarn length does not exceed 3 cm. Introduction Automation and intelligence are commonly utilized in the textile industry, throughout the entire textile process [1]. Due to environmental constraints at the industrial sites, the camera can only shoot from the cross-section of the cylinder yarn, and the calculation of the cylinder yarn length is, therefore, difficult. The inconsistent lighting conditions in the plant, as well as the complex internal background, can interfere with the detection. Moreover, the inconsistency of the cylinder yarn color, type, etc., requires that the detection algorithm be more versatile. In industrial applications, in order to replace the scheduling arrangements for the replacement of the cylinder yarn, detection of empty cylinders, identification of bobbins (empty yarn rolls), and detection of yarn roll residuals are key steps [2,3]. To solve this problem, this paper proposes a computer vision-based method for online detection of yarn roll residuals [4][5][6][7][8][9]. The method combines conventional computer vision and deep learning to detect the major dimensions of yarn rolls. According to experimental tests, the average measurement error for a conical yarn roll diameter is 6 mm, while it is no more than 12 mm for a cylindrical yarn roll diameter; yarn roll length is no more than 3 cm when the margin is large, the latter meeting the requirements of enterprises and helping automate the whole textile process. Introduction In many small and medium-sized enterprises, workers manually place every yarn roll on supports, as shown in Figure 1a. The camera, industrial computer, and bobbin replacement device are installed on the truss. The truss drives the vision system to detect every yarn roll's margin and judge whether the yarn roll is exhausted. If it is exhausted, the empty bobbin will be replaced by the bobbin replacement device. The structure of the truss system is shown in Figure 1b. In order to ensure that the spinning is not interrupted during the bobbin changing process, the head and end of two adjacent yarn roll are connected (i.e., the thread head of yarn roll A is connected to the thread end of yarn roll B), as shown in Figure 1c. In such a scenario, several problems need to be solved for the automatic detection process to be successful: (1) the detection of empty yarn rolls must be accurate; (2) in a textile factory, there are many empty bobbins at the same time and the empty bobbin B with a margin smaller than that of bobbin A must be replaced first. In order to improve the accuracy of empty bobbin detection and solve the scheduling problem, it is necessary to detect the margin of yarn rolls. Introduction Sensors 2023, 23, x FOR PEER REVIEW 2 of 16 every yarn roll's margin and judge whether the yarn roll is exhausted. If it is exhausted, the empty bobbin will be replaced by the bobbin replacement device. The structure of the truss system is shown in Figure 1b. In order to ensure that the spinning is not interrupted during the bobbin changing process, the head and end of two adjacent yarn roll are connected (i.e., the thread head of yarn roll A is connected to the thread end of yarn roll B), as shown in Figure 1c. In such a scenario, several problems need to be solved for the automatic detection process to be successful: (1) the detection of empty yarn rolls must be accurate; (2) in a textile factory, there are many empty bobbins at the same time and the empty bobbin B with a margin smaller than that of bobbin A must be replaced first. In order to improve the accuracy of empty bobbin detection and solve the scheduling problem, it is necessary to detect the margin of yarn rolls. Introduction (a) (b) (c) According to our research, there are three types of yarn roll commonly used by enterprises, as shown in Figure 2. The margin of a yarn roll is defined as shown in Formulas (1) and (2). Formula (1) is used to calculate the margin of a conic yarn roll. Introduction is yarn roll's top surface diameter, is the yarn roll's bottom surface diameter, is the bobbin's top surface diameter, is the bobbin's bottom surface diameter, is the yarn roll's length. Formula (2) is used to calculate the margin of a cylindrical yarn roll. Introduction is the yarn roll's diameter, is the bobbin's diameter, is the yarn roll's length, as shown in Figure 2a. Therefore, it is necessary to detect three quantities: bobbin diameter , yarn roll diameter , and yarn roll length . Introduction According to the yarn roll's layout and reliability requirements, there are several challenges to the margin detection process: (1) the illumination is unstable and the background is complex, as the image background contains other yarn rolls, which will interfere with detection of the target yarn roll; (2) the algorithm needs to be applicable to various types of yarn roll. Introduction In order to solve the above problems and challenges, this paper proposes a method that can detect the margin of a yarn roll accurately. Firstly, every yarn roll and its pixel diameter are roughly detected by the Yolo model. Then, every ROI image of each yarn roll is further processed to extract the yarn roll's inner and outer contour. Thirdly, the two detected diameters (detected by Yolo and contours) are fused together and the length of every detected yarn roll is calculated. Fourthly, the margin of the yarn roll is calculated as a measured value, and the current margin of the yarn roll is predicted as a predicted value. Lastly, the measured value and the predicted value are fused by Kalman Filter. The whole According to our research, there are three types of yarn roll commonly used by enterprises, as shown in Figure 2. The margin of a yarn roll is defined as shown in Formulas (1) and (2). Formula (1) is used to calculate the margin of a conic yarn roll. D 1 is yarn roll's top surface diameter, D 2 is the yarn roll's bottom surface diameter, d 1 is the bobbin's top surface diameter, d 1 is the bobbin's bottom surface diameter, l is the yarn roll's length. Formula (2) is used to calculate the margin of a cylindrical yarn roll. D is the yarn roll's diameter, d is the bobbin's diameter, l is the yarn roll's length, as shown in Figure 2a. Therefore, it is necessary to detect three quantities: bobbin diameter d, yarn roll diameter D, and yarn roll length l. Introduction According to the yarn roll's layout and reliability requirements, there are several challenges to the margin detection process: (1) the illumination is unstable and the background is complex, as the image background contains other yarn rolls, which will interfere with detection of the target yarn roll; (2) the algorithm needs to be applicable to various types of yarn roll. Introduction In order to solve the above problems and challenges, this paper proposes a method that can detect the margin of a yarn roll accurately. Firstly, every yarn roll and its pixel diameter are roughly detected by the Yolo model. Then, every ROI image of each yarn roll is further processed to extract the yarn roll's inner and outer contour. Thirdly, the two detected diameters (detected by Yolo and contours) are fused together and the length of every detected yarn roll is calculated. Fourthly, the margin of the yarn roll is calculated as a measured value, and the current margin of the yarn roll is predicted as a predicted value. Lastly, the measured value and the predicted value are fused by Kalman Filter. The whole algorithm flow is shown in Figure 2b. After verification, this method can effectively solve the existing problems. Related Work According to the literature, there are two main methods for measuring yarn roll dimensions: contact measurement technology [2][3][4][5] and non-contact measurement technology [10][11][12][13][14][15][16][17][18][19]. Contact measurement technology mainly uses various instruments or sensors to detect yarn roll's size or features. Non-contact measurement technology mainly uses computer vision to extract color, edge, and other characteristics of yarn roll. Related Work Contact measurement technology measures some characteristics of yarn, such as tension, through sensors during the manufacturing process, or entails putting the yarn roll into some equipment to measure the external dimensions of the yarn roll. Imae M, Iwade T, and Shintani Y proposed a yarn detection method [4] based on strain sensor. However, the utilized instruments may cause damage to the yarn roll. Related Work Non-contact measurement technology mainly uses computer vision to detect the yarn roll. It can be divided into monocular vision method, stereo vision method, and deep learning method [20][21][22][23][24][25][26][27][28]. Related Work (1) Monocular vision method: Du, C.J., and Sun, D.W. propose an automatic method [18] to estimate the surface area and volume of ham. They extract the ham through imageby-image segmentation and edge detection. This method cannot process complex background. Similarly, Jing, H., Li, D., and Duan, Q. present a method [19] to classify species of fish based on color and texture features using a multi-class support vector machine (MSVM). In the present paper, the yarn roll has different color and texture features, so this method cannot be used directly. This method requires pure background and is not very accurate for volume or class detection. (2) Stereo vision method: compared with monocular camera, the stereo camera can measure an object's three-dimensional information, and the measurement result is more accurate; it is also widely used in the industry. However, stereo camera needs to be calibrated before use, and the three-dimensional information is obtained through intrinsic and extrinsic matrices, a process that is more complicated. Molinier, T., Fofi, D., and Bingham, P.R. use two-vision systems to extract complementary 3D fire points [20]. The obtained data are projected in a same reference frame and used to build a global form of the fire front. From the obtained 3D fire points, a threedimensional surface rendering is performed and the fire volume estimated. Sheng, J., Zhao, H., and Bu, P. propose a four-direction global matching with a cost volume update scheme [21] to cope with textureless regions and occlusion. Experimental results show that their method is highly efficient. Related Work According to the literature, there are two main methods for measuring yarn roll dimensions: contact measurement technology [2][3][4][5] and non-contact measurement technology [10][11][12][13][14][15][16][17][18][19]. Contact measurement technology mainly uses various instruments or sensors to detect yarn roll's size or features. Non-contact measurement technology mainly uses computer vision to extract color, edge, and other characteristics of yarn roll. Related Work Contact measurement technology measures some characteristics of yarn, such as tension, through sensors during the manufacturing process, or entails putting the yarn roll into some equipment to measure the external dimensions of the yarn roll. Imae M, Iwade T, and Shintani Y proposed a yarn detection method [4] based on strain sensor. However, the utilized instruments may cause damage to the yarn roll. Related Work Non-contact measurement technology mainly uses computer vision to detect the yarn roll. It can be divided into monocular vision method, stereo vision method, and deep learning method [20][21][22][23][24][25][26][27][28]. Related Work (1) Monocular vision method: Du, C.J., and Sun, D.W. propose an automatic method [18] to estimate the surface area and volume of ham. They extract the ham through image-by-image segmentation and edge detection. This method cannot process complex background. Similarly, Jing, H., Li, D., and Duan, Q. present a method [19] to classify species of fish based on color and texture features using a multi-class support vector machine (MSVM). In the present paper, the yarn roll has different color and texture features, so this method cannot be used directly. This method requires pure background and is not very accurate for volume or class detection. (2) Stereo vision method: compared with monocular camera, the stereo camera can measure an object's three-dimensional information, and the measurement result is more accurate; it is also widely used in the industry. However, stereo camera needs to be calibrated before use, and the three-dimensional information is obtained through intrinsic and extrinsic matrices, a process that is more complicated. Molinier, T., Fofi, D., and Bingham, P.R. use two-vision systems to extract complementary 3D fire points [20]. The obtained data are projected in a same reference frame and used to build a global form of the fire front. From the obtained 3D fire points, a threedimensional surface rendering is performed and the fire volume estimated. Sheng, J., Zhao, H., and Bu, P. propose a four-direction global matching with a cost volume update scheme [21] to cope with textureless regions and occlusion. Experimental results show that their method is highly efficient. (3) There are some defects in the algorithms commonly used in edge detection, for example, the canny algorithm [29][30][31][32][33] uses Gaussian filtering for smoothing and noise reduction, which only considers the similarity of images in the spatial domain, and the filtering process leads to the loss of some useful weak edges. At the same time, the selection of the size of the convolution kernel of Gaussian filtering is influenced by human factors and, if the value is too small, the noise of the image cannot be effectively suppressed and the smoothed image is blurred. The canny algorithm uses a 2 × 2 size convolution kernel with two directions of horizontal and vertical detection, which is too small to extract the complete edge information, too sensitive to noise, and easily captures a pseudo-edge. The traditional canny algorithm relies on human experience to select the high and low thresholds, which cannot take into account the local feature information, and the uncertainty of the threshold value appears to be a certain error and lacks self-adaptability. (4) Deep learning method: as an important branch of machine vision, deep learning technology has been undergoing rapid development in recent years and has been used more and more widely in the industrial field. Yolo [29][30][31][32] is a type of neural network which is used to detect the target online. It transforms the object detection into a regression problem. We can directly obtain the position in the image, the corresponding category of the object, and its confidence only through one inference. Yolo does not explicitly solve region proposal, but it integrates the process into the network, which reduces the operational complexity of the detection process and improves the efficiency of the algorithm to a certain extent. Yarn Roll's Margin Detection Method As mentioned above, this paper mainly uses computer vision technology to detect yarn roll's margin. Based on the characteristics of the edge detection algorithm, the following algorithm is used to detect the edges of the yarn roll in combination with the characteristics of the edges. The main algorithm is as follows. Yolo Model There are four types of networks with different depths in yolov5 [34][35][36][37]. Network structure and depth can be modified through a configuration file. A configuration file is divided into three parts. The first part is the anchor box value. The second part is the backbone network, which is mainly used to extract features. The third part is the head layer, which mainly combines image features and transfers features to the prediction layer (output layer). The prediction layer is responsible for generating the output for the category of the target and its bounding box. We use a VOC dataset as a training sample. Target objects are the bobbin's end surface (red box in Figure 3a) and the yarn roll's end surface (blue box in Figure 3a). Yolo Model In order to obtain a better detection effect, a detection layer is added and three anchor box values will be added correspondingly. The final network structure is shown in Figure 3b, and its output also has four groups, as shown in Figure 3c. There are only two types of targets in training samples. The model ultimately generates four matrices, their sizes being Yolo Model The training results are shown in Figure 4. Figure 4a is a statistics chart of the sample number; Figure 4b refers to the coordinate distribution of targets in the image, with coordinates being normalized; Figure 4c is the length-width ratio of anchor boxes. It can be observed from this figure that the length-width ratio is close to 1:1. Figure 4d shows the training results, where GIOU represents the average value of the loss function: the smaller this value is, the more accurate the target box. Objectness is the average loss: the smaller the value, the more accurate the target detection. Classification refers to the classification accuracy: the smaller the classification, the more accurate the classification. Precision refers to the proportion of targets correctly detected by the model relative to the number of all targets detected by model: if the detection accuracy is 100%, it means that all targets detected by the model are correct, but this does not mean this model is good, because there accuracy: the smaller the classification, the more accurate the classification. Precision refers to the proportion of targets correctly detected by the model relative to the number of all targets detected by model: if the detection accuracy is 100%, it means that all targets detected by the model are correct, but this does not mean this model is good, because there may be undetected objects. Recall rate refers to the proportion of targets correctly detected by model relative to all targets. This evaluates the model's ability to find all objects. Figure 4a shows the sample size statistics, there are two types of target detection objects, namely, the end face of the cylinder yarn and the end face of the yarn cylinder, the number of which is about 1000 each and can reach nearly 10,000 by data enhancement. Figure 4b shows the coordinate distribution of the target objects (yarn end face and yarn end face center) in the image, the coordinates are normalized coordinates. Yolo Model Results are shown in Figure 5. It can be seen from Figure 5a,b that the model only detects yarn rolls in the image foreground, eliminating the influence of yarn rolls in the background. We randomly collected 100 images, amounting to about 600 yarn rolls, and entered them into model. When the detection threshold is set to 0.5, the final detection result is shown in Figure 5c, where the detection accuracy rate is 98.5%, the missed detection rate is 1.33%, and the multiple detection rate of an object is 0.17%. Figure 4a shows the sample size statistics, there are two types of target detection objects, namely, the end face of the cylinder yarn and the end face of the yarn cylinder, the number of which is about 1000 each and can reach nearly 10,000 by data enhancement. Figure 4b shows the coordinate distribution of the target objects (yarn end face and yarn end face center) in the image, the coordinates are normalized coordinates. Yolo Model Results are shown in Figure 5. It can be seen from Figure 5a,b that the model only detects yarn rolls in the image foreground, eliminating the influence of yarn rolls in the background. We randomly collected 100 images, amounting to about 600 yarn rolls, and entered them into model. When the detection threshold is set to 0.5, the final detection result is shown in Figure 5c, where the detection accuracy rate is 98.5%, the missed detection rate is 1.33%, and the multiple detection rate of an object is 0.17%. Contours Extraction and Process Through the above steps, the diameter of the yarn roll and of the bobbin are detected, roughly. We selected every yarn roll's ROI images. Because the background is complex and the camera plane is not parallel to the bobbin's end face plane, as shown in Figure 6a, it is difficult to extract the yarn roll's contours accurately. Therefore, we processed ROI images through the following steps: (1) restoring ROI image by perspective transformation; (2) finding the yarn roll's end surface center accurately through circle-filters; and, (3) processing and extracting the yarn roll's contours. Contours Extraction and Process Through the above steps, the diameter of the yarn roll and of the bobbin are detected, roughly. We selected every yarn roll's ROI images. Because the background is complex and the camera plane is not parallel to the bobbin's end face plane, as shown in Figure 6a, it is difficult to extract the yarn roll's contours accurately. Therefore, we processed ROI images through the following steps: (1) restoring ROI image by perspective transformation; (2) finding the yarn roll's end surface center accurately through circle-filters; and, (3) processing and extracting the yarn roll's contours. Perspective Transformation In order to detect the yarn roll's diameter accurately, the ROI image needs to be restored using perspective transformation [12]. There are 8 yarn rolls in one image. Therefore, we should calculate eight perspective transformation matrices in advance. The pro- Perspective Transformation In order to detect the yarn roll's diameter accurately, the ROI image needs to be restored using perspective transformation [12]. There are 8 yarn rolls in one image. Therefore, we should calculate eight perspective transformation matrices in advance. The process is shown in Figure 6. For every yarn roll station, we need four original coordinates and its transformed coordinates to obtain a transformative matrix: the four original coordinates are the vertex coordinates (P1, P2, P3, P4), while its transformed coordinates are (P1 , P2 , P3 , P4 ), as shown in Figure 6c. Then, Formula (3) should be used to calculate the transformative matrix. (u, v) are the original coordinates, w is 1, and (x, y) are the transformed coordinates. Lastly, we restore the image by using the transformative matrix, as shown in Figure 6d. Detecting the Yarn Roll's Center The yarn roll's center detected by Yolo is not accurate; therefore, we detect the bobbin's center by circle filters. Circle filters are designed as shown in Figure 7a,b-their diameter can be changed. Here, we design some circle_x and circle_y according to the bobbin's pixel diameter. Then, we process the restored ROI image via the following steps. Extracting the Yarn Roll's Contours Following the above steps, we can restore every ROI image and obtain the bobbin's center in the image. Next, we detect the yarn roll's diameter according to the circle's features. We process the image by following the steps below. Extracting the Yarn Roll's Contours (1) We transform the RGB image into a gray image, which is shown in Figure 9a; (2) We process the gray image with the sobel filter [13] and obtain the gradient image, (1) Transform raw image into gray image; Extracting the Yarn Roll's Contours (2) Design circle-filters with different diameter according to the circle's features in the image. Figure 7a,b show two circle filters designed to detect a circle of seven pixels in diameter. The bobbin's diameter is about 60-100 pixels, so we should design four circle_x and circle_y with diameter 50 and 30 pixels; (3) Obtain convolution image by sliding circle_x in the gray image with a fixed step to the computer convolution and geting x-gradient image, then getting y-gradient image in the same way. X-gradient and y-gradient images are shown in Figure 8b,c; (4) Use AND operation to process corresponding pixel values of the x-gradient image and the y-gradient image and obtain the gradient image, which is shown in Figure 8d; (5) Use "erode" and "dilate" methods to process the gradient image and obtain the result image, which is shown in Figure 8e; (6) Detect contours in the result image. The max contour is the yarn roll's center, drawn in the raw and gradient images, which are shown in Figure 8f,g. Extracting the Yarn Roll's Contours Following the above steps, we can restore every ROI image and obtain the bobbin's center in the image. Next, we detect the yarn roll's diameter according to the circle's features. We process the image by following the steps below. Extracting the Yarn Roll's Contours (1) We transform the RGB image into a gray image, which is shown in Figure 9a; (2) We process the gray image with the sobel filter [13] and obtain the gradient image, which is shown in Figure 9b. The sobel filter can eliminate the influence of light and color; (3) We convert the gradient image into a binary image, which is shown in Figure 9c; (4) We use opencv's "findContours" founction to process binary image to get contour points, which is shown in Figure 9d, blue points are extracted from binary image; (5) We can see from Figure 9d that contour points are dense in a zigzag fashion, but sparse in the smooth place. In order to obtain a good detection result, we need to insert points in the sparse place, which is shown in Figure 9e. Red points are the inserted points. Extracting the Yarn Roll's Contours We can see from Figure 9 that the yarn roll's contour is intermittent and the contour points are disorderly; therefore, it is difficult to extract the yarn roll's end surface directly. However, following the above steps, we obtain the bobbin's center in the image and the yarn roll's end surface corresponds to the circle. Therefore, we use the circle's feature (all points on a circle are equidistant from the center) to detect the yarn roll. We calculate the distance between every contour point and the bobbin's center, then we draw a histogram, which is shown in Figure 10. The horizontal axis is the distance between contour points and the central point of the bobbin in the pixels; the vertical axis is the number of points with the same distance. It can be seen from the histogram that there are two peaks, the first peak corresponds to the pixel radius of the bobbin, and the second peak corresponds to the pixel radius of the yarn roll's outer edge. Extracting the Yarn Roll's Contours Following the above steps, we can restore every ROI image and obtain the bobbin's center in the image. Next, we detect the yarn roll's diameter according to the circle's features. We process the image by following the steps below. Extracting the Yarn Roll's Contours (1) We transform the RGB image into a gray image, which is shown in Figure 9a; (2) We process the gray image with the sobel filter [13] and obtain the gradient image, which is shown in Figure 9b. The sobel filter can eliminate the influence of light and color; (3) We convert the gradient image into a binary image, which is shown in Figure 9c; (4) We use opencv's "findContours" founction to process binary image to get contour points, which is shown in Figure 9d, blue points are extracted from binary image; (5) We can see from Figure 9d that contour points are dense in a zigzag fashion, but sparse in the smooth place. In order to obtain a good detection result, we need to insert points in the sparse place, which is shown in Figure 9e. Red points are the inserted points. We can see from Figure 9 that the yarn roll's contour is intermittent and the contour points are disorderly; therefore, it is difficult to extract the yarn roll's end surface directly. However, following the above steps, we obtain the bobbin's center in the image and the yarn roll's end surface corresponds to the circle. Therefore, we use the circle's feature (all points on a circle are equidistant from the center) to detect the yarn roll. We calculate the distance between every contour point and the bobbin's center, then we draw a histogram, which is shown in Figure 10. The horizontal axis is the distance between contour points and the central point of the bobbin in the pixels; the vertical axis is the number of points with the same distance. It can be seen from the histogram that there are two peaks, the first peak corresponds to the pixel radius of the bobbin, and the second peak corresponds to the pixel radius of the yarn roll's outer edge. The drawing and calculation of the histogram have been completed. In the application, it is necessary to calculate the peak position of the histogram. Therefore, the histogram is fitted, and the peak points are calculated by the fitting function. Here, the kernel density estimation method is used to obtain a smooth density curve. The formula of the kernel density estimation is shown in Formula (4), where is the kernel function [38], and a Gaussian function [39] is generally selected as the kernel function, which is shown in Formula (5), is the total number of samples, and ℎ is the bandwidth. In general, the value of ℎ is 1. This way, the distance density curve can be obtained, as shown in Figure 11. Then, the maximum value of the curve can be calculated by derivation. If the maximum of the curve corresponds to the peak value of the histogram (distance difference is no more than five pixels), the distance corresponding to the peak value can be considered as the pixel radius of the bobbin and yarn roll. The drawing and calculation of the histogram have been completed. In the application, it is necessary to calculate the peak position of the histogram. Therefore, the histogram is fitted, and the peak points are calculated by the fitting function. Here, the kernel density estimation method is used to obtain a smooth density curve. The formula of the kernel density estimation is shown in Formula (4), where K is the kernel function [38], and a Gaussian function [39] is generally selected as the kernel function, which is shown in Formula (5), N is the total number of samples, and h is the bandwidth. In general, the value of h is 1. This way, the distance density curve can be obtained, as shown in Figure 11. Then, the maximum value of the curve can be calculated by derivation. If the maximum of the curve corresponds to the peak value of the histogram (distance difference is no more than five pixels), the distance corresponding to the peak value can be considered as the pixel radius of the bobbin and yarn roll. Extracting the Yarn Roll's Contours Sensors 2023, 23, x FOR PEER REVIEW 10 of 16 Figure 11. Kernel density estimation curve. Extracting the Yarn Roll's Contours The above steps have yielded a more precise yarn roll and bobbin radius (pixel value). However, it is necessary to sift and fit points to improve the detection accuracy. After the approximate radius is obtained, the points within a certain distance range (plus or minus five pixels) are highlighted, as shown in Figure 12a. Then, the remaining points The above steps have yielded a more precise yarn roll and bobbin radius (pixel value). However, it is necessary to sift and fit points to improve the detection accuracy. After the approximate radius is obtained, the points within a certain distance range (plus or minus five pixels) are highlighted, as shown in Figure 12a. Then, the remaining points are fitted using the ellipse fitting formula, which is shown in Figure 12b. The diameter pixels of the bobbin and yarn roll are obtained. Figure 11. Kernel density estimation curve. Extracting the Yarn Roll's Contours The above steps have yielded a more precise yarn roll and bobbin radius (pixel value). However, it is necessary to sift and fit points to improve the detection accuracy. After the approximate radius is obtained, the points within a certain distance range (plus or minus five pixels) are highlighted, as shown in Figure 12a. Then, the remaining points are fitted using the ellipse fitting formula, which is shown in Figure 12b. The diameter pixels of the bobbin and yarn roll are obtained. Fusing Diameter Detected by Yolo and Contours Following the above steps, the yarn roll's and bobbin's diameters are obtained from the Yolo and contours, respectively. Both methods have their advantages and disadvantages. There is barely any false detection in Yolo. However, the boxes detected by Yolo are often larger and smaller compared with the yarn roll's and bobbin's diameter, respectively. Compared with Yolo, the contours method is more accurate, but this method is not suitable when the yarn roll's margin is low. Therefore, we need to fuse the corresponding results. The method is as follows. Fusing Diameter Detected by Yolo and Contours (1) A weight value can be calculated. First, the maximum value of the density curve must be obtained through the above steps. Then, the peak of the corresponding histogram is found around the maximum value of the curve (plus or minus five pixels). Second, the average value of the histogram is calculated. Third, the weight value is calculated using Equation (6), m is the mean value of the histogram and p is the peak value of the histogram. Fusing Diameter Detected by Yolo and Contours Following the above steps, the yarn roll's and bobbin's diameters are obtained from the Yolo and contours, respectively. Both methods have their advantages and disadvantages. There is barely any false detection in Yolo. However, the boxes detected by Yolo are often larger and smaller compared with the yarn roll's and bobbin's diameter, respectively. Compared with Yolo, the contours method is more accurate, but this method is not suitable when the yarn roll's margin is low. Therefore, we need to fuse the corresponding results. The method is as follows. Fusing Diameter Detected by Yolo and Contours (1) A weight value can be calculated. First, the maximum value of the density curve must be obtained through the above steps. Then, the peak of the corresponding histogram is found around the maximum value of the curve (plus or minus five pixels). Second, the average value of the histogram is calculated. Third, the weight value µ is calculated using Equation (6), m is the mean value of the histogram and p is the peak value of the histogram. Fusing Diameter Detected by Yolo and Contours (2) The weighted average is calculated using Equation (7), r is the bobbin's radius, r 1 is the bobbin's radius detected by Yolo, r 1 is the bobbin's radius detected by contours, R is the yarn roll's radius. Calculating the Yarn Roll's Diameter and Length in Real World After the diameter in pixel is found for both the bobbin and the yarn roll, the bobbin's diameter in the real world can be obtained (the cylindrical bobbin and conic bobbin can be easily discriminated in the image). We use Formula (8) to calculate the yarn roll's diameter in the real world, d is the bobbin's diameter in the real world, d is the bobbin's diameter in the image, D is the yarn roll's diameter in the real world, D is the yarn roll's diameter in the image. Calculating the Yarn Roll's Diameter and Length in Real World After that, we calculate the distance between the yarn roll's end face and the camera according to the distance detection theory based on monocular vision technique, which is shown in Figure 13. The distance from the camera and the yarn roll's end face is d, the camera's focal length is k, the yarn roll's diameter in the real world is W, the yarn roll's diameter in the image is w. Therefore, we can obtain d by applying the formula: k/d = w/W. Because the distance between the yarn roll's support and the camera is known, the difference value is the yarn roll's length. Because the conic yarn roll's length is known, we only use this method to discriminate the detected cylindrical yarn roll. Calculating the Yarn Roll's Diameter and Length in Real World ameter in the real world, is the bobbin's diameter in the real world, is the bobbin's diameter in the image, is the yarn roll's diameter in the real world, is the yarn roll's diameter in the image. (8) After that, we calculate the distance between the yarn roll's end face and the camera according to the distance detection theory based on monocular vision technique, which is shown in Figure 13. The distance from the camera and the yarn roll's end face is d, the camera's focal length is k, the yarn roll's diameter in the real world is W, the yarn roll's diameter in the image is . Therefore, we can obtain d by applying the formula: ⁄ ⁄ . Because the distance between the yarn roll's support and the camera is known, the difference value is the yarn roll's length. Because the conic yarn roll's length is known, we only use this method to discriminate the detected cylindrical yarn roll. Figure 13. Camera model. Kalman Filter After calculating the main size of the yarn roll, we can use Formula (1) or Formula (2) to calculate the yarn roll's margin. We use the Kalman filter [40] to prevent false detection from occurring at the same time: (1) we predict the yarn roll's theoretical margin according to the yarn consumption speed and time; (2) we fuse the predicted value and the measured value (obtained using the abovementioned computer vision method) using the Kalman filter. The main formula is shown from Formula (9) to Formula (14). In Formula (9), it is assumed that the time interval is t and that the yarn roll's margin and yarn consumption speed at the last detection time is and , respectively. and are the current margin and the current speed. is the variation of yarn consumption speed. In Formula (11), P is the covariance matrix of yarn consumption speed and margin. Q is the noise matrix. In Formula (12), H = [1,0] is the observation matrix. In Formula (13), is the measured value of the yarn roll's margin. Kalman Filter (9) Figure 13. Camera model. Kalman Filter After calculating the main size of the yarn roll, we can use Formula (1) or Formula (2) to calculate the yarn roll's margin. We use the Kalman filter [40] to prevent false detection from occurring at the same time: (1) we predict the yarn roll's theoretical margin according to the yarn consumption speed and time; (2) we fuse the predicted value and the measured value (obtained using the abovementioned computer vision method) using the Kalman filter. The main formula is shown from Formula (9) to Formula (14). In Formula (9), it is assumed that the time interval is t and that the yarn roll's margin and yarn consumption speed at the last detection time is value k−1 and v k−1 , respectively. value k and v k are the current margin and the current speed. u is the variation of yarn consumption speed. In Formula (11), P is the covariance matrix of yarn consumption speed and margin. Q is the noise matrix. In Formula (12), H = [1,0] is the observation matrix. In Formula (13), Z k is the measured value of the yarn roll's margin. Experiments Some experiments have been designed to test the method. The first experiment entails testing the accuracy of the yarn roll's diameter estimate. The second experiment entails testing the accuracy of the yarn roll's length estimate. The third experiment entails testing the effect of the Kalman filter. The fourth experiment entails testing the accuracy of the yarn roll detection. Experiments In the first experiment, we take 150 conic yarn rolls with different diameter. Then, we sort them according to the yarn roll's diameter and provide a reference number. Thirdly, we measure every yarn roll's diameter using vernier caliper as ground truth, which is illustrated by the dark blue line in Figure 14a. Fourthly, we use our method to calculate the yarn roll's diameter from the image, which is illustrated by the red line in Figure 14a. Experiments Lastly, we calculate the measurement error, which is illustrated by the light blue line in Figure 14a. The cylindrical yarn roll's data are presented in Figure 14b. From Figure 14 we can see that the measurement error of the conical yarn roll's diameter is no more than 10% (6 mm) when its diameter is larger than 6 cm. When its diameter is less than 6 cm, the measurement error is very large. The reason for that is that Yolo and the contours method are poor. The measurement error of the cylindrical yarn roll's diameter is no more than 15.4% (12 mm). The measurement error of the yarn roll's diameter is 3.9% (8.6 mm). Experiments testing the effect of the Kalman filter. The fourth experiment entails testing the accuracy of the yarn roll detection. Experiments In the first experiment, we take 150 conic yarn rolls with different diameter. Then, we sort them according to the yarn roll's diameter and provide a reference number. Thirdly, we measure every yarn roll's diameter using vernier caliper as ground truth, which is illustrated by the dark blue line in Figure 14a. Fourthly, we use our method to calculate the yarn roll's diameter from the image, which is illustrated by the red line in Figure 14a. Lastly, we calculate the measurement error, which is illustrated by the light blue line in Figure 14a. The cylindrical yarn roll's data are presented in Figure 14b. From Figure 14 we can see that the measurement error of the conical yarn roll's diameter is no more than 10% (6 mm) when its diameter is larger than 6 cm. When its diameter is less than 6 cm, the measurement error is very large. The reason for that is that Yolo and the contours method are poor. The measurement error of the cylindrical yarn roll's diameter is no more than 15.4% (12 mm). The measurement error of the yarn roll's diameter is 3.9% (8.6 mm). In the second experiment, 67 long and short cylindrical rolls of yarn were placed on a holder and numbered in order. The length of each yarn roll is measured using the method described above and is illustrated as a light blue curve in Figure 14a. The calculation of the diameter of the yarn roll is performed using the above method and is represented by a red line in Figure 15. The measurement error is no more than 4 cm, the difference between long cylindrical yarn roll's length and long cylindrical yarn roll's length is 10.5 cm. Therefore, this method can discriminate the detected cylindrical yarn roll. In the second experiment, 67 long and short cylindrical rolls of yarn were placed on a holder and numbered in order. The length of each yarn roll is measured using the method described above and is illustrated as a light blue curve in Figure 14a. The calculation of the diameter of the yarn roll is performed using the above method and is represented by a red line in Figure 15. The measurement error is no more than 4 cm, the difference between long cylindrical yarn roll's length and long cylindrical yarn roll's length is 10.5 cm. Therefore, this method can discriminate the detected cylindrical yarn roll. In the third experiment, the effect of the Kalman filter is verified by detecting a yarn roll's margin every 20 min. The final result is shown in Figure 16. The blue point is the measured value and is calculated according to the image, the green point is the predicted value of the yarn roll's margin, the green line is the actual value of the yarn roll's margin, which is measured and calculated by vernier caliper, and the red line is the final result fused using the Kalman filter. It can be seen that the Kalman filter can improve accuracy to a certain extent, especially when the yarn roll's margin is small, reducing detection error. In the third experiment, the effect of the Kalman filter is verified by detecting a yarn roll's margin every 20 min. The final result is shown in Figure 16. The blue point is the measured value and is calculated according to the image, the green point is the predicted value of the yarn roll's margin, the green line is the actual value of the yarn roll's margin, which is measured and calculated by vernier caliper, and the red line is the final result fused using the Kalman filter. It can be seen that the Kalman filter can improve accuracy to a certain extent, especially when the yarn roll's margin is small, reducing detection error. Experiments In the fourth experiment, Formulas (1) and (2) are used to calculate the yarn roll's margin. During the calculation, the measurement error of the diameter will be magnified. Here, the error value of the margin is not used as an evaluation index, but only for statistics. For the cylindrical yarn roll, ten cylindrical yarns with diameters of 22 cm, 21 cm, 20 cm, etc., are taken and the margin calculated as a measured value through the above method. Then, we predict the current margin according to the yarn consumption speed and combine the two values through the Kalman filter as the final result. Figure 17a shows the detection error of long cylindrical yarn roll margin, and there are ten groups of data for which the average error is calculated at each sampling point. The conical yarn roll is also sampled and measured. The final error is shown in Figure 17b. The errors are all absolute values, so there are no negative numbers. In the third experiment, the effect of the Kalman filter is verified by detecting a yarn roll's margin every 20 min. The final result is shown in Figure 16. The blue point is the measured value and is calculated according to the image, the green point is the predicted value of the yarn roll's margin, the green line is the actual value of the yarn roll's margin, which is measured and calculated by vernier caliper, and the red line is the final result fused using the Kalman filter. It can be seen that the Kalman filter can improve accuracy to a certain extent, especially when the yarn roll's margin is small, reducing detection error. In the fourth experiment, Formulas (1) and (2) are used to calculate the yarn roll's margin. During the calculation, the measurement error of the diameter will be magnified. Here, the error value of the margin is not used as an evaluation index, but only for statistics. For the cylindrical yarn roll, ten cylindrical yarns with diameters of 22 cm, 21 cm, 20 cm, etc., are taken and the margin calculated as a measured value through the above method. Then, we predict the current margin according to the yarn consumption speed and combine the two values through the Kalman filter as the final result. Figure 17a shows the detection error of long cylindrical yarn roll margin, and there are ten groups of data for which the average error is calculated at each sampling point. The conical yarn roll is also sampled and measured. The final error is shown in Figure 17b. The errors are all absolute values, so there are no negative numbers. Discussion This method can detect the yarn roll's margin online through monocular camera, which can initially replace manual inspection and detection. This system initially meets the requirements of enterprises. It is innovative in its algorithms, it has good adaptability, and it is easy to be deployed at different sites. However, through early application, it is possible to observe that this method can be further improved. Suggestions are listed as follows. Discussion (1) The method is based on monocular camera. The measurement error of the yarn roll's length is large, its error being about 3 cm. Since the types of yarn roll in this enterprise are few, the measurement accuracy will not be affected temporarily. If more types of yarn roll with different diameter and lengths are used, a stereo camera needs to be considered. The latter's accuracy is higher, and so is the price; (2) The detection algorithm should be optimized, especially to improve the detection accuracy when the yarn roll's margin is small. The existing algorithm presents some defects; (3) The resolution of the camera can be increased. Increasing resolution can improve de- Discussion This method can detect the yarn roll's margin online through monocular camera, which can initially replace manual inspection and detection. This system initially meets the requirements of enterprises. It is innovative in its algorithms, it has good adaptability, and it is easy to be deployed at different sites. However, through early application, it is possible to observe that this method can be further improved. Suggestions are listed as follows. Discussion (1) The method is based on monocular camera. The measurement error of the yarn roll's length is large, its error being about 3 cm. Since the types of yarn roll in this enterprise are few, the measurement accuracy will not be affected temporarily. If more types of yarn roll with different diameter and lengths are used, a stereo camera needs to be considered. The latter's accuracy is higher, and so is the price; Discussion (2) The detection algorithm should be optimized, especially to improve the detection accuracy when the yarn roll's margin is small. The existing algorithm presents some defects; (3) The resolution of the camera can be increased. Increasing resolution can improve detection accuracy, but the detection speed will decrease correspondingly.

섹션 본문 63문단 · 48,813자

(제목 없음)

1Online detection of yarn roll's margin is one of the key issues in textile automation, which is related to the speed and scheduling of bobbin (empty yarn roll) replacement. The actual industrial site is characterized by uneven lighting, restricted shooting angles, diverse yarn colors and cylinder yarn types, and complex backgrounds. Due to the above characteristics, the neural network detection error is large, and the contour detection extraction edge accuracy is low. In this paper, an improved neural network algorithm is proposed, and the improved Yolo algorithm and the contour detection algorithm are integrated. First, the image is entered in the Yolo model to detect each yarn roll and its dimensions; second, the contour and dimensions of each yarn roll are accurately detected based on Yolo; third, the diameter of the yarn rolls detected by Yolo and the contour detection algorithm are fused, and then the length of the yarn rolls and the edges of the yarn rolls are calculated as measurements; finally, in order to completely eliminate the error detection, the yarn consumption speed is used to estimate the residual yarn volume and the measured and estimated values are fused using a Kalman filter. This method overcomes the effects of complex backgrounds and illumination while being applicable to different types of yarn rolls. It is experimentally verified that the average measurement error of the cylinder yarn diameter is less than 8.6 mm, and the measurement error of the cylinder yarn length does not exceed 3 cm.

Introduction

2Automation and intelligence are commonly utilized in the textile industry, throughout the entire textile process [1]. Due to environmental constraints at the industrial sites, the camera can only shoot from the cross-section of the cylinder yarn, and the calculation of the cylinder yarn length is, therefore, difficult. The inconsistent lighting conditions in the plant, as well as the complex internal background, can interfere with the detection. Moreover, the inconsistency of the cylinder yarn color, type, etc., requires that the detection algorithm be more versatile. In industrial applications, in order to replace the scheduling arrangements for the replacement of the cylinder yarn, detection of empty cylinders, identification of bobbins (empty yarn rolls), and detection of yarn roll residuals are key steps [2,3]. To solve this problem, this paper proposes a computer vision-based method for online detection of yarn roll residuals [4][5][6][7][8][9]. The method combines conventional computer vision and deep learning to detect the major dimensions of yarn rolls. According to experimental tests, the average measurement error for a conical yarn roll diameter is 6 mm, while it is no more than 12 mm for a cylindrical yarn roll diameter; yarn roll length is no more than 3 cm when the margin is large, the latter meeting the requirements of enterprises and helping automate the whole textile process.

3In many small and medium-sized enterprises, workers manually place every yarn roll on supports, as shown in Figure 1a. The camera, industrial computer, and bobbin replacement device are installed on the truss. The truss drives the vision system to detect every yarn roll's margin and judge whether the yarn roll is exhausted. If it is exhausted, the empty bobbin will be replaced by the bobbin replacement device. The structure of the truss system is shown in Figure 1b. In order to ensure that the spinning is not interrupted during the bobbin changing process, the head and end of two adjacent yarn roll are connected (i.e., the thread head of yarn roll A is connected to the thread end of yarn roll B), as shown in Figure 1c. In such a scenario, several problems need to be solved for the automatic detection process to be successful: (1) the detection of empty yarn rolls must be accurate; (2) in a textile factory, there are many empty bobbins at the same time and the empty bobbin B with a margin smaller than that of bobbin A must be replaced first. In order to improve the accuracy of empty bobbin detection and solve the scheduling problem, it is necessary to detect the margin of yarn rolls.

4Sensors 2023, 23, x FOR PEER REVIEW 2 of 16 every yarn roll's margin and judge whether the yarn roll is exhausted. If it is exhausted, the empty bobbin will be replaced by the bobbin replacement device. The structure of the truss system is shown in Figure 1b. In order to ensure that the spinning is not interrupted during the bobbin changing process, the head and end of two adjacent yarn roll are connected (i.e., the thread head of yarn roll A is connected to the thread end of yarn roll B), as shown in Figure 1c. In such a scenario, several problems need to be solved for the automatic detection process to be successful: (1) the detection of empty yarn rolls must be accurate; (2) in a textile factory, there are many empty bobbins at the same time and the empty bobbin B with a margin smaller than that of bobbin A must be replaced first. In order to improve the accuracy of empty bobbin detection and solve the scheduling problem, it is necessary to detect the margin of yarn rolls.

5(a) (b) (c) According to our research, there are three types of yarn roll commonly used by enterprises, as shown in Figure 2. The margin of a yarn roll is defined as shown in Formulas (1) and (2). Formula (1) is used to calculate the margin of a conic yarn roll.

6is yarn roll's top surface diameter, is the yarn roll's bottom surface diameter, is the bobbin's top surface diameter, is the bobbin's bottom surface diameter, is the yarn roll's length. Formula (2) is used to calculate the margin of a cylindrical yarn roll.

7is the yarn roll's diameter, is the bobbin's diameter, is the yarn roll's length, as shown in Figure 2a. Therefore, it is necessary to detect three quantities: bobbin diameter , yarn roll diameter , and yarn roll length .

8According to the yarn roll's layout and reliability requirements, there are several challenges to the margin detection process: (1) the illumination is unstable and the background is complex, as the image background contains other yarn rolls, which will interfere with detection of the target yarn roll; (2) the algorithm needs to be applicable to various types of yarn roll.

9In order to solve the above problems and challenges, this paper proposes a method that can detect the margin of a yarn roll accurately. Firstly, every yarn roll and its pixel diameter are roughly detected by the Yolo model. Then, every ROI image of each yarn roll is further processed to extract the yarn roll's inner and outer contour. Thirdly, the two detected diameters (detected by Yolo and contours) are fused together and the length of every detected yarn roll is calculated. Fourthly, the margin of the yarn roll is calculated as a measured value, and the current margin of the yarn roll is predicted as a predicted value. Lastly, the measured value and the predicted value are fused by Kalman Filter. The whole According to our research, there are three types of yarn roll commonly used by enterprises, as shown in Figure 2. The margin of a yarn roll is defined as shown in Formulas (1) and (2). Formula (1) is used to calculate the margin of a conic yarn roll. D 1 is yarn roll's top surface diameter, D 2 is the yarn roll's bottom surface diameter, d 1 is the bobbin's top surface diameter, d 1 is the bobbin's bottom surface diameter, l is the yarn roll's length. Formula (2) is used to calculate the margin of a cylindrical yarn roll. D is the yarn roll's diameter, d is the bobbin's diameter, l is the yarn roll's length, as shown in Figure 2a. Therefore, it is necessary to detect three quantities: bobbin diameter d, yarn roll diameter D, and yarn roll length l.

10According to the yarn roll's layout and reliability requirements, there are several challenges to the margin detection process: (1) the illumination is unstable and the background is complex, as the image background contains other yarn rolls, which will interfere with detection of the target yarn roll; (2) the algorithm needs to be applicable to various types of yarn roll.

11In order to solve the above problems and challenges, this paper proposes a method that can detect the margin of a yarn roll accurately. Firstly, every yarn roll and its pixel diameter are roughly detected by the Yolo model. Then, every ROI image of each yarn roll is further processed to extract the yarn roll's inner and outer contour. Thirdly, the two detected diameters (detected by Yolo and contours) are fused together and the length of every detected yarn roll is calculated. Fourthly, the margin of the yarn roll is calculated as a measured value, and the current margin of the yarn roll is predicted as a predicted value. Lastly, the measured value and the predicted value are fused by Kalman Filter. The whole algorithm flow is shown in Figure 2b. After verification, this method can effectively solve the existing problems.

Related Work

12According to the literature, there are two main methods for measuring yarn roll dimensions: contact measurement technology [2][3][4][5] and non-contact measurement technology [10][11][12][13][14][15][16][17][18][19]. Contact measurement technology mainly uses various instruments or sensors to detect yarn roll's size or features. Non-contact measurement technology mainly uses computer vision to extract color, edge, and other characteristics of yarn roll.

13Contact measurement technology measures some characteristics of yarn, such as tension, through sensors during the manufacturing process, or entails putting the yarn roll into some equipment to measure the external dimensions of the yarn roll. Imae M, Iwade T, and Shintani Y proposed a yarn detection method [4] based on strain sensor. However, the utilized instruments may cause damage to the yarn roll.

14Non-contact measurement technology mainly uses computer vision to detect the yarn roll. It can be divided into monocular vision method, stereo vision method, and deep learning method [20][21][22][23][24][25][26][27][28].

15(1) Monocular vision method: Du, C.J., and Sun, D.W. propose an automatic method [18] to estimate the surface area and volume of ham. They extract the ham through imageby-image segmentation and edge detection. This method cannot process complex background. Similarly, Jing, H., Li, D., and Duan, Q. present a method [19] to classify species of fish based on color and texture features using a multi-class support vector machine (MSVM). In the present paper, the yarn roll has different color and texture features, so this method cannot be used directly. This method requires pure background and is not very accurate for volume or class detection. (2) Stereo vision method: compared with monocular camera, the stereo camera can measure an object's three-dimensional information, and the measurement result is more accurate; it is also widely used in the industry. However, stereo camera needs to be calibrated before use, and the three-dimensional information is obtained through intrinsic and extrinsic matrices, a process that is more complicated. Molinier, T., Fofi, D., and Bingham, P.R. use two-vision systems to extract complementary 3D fire points [20]. The obtained data are projected in a same reference frame and used to build a global form of the fire front. From the obtained 3D fire points, a threedimensional surface rendering is performed and the fire volume estimated. Sheng, J., Zhao, H., and Bu, P. propose a four-direction global matching with a cost volume update scheme [21] to cope with textureless regions and occlusion. Experimental results show that their method is highly efficient.

16According to the literature, there are two main methods for measuring yarn roll dimensions: contact measurement technology [2][3][4][5] and non-contact measurement technology [10][11][12][13][14][15][16][17][18][19]. Contact measurement technology mainly uses various instruments or sensors to detect yarn roll's size or features. Non-contact measurement technology mainly uses computer vision to extract color, edge, and other characteristics of yarn roll.

17Contact measurement technology measures some characteristics of yarn, such as tension, through sensors during the manufacturing process, or entails putting the yarn roll into some equipment to measure the external dimensions of the yarn roll. Imae M, Iwade T, and Shintani Y proposed a yarn detection method [4] based on strain sensor. However, the utilized instruments may cause damage to the yarn roll.

18Non-contact measurement technology mainly uses computer vision to detect the yarn roll. It can be divided into monocular vision method, stereo vision method, and deep learning method [20][21][22][23][24][25][26][27][28].

19(1) Monocular vision method: Du, C.J., and Sun, D.W. propose an automatic method [18] to estimate the surface area and volume of ham. They extract the ham through image-by-image segmentation and edge detection. This method cannot process complex background. Similarly, Jing, H., Li, D., and Duan, Q. present a method [19] to classify species of fish based on color and texture features using a multi-class support vector machine (MSVM). In the present paper, the yarn roll has different color and texture features, so this method cannot be used directly. This method requires pure background and is not very accurate for volume or class detection. (2) Stereo vision method: compared with monocular camera, the stereo camera can measure an object's three-dimensional information, and the measurement result is more accurate; it is also widely used in the industry. However, stereo camera needs to be calibrated before use, and the three-dimensional information is obtained through intrinsic and extrinsic matrices, a process that is more complicated. Molinier, T., Fofi, D., and Bingham, P.R. use two-vision systems to extract complementary 3D fire points [20]. The obtained data are projected in a same reference frame and used to build a global form of the fire front. From the obtained 3D fire points, a threedimensional surface rendering is performed and the fire volume estimated. Sheng, J., Zhao, H., and Bu, P. propose a four-direction global matching with a cost volume update scheme [21] to cope with textureless regions and occlusion. Experimental results show that their method is highly efficient. (3) There are some defects in the algorithms commonly used in edge detection, for example, the canny algorithm [29][30][31][32][33] uses Gaussian filtering for smoothing and noise reduction, which only considers the similarity of images in the spatial domain, and the filtering process leads to the loss of some useful weak edges. At the same time, the selection of the size of the convolution kernel of Gaussian filtering is influenced by human factors and, if the value is too small, the noise of the image cannot be effectively suppressed and the smoothed image is blurred. The canny algorithm uses a 2 × 2 size convolution kernel with two directions of horizontal and vertical detection, which is too small to extract the complete edge information, too sensitive to noise, and easily captures a pseudo-edge. The traditional canny algorithm relies on human experience to select the high and low thresholds, which cannot take into account the local feature information, and the uncertainty of the threshold value appears to be a certain error and lacks self-adaptability. (4) Deep learning method: as an important branch of machine vision, deep learning technology has been undergoing rapid development in recent years and has been used more and more widely in the industrial field. Yolo [29][30][31][32] is a type of neural network which is used to detect the target online. It transforms the object detection into a regression problem. We can directly obtain the position in the image, the corresponding category of the object, and its confidence only through one inference. Yolo does not explicitly solve region proposal, but it integrates the process into the network, which reduces the operational complexity of the detection process and improves the efficiency of the algorithm to a certain extent.

Yarn Roll's Margin Detection Method

20As mentioned above, this paper mainly uses computer vision technology to detect yarn roll's margin. Based on the characteristics of the edge detection algorithm, the following algorithm is used to detect the edges of the yarn roll in combination with the characteristics of the edges. The main algorithm is as follows.

Yolo Model

21There are four types of networks with different depths in yolov5 [34][35][36][37]. Network structure and depth can be modified through a configuration file. A configuration file is divided into three parts. The first part is the anchor box value. The second part is the backbone network, which is mainly used to extract features. The third part is the head layer, which mainly combines image features and transfers features to the prediction layer (output layer). The prediction layer is responsible for generating the output for the category of the target and its bounding box. We use a VOC dataset as a training sample. Target objects are the bobbin's end surface (red box in Figure 3a) and the yarn roll's end surface (blue box in Figure 3a).

22In order to obtain a better detection effect, a detection layer is added and three anchor box values will be added correspondingly. The final network structure is shown in Figure 3b, and its output also has four groups, as shown in Figure 3c. There are only two types of targets in training samples. The model ultimately generates four matrices, their sizes being

23The training results are shown in Figure 4. Figure 4a is a statistics chart of the sample number; Figure 4b refers to the coordinate distribution of targets in the image, with coordinates being normalized; Figure 4c is the length-width ratio of anchor boxes. It can be observed from this figure that the length-width ratio is close to 1:1. Figure 4d shows the training results, where GIOU represents the average value of the loss function: the smaller this value is, the more accurate the target box. Objectness is the average loss: the smaller the value, the more accurate the target detection. Classification refers to the classification accuracy: the smaller the classification, the more accurate the classification. Precision refers to the proportion of targets correctly detected by the model relative to the number of all targets detected by model: if the detection accuracy is 100%, it means that all targets detected by the model are correct, but this does not mean this model is good, because there accuracy: the smaller the classification, the more accurate the classification. Precision refers to the proportion of targets correctly detected by the model relative to the number of all targets detected by model: if the detection accuracy is 100%, it means that all targets detected by the model are correct, but this does not mean this model is good, because there may be undetected objects. Recall rate refers to the proportion of targets correctly detected by model relative to all targets. This evaluates the model's ability to find all objects. Figure 4a shows the sample size statistics, there are two types of target detection objects, namely, the end face of the cylinder yarn and the end face of the yarn cylinder, the number of which is about 1000 each and can reach nearly 10,000 by data enhancement. Figure 4b shows the coordinate distribution of the target objects (yarn end face and yarn end face center) in the image, the coordinates are normalized coordinates.

24Results are shown in Figure 5. It can be seen from Figure 5a,b that the model only detects yarn rolls in the image foreground, eliminating the influence of yarn rolls in the background. We randomly collected 100 images, amounting to about 600 yarn rolls, and entered them into model. When the detection threshold is set to 0.5, the final detection result is shown in Figure 5c, where the detection accuracy rate is 98.5%, the missed detection rate is 1.33%, and the multiple detection rate of an object is 0.17%. Figure 4a shows the sample size statistics, there are two types of target detection objects, namely, the end face of the cylinder yarn and the end face of the yarn cylinder, the number of which is about 1000 each and can reach nearly 10,000 by data enhancement. Figure 4b shows the coordinate distribution of the target objects (yarn end face and yarn end face center) in the image, the coordinates are normalized coordinates.

25Results are shown in Figure 5. It can be seen from Figure 5a,b that the model only detects yarn rolls in the image foreground, eliminating the influence of yarn rolls in the background. We randomly collected 100 images, amounting to about 600 yarn rolls, and entered them into model. When the detection threshold is set to 0.5, the final detection result is shown in Figure 5c, where the detection accuracy rate is 98.5%, the missed detection rate is 1.33%, and the multiple detection rate of an object is 0.17%.

Contours Extraction and Process

26Through the above steps, the diameter of the yarn roll and of the bobbin are detected, roughly. We selected every yarn roll's ROI images. Because the background is complex and the camera plane is not parallel to the bobbin's end face plane, as shown in Figure 6a, it is difficult to extract the yarn roll's contours accurately. Therefore, we processed ROI images through the following steps: (1) restoring ROI image by perspective transformation; (2) finding the yarn roll's end surface center accurately through circle-filters; and, (3) processing and extracting the yarn roll's contours.

27Through the above steps, the diameter of the yarn roll and of the bobbin are detected, roughly. We selected every yarn roll's ROI images. Because the background is complex and the camera plane is not parallel to the bobbin's end face plane, as shown in Figure 6a, it is difficult to extract the yarn roll's contours accurately. Therefore, we processed ROI images through the following steps: (1) restoring ROI image by perspective transformation; (2) finding the yarn roll's end surface center accurately through circle-filters; and, (3) processing and extracting the yarn roll's contours.

Perspective Transformation

28In order to detect the yarn roll's diameter accurately, the ROI image needs to be restored using perspective transformation [12]. There are 8 yarn rolls in one image. Therefore, we should calculate eight perspective transformation matrices in advance. The pro-

29In order to detect the yarn roll's diameter accurately, the ROI image needs to be restored using perspective transformation [12]. There are 8 yarn rolls in one image. Therefore, we should calculate eight perspective transformation matrices in advance. The process is shown in Figure 6. For every yarn roll station, we need four original coordinates and its transformed coordinates to obtain a transformative matrix: the four original coordinates are the vertex coordinates (P1, P2, P3, P4), while its transformed coordinates are (P1 , P2 , P3 , P4 ), as shown in Figure 6c. Then, Formula (3) should be used to calculate the transformative matrix. (u, v) are the original coordinates, w is 1, and (x, y) are the transformed coordinates. Lastly, we restore the image by using the transformative matrix, as shown in Figure 6d.

Detecting the Yarn Roll's Center

30The yarn roll's center detected by Yolo is not accurate; therefore, we detect the bobbin's center by circle filters. Circle filters are designed as shown in Figure 7a,b-their diameter can be changed. Here, we design some circle_x and circle_y according to the bobbin's pixel diameter. Then, we process the restored ROI image via the following steps.

Extracting the Yarn Roll's Contours

31Following the above steps, we can restore every ROI image and obtain the bobbin's center in the image. Next, we detect the yarn roll's diameter according to the circle's features. We process the image by following the steps below.

32(1) We transform the RGB image into a gray image, which is shown in Figure 9a; (2) We process the gray image with the sobel filter [13] and obtain the gradient image, (1) Transform raw image into gray image;

33(2) Design circle-filters with different diameter according to the circle's features in the image. Figure 7a,b show two circle filters designed to detect a circle of seven pixels in diameter. The bobbin's diameter is about 60-100 pixels, so we should design four circle_x and circle_y with diameter 50 and 30 pixels; (3) Obtain convolution image by sliding circle_x in the gray image with a fixed step to the computer convolution and geting x-gradient image, then getting y-gradient image in the same way. X-gradient and y-gradient images are shown in Figure 8b,c; (4) Use AND operation to process corresponding pixel values of the x-gradient image and the y-gradient image and obtain the gradient image, which is shown in Figure 8d; (5) Use "erode" and "dilate" methods to process the gradient image and obtain the result image, which is shown in Figure 8e; (6) Detect contours in the result image. The max contour is the yarn roll's center, drawn in the raw and gradient images, which are shown in Figure 8f,g.

34Following the above steps, we can restore every ROI image and obtain the bobbin's center in the image. Next, we detect the yarn roll's diameter according to the circle's features. We process the image by following the steps below.

35(1) We transform the RGB image into a gray image, which is shown in Figure 9a; (2) We process the gray image with the sobel filter [13] and obtain the gradient image, which is shown in Figure 9b. The sobel filter can eliminate the influence of light and color; (3) We convert the gradient image into a binary image, which is shown in Figure 9c; (4) We use opencv's "findContours" founction to process binary image to get contour points, which is shown in Figure 9d, blue points are extracted from binary image; (5) We can see from Figure 9d that contour points are dense in a zigzag fashion, but sparse in the smooth place. In order to obtain a good detection result, we need to insert points in the sparse place, which is shown in Figure 9e. Red points are the inserted points.

36We can see from Figure 9 that the yarn roll's contour is intermittent and the contour points are disorderly; therefore, it is difficult to extract the yarn roll's end surface directly. However, following the above steps, we obtain the bobbin's center in the image and the yarn roll's end surface corresponds to the circle. Therefore, we use the circle's feature (all points on a circle are equidistant from the center) to detect the yarn roll. We calculate the distance between every contour point and the bobbin's center, then we draw a histogram, which is shown in Figure 10. The horizontal axis is the distance between contour points and the central point of the bobbin in the pixels; the vertical axis is the number of points with the same distance. It can be seen from the histogram that there are two peaks, the first peak corresponds to the pixel radius of the bobbin, and the second peak corresponds to the pixel radius of the yarn roll's outer edge.

37Following the above steps, we can restore every ROI image and obtain the bobbin's center in the image. Next, we detect the yarn roll's diameter according to the circle's features. We process the image by following the steps below.

38(1) We transform the RGB image into a gray image, which is shown in Figure 9a; (2) We process the gray image with the sobel filter [13] and obtain the gradient image, which is shown in Figure 9b. The sobel filter can eliminate the influence of light and color; (3) We convert the gradient image into a binary image, which is shown in Figure 9c; (4) We use opencv's "findContours" founction to process binary image to get contour points, which is shown in Figure 9d, blue points are extracted from binary image; (5) We can see from Figure 9d that contour points are dense in a zigzag fashion, but sparse in the smooth place. In order to obtain a good detection result, we need to insert points in the sparse place, which is shown in Figure 9e. Red points are the inserted points. We can see from Figure 9 that the yarn roll's contour is intermittent and the contour points are disorderly; therefore, it is difficult to extract the yarn roll's end surface directly. However, following the above steps, we obtain the bobbin's center in the image and the yarn roll's end surface corresponds to the circle. Therefore, we use the circle's feature (all points on a circle are equidistant from the center) to detect the yarn roll. We calculate the distance between every contour point and the bobbin's center, then we draw a histogram, which is shown in Figure 10. The horizontal axis is the distance between contour points and the central point of the bobbin in the pixels; the vertical axis is the number of points with the same distance. It can be seen from the histogram that there are two peaks, the first peak corresponds to the pixel radius of the bobbin, and the second peak corresponds to the pixel radius of the yarn roll's outer edge. The drawing and calculation of the histogram have been completed. In the application, it is necessary to calculate the peak position of the histogram. Therefore, the histogram is fitted, and the peak points are calculated by the fitting function. Here, the kernel density estimation method is used to obtain a smooth density curve. The formula of the kernel density estimation is shown in Formula (4), where is the kernel function [38], and a Gaussian function [39] is generally selected as the kernel function, which is shown in Formula (5), is the total number of samples, and ℎ is the bandwidth. In general, the value of ℎ is 1. This way, the distance density curve can be obtained, as shown in Figure 11. Then, the maximum value of the curve can be calculated by derivation. If the maximum of the curve corresponds to the peak value of the histogram (distance difference is no more than five pixels), the distance corresponding to the peak value can be considered as the pixel radius of the bobbin and yarn roll. The drawing and calculation of the histogram have been completed. In the application, it is necessary to calculate the peak position of the histogram. Therefore, the histogram is fitted, and the peak points are calculated by the fitting function. Here, the kernel density estimation method is used to obtain a smooth density curve. The formula of the kernel density estimation is shown in Formula (4), where K is the kernel function [38], and a Gaussian function [39] is generally selected as the kernel function, which is shown in Formula (5), N is the total number of samples, and h is the bandwidth. In general, the value of h is 1. This way, the distance density curve can be obtained, as shown in Figure 11. Then, the maximum value of the curve can be calculated by derivation. If the maximum of the curve corresponds to the peak value of the histogram (distance difference is no more than five pixels), the distance corresponding to the peak value can be considered as the pixel radius of the bobbin and yarn roll.

39Sensors 2023, 23, x FOR PEER REVIEW 10 of 16 Figure 11. Kernel density estimation curve.

40The above steps have yielded a more precise yarn roll and bobbin radius (pixel value). However, it is necessary to sift and fit points to improve the detection accuracy. After the approximate radius is obtained, the points within a certain distance range (plus or minus five pixels) are highlighted, as shown in Figure 12a. Then, the remaining points The above steps have yielded a more precise yarn roll and bobbin radius (pixel value). However, it is necessary to sift and fit points to improve the detection accuracy. After the approximate radius is obtained, the points within a certain distance range (plus or minus five pixels) are highlighted, as shown in Figure 12a. Then, the remaining points are fitted using the ellipse fitting formula, which is shown in Figure 12b. The diameter pixels of the bobbin and yarn roll are obtained. Figure 11. Kernel density estimation curve.

41The above steps have yielded a more precise yarn roll and bobbin radius (pixel value). However, it is necessary to sift and fit points to improve the detection accuracy. After the approximate radius is obtained, the points within a certain distance range (plus or minus five pixels) are highlighted, as shown in Figure 12a. Then, the remaining points are fitted using the ellipse fitting formula, which is shown in Figure 12b. The diameter pixels of the bobbin and yarn roll are obtained.

Fusing Diameter Detected by Yolo and Contours

42Following the above steps, the yarn roll's and bobbin's diameters are obtained from the Yolo and contours, respectively. Both methods have their advantages and disadvantages. There is barely any false detection in Yolo. However, the boxes detected by Yolo are often larger and smaller compared with the yarn roll's and bobbin's diameter, respectively. Compared with Yolo, the contours method is more accurate, but this method is not suitable when the yarn roll's margin is low. Therefore, we need to fuse the corresponding results. The method is as follows.

43(1) A weight value can be calculated. First, the maximum value of the density curve must be obtained through the above steps. Then, the peak of the corresponding histogram is found around the maximum value of the curve (plus or minus five pixels). Second, the average value of the histogram is calculated. Third, the weight value is calculated using Equation (6), m is the mean value of the histogram and p is the peak value of the histogram.

44Following the above steps, the yarn roll's and bobbin's diameters are obtained from the Yolo and contours, respectively. Both methods have their advantages and disadvantages. There is barely any false detection in Yolo. However, the boxes detected by Yolo are often larger and smaller compared with the yarn roll's and bobbin's diameter, respectively. Compared with Yolo, the contours method is more accurate, but this method is not suitable when the yarn roll's margin is low. Therefore, we need to fuse the corresponding results. The method is as follows.

45(1) A weight value can be calculated. First, the maximum value of the density curve must be obtained through the above steps. Then, the peak of the corresponding histogram is found around the maximum value of the curve (plus or minus five pixels). Second, the average value of the histogram is calculated. Third, the weight value µ is calculated using Equation (6), m is the mean value of the histogram and p is the peak value of the histogram.

46(2) The weighted average is calculated using Equation (7), r is the bobbin's radius, r 1 is the bobbin's radius detected by Yolo, r 1 is the bobbin's radius detected by contours, R is the yarn roll's radius.

Calculating the Yarn Roll's Diameter and Length in Real World

47After the diameter in pixel is found for both the bobbin and the yarn roll, the bobbin's diameter in the real world can be obtained (the cylindrical bobbin and conic bobbin can be easily discriminated in the image). We use Formula (8) to calculate the yarn roll's diameter in the real world, d is the bobbin's diameter in the real world, d is the bobbin's diameter in the image, D is the yarn roll's diameter in the real world, D is the yarn roll's diameter in the image.

48After that, we calculate the distance between the yarn roll's end face and the camera according to the distance detection theory based on monocular vision technique, which is shown in Figure 13. The distance from the camera and the yarn roll's end face is d, the camera's focal length is k, the yarn roll's diameter in the real world is W, the yarn roll's diameter in the image is w. Therefore, we can obtain d by applying the formula: k/d = w/W. Because the distance between the yarn roll's support and the camera is known, the difference value is the yarn roll's length. Because the conic yarn roll's length is known, we only use this method to discriminate the detected cylindrical yarn roll.

49ameter in the real world, is the bobbin's diameter in the real world, is the bobbin's diameter in the image, is the yarn roll's diameter in the real world, is the yarn roll's diameter in the image. (8) After that, we calculate the distance between the yarn roll's end face and the camera according to the distance detection theory based on monocular vision technique, which is shown in Figure 13. The distance from the camera and the yarn roll's end face is d, the camera's focal length is k, the yarn roll's diameter in the real world is W, the yarn roll's diameter in the image is . Therefore, we can obtain d by applying the formula: ⁄ ⁄ . Because the distance between the yarn roll's support and the camera is known, the difference value is the yarn roll's length. Because the conic yarn roll's length is known, we only use this method to discriminate the detected cylindrical yarn roll. Figure 13. Camera model.

Kalman Filter

50After calculating the main size of the yarn roll, we can use Formula (1) or Formula (2) to calculate the yarn roll's margin. We use the Kalman filter [40] to prevent false detection from occurring at the same time: (1) we predict the yarn roll's theoretical margin according to the yarn consumption speed and time; (2) we fuse the predicted value and the measured value (obtained using the abovementioned computer vision method) using the Kalman filter. The main formula is shown from Formula (9) to Formula (14). In Formula (9), it is assumed that the time interval is t and that the yarn roll's margin and yarn consumption speed at the last detection time is and , respectively. and are the current margin and the current speed. is the variation of yarn consumption speed. In Formula (11), P is the covariance matrix of yarn consumption speed and margin. Q is the noise matrix. In Formula (12), H = [1,0] is the observation matrix. In Formula (13), is the measured value of the yarn roll's margin.

51(9) Figure 13. Camera model.

52After calculating the main size of the yarn roll, we can use Formula (1) or Formula (2) to calculate the yarn roll's margin. We use the Kalman filter [40] to prevent false detection from occurring at the same time: (1) we predict the yarn roll's theoretical margin according to the yarn consumption speed and time; (2) we fuse the predicted value and the measured value (obtained using the abovementioned computer vision method) using the Kalman filter. The main formula is shown from Formula (9) to Formula (14). In Formula (9), it is assumed that the time interval is t and that the yarn roll's margin and yarn consumption speed at the last detection time is value k−1 and v k−1 , respectively. value k and v k are the current margin and the current speed. u is the variation of yarn consumption speed. In Formula (11), P is the covariance matrix of yarn consumption speed and margin. Q is the noise matrix. In Formula (12), H = [1,0] is the observation matrix. In Formula (13), Z k is the measured value of the yarn roll's margin.

Experiments

53Some experiments have been designed to test the method. The first experiment entails testing the accuracy of the yarn roll's diameter estimate. The second experiment entails testing the accuracy of the yarn roll's length estimate. The third experiment entails testing the effect of the Kalman filter. The fourth experiment entails testing the accuracy of the yarn roll detection.

54In the first experiment, we take 150 conic yarn rolls with different diameter. Then, we sort them according to the yarn roll's diameter and provide a reference number. Thirdly, we measure every yarn roll's diameter using vernier caliper as ground truth, which is illustrated by the dark blue line in Figure 14a. Fourthly, we use our method to calculate the yarn roll's diameter from the image, which is illustrated by the red line in Figure 14a.

55Lastly, we calculate the measurement error, which is illustrated by the light blue line in Figure 14a. The cylindrical yarn roll's data are presented in Figure 14b. From Figure 14 we can see that the measurement error of the conical yarn roll's diameter is no more than 10% (6 mm) when its diameter is larger than 6 cm. When its diameter is less than 6 cm, the measurement error is very large. The reason for that is that Yolo and the contours method are poor. The measurement error of the cylindrical yarn roll's diameter is no more than 15.4% (12 mm). The measurement error of the yarn roll's diameter is 3.9% (8.6 mm).

56testing the effect of the Kalman filter. The fourth experiment entails testing the accuracy of the yarn roll detection.

57In the first experiment, we take 150 conic yarn rolls with different diameter. Then, we sort them according to the yarn roll's diameter and provide a reference number. Thirdly, we measure every yarn roll's diameter using vernier caliper as ground truth, which is illustrated by the dark blue line in Figure 14a. Fourthly, we use our method to calculate the yarn roll's diameter from the image, which is illustrated by the red line in Figure 14a. Lastly, we calculate the measurement error, which is illustrated by the light blue line in Figure 14a. The cylindrical yarn roll's data are presented in Figure 14b. From Figure 14 we can see that the measurement error of the conical yarn roll's diameter is no more than 10% (6 mm) when its diameter is larger than 6 cm. When its diameter is less than 6 cm, the measurement error is very large. The reason for that is that Yolo and the contours method are poor. The measurement error of the cylindrical yarn roll's diameter is no more than 15.4% (12 mm). The measurement error of the yarn roll's diameter is 3.9% (8.6 mm). In the second experiment, 67 long and short cylindrical rolls of yarn were placed on a holder and numbered in order. The length of each yarn roll is measured using the method described above and is illustrated as a light blue curve in Figure 14a. The calculation of the diameter of the yarn roll is performed using the above method and is represented by a red line in Figure 15. The measurement error is no more than 4 cm, the difference between long cylindrical yarn roll's length and long cylindrical yarn roll's length is 10.5 cm. Therefore, this method can discriminate the detected cylindrical yarn roll. In the second experiment, 67 long and short cylindrical rolls of yarn were placed on a holder and numbered in order. The length of each yarn roll is measured using the method described above and is illustrated as a light blue curve in Figure 14a. The calculation of the diameter of the yarn roll is performed using the above method and is represented by a red line in Figure 15. The measurement error is no more than 4 cm, the difference between long cylindrical yarn roll's length and long cylindrical yarn roll's length is 10.5 cm. Therefore, this method can discriminate the detected cylindrical yarn roll. In the third experiment, the effect of the Kalman filter is verified by detecting a yarn roll's margin every 20 min. The final result is shown in Figure 16. The blue point is the measured value and is calculated according to the image, the green point is the predicted value of the yarn roll's margin, the green line is the actual value of the yarn roll's margin, which is measured and calculated by vernier caliper, and the red line is the final result fused using the Kalman filter. It can be seen that the Kalman filter can improve accuracy to a certain extent, especially when the yarn roll's margin is small, reducing detection error. In the third experiment, the effect of the Kalman filter is verified by detecting a yarn roll's margin every 20 min. The final result is shown in Figure 16. The blue point is the measured value and is calculated according to the image, the green point is the predicted value of the yarn roll's margin, the green line is the actual value of the yarn roll's margin, which is measured and calculated by vernier caliper, and the red line is the final result fused using the Kalman filter. It can be seen that the Kalman filter can improve accuracy to a certain extent, especially when the yarn roll's margin is small, reducing detection error.

58In the fourth experiment, Formulas (1) and (2) are used to calculate the yarn roll's margin. During the calculation, the measurement error of the diameter will be magnified. Here, the error value of the margin is not used as an evaluation index, but only for statistics. For the cylindrical yarn roll, ten cylindrical yarns with diameters of 22 cm, 21 cm, 20 cm, etc., are taken and the margin calculated as a measured value through the above method. Then, we predict the current margin according to the yarn consumption speed and combine the two values through the Kalman filter as the final result. Figure 17a shows the detection error of long cylindrical yarn roll margin, and there are ten groups of data for which the average error is calculated at each sampling point. The conical yarn roll is also sampled and measured. The final error is shown in Figure 17b. The errors are all absolute values, so there are no negative numbers. In the third experiment, the effect of the Kalman filter is verified by detecting a yarn roll's margin every 20 min. The final result is shown in Figure 16. The blue point is the measured value and is calculated according to the image, the green point is the predicted value of the yarn roll's margin, the green line is the actual value of the yarn roll's margin, which is measured and calculated by vernier caliper, and the red line is the final result fused using the Kalman filter. It can be seen that the Kalman filter can improve accuracy to a certain extent, especially when the yarn roll's margin is small, reducing detection error. In the fourth experiment, Formulas (1) and (2) are used to calculate the yarn roll's margin. During the calculation, the measurement error of the diameter will be magnified. Here, the error value of the margin is not used as an evaluation index, but only for statistics. For the cylindrical yarn roll, ten cylindrical yarns with diameters of 22 cm, 21 cm, 20 cm, etc., are taken and the margin calculated as a measured value through the above method. Then, we predict the current margin according to the yarn consumption speed and combine the two values through the Kalman filter as the final result. Figure 17a shows the detection error of long cylindrical yarn roll margin, and there are ten groups of data for which the average error is calculated at each sampling point. The conical yarn roll is also sampled and measured. The final error is shown in Figure 17b. The errors are all absolute values, so there are no negative numbers.

Discussion

59This method can detect the yarn roll's margin online through monocular camera, which can initially replace manual inspection and detection. This system initially meets the requirements of enterprises. It is innovative in its algorithms, it has good adaptability, and it is easy to be deployed at different sites. However, through early application, it is possible to observe that this method can be further improved. Suggestions are listed as follows.

60(1) The method is based on monocular camera. The measurement error of the yarn roll's length is large, its error being about 3 cm. Since the types of yarn roll in this enterprise are few, the measurement accuracy will not be affected temporarily. If more types of yarn roll with different diameter and lengths are used, a stereo camera needs to be considered. The latter's accuracy is higher, and so is the price; (2) The detection algorithm should be optimized, especially to improve the detection accuracy when the yarn roll's margin is small. The existing algorithm presents some defects; (3) The resolution of the camera can be increased. Increasing resolution can improve de-

61This method can detect the yarn roll's margin online through monocular camera, which can initially replace manual inspection and detection. This system initially meets the requirements of enterprises. It is innovative in its algorithms, it has good adaptability, and it is easy to be deployed at different sites. However, through early application, it is possible to observe that this method can be further improved. Suggestions are listed as follows.

62(1) The method is based on monocular camera. The measurement error of the yarn roll's length is large, its error being about 3 cm. Since the types of yarn roll in this enterprise are few, the measurement accuracy will not be affected temporarily. If more types of yarn roll with different diameter and lengths are used, a stereo camera needs to be considered. The latter's accuracy is higher, and so is the price;

63(2) The detection algorithm should be optimized, especially to improve the detection accuracy when the yarn roll's margin is small. The existing algorithm presents some defects; (3) The resolution of the camera can be increased. Increasing resolution can improve detection accuracy, but the detection speed will decrease correspondingly.

참고문헌 30건

  1. Modified unscented Kalman filter using modified filter gain and variance scale factor for highly maneuvering target tracking Journal of Systems Engineering and Electronics · Institute of Electrical and Electronics Engineers · 2014 10.1109/jsee.2014.00043
  2. Neighbor embedding based super-resolution algorithm through edge detection and feature selection Pattern Recognition Letters · Elsevier BV · 2008 10.1016/j.patrec.2008.11.008
  3. Fish species classification by color, texture and multi-class support vector machine using computer vision Computers and Electronics in Agriculture · Elsevier BV · 2012 10.1016/j.compag.2012.07.008
  4. An edge-based color-aided method for license plate detection Image and Vision Computing · Elsevier BV · 2008 10.1016/j.imavis.2008.10.012
  5. Estimating the surface area and volume of ellipsoidal ham using computer vision Journal of Food Engineering · Elsevier BV · 2005 10.1016/j.jfoodeng.2005.01.029
  6. Content-based retrieval of logo and trademarks in unconstrained color image databases using Color Edge Gradient Co-occurrence Histograms Computer Vision and Image Understanding · Elsevier BV · 2009 10.1016/j.cviu.2009.07.004
  7. Edge and line oriented contour detection: State of the art Image and Vision Computing · Elsevier BV · 2010 10.1016/j.imavis.2010.08.009
  8. Background and foreground modeling using nonparametric kernel density estimation for visual surveillance Proceedings of the IEEE · Institute of Electrical and Electronics Engineers · 2002 10.1109/jproc.2002.801448
  9. A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking IEEE Transactions on Signal Processing · Institute of Electrical and Electronics Engineers · 2002 10.1109/78.978374
  10. Estimation of fire volume by stereovision Proceedings of SPIE, the International Society for Optical Engineering/Proceedings of SPIE · SPIE · 2011 10.1117/12.872345
  11. Improved image threshold segmentation algorithm based on OTSU method Laser & Infrared · North China Research Institute of Electro-optics · 2012
  12. Improved Sobel algorithm for defect detection of rail surfaces with enhanced efficiency and accuracy Journal of Central South University · Springer Science+Business Media · 2016 10.1007/s11771-016-3350-3
  13. YOLO9000: Better, Faster, Stronger 2017 10.1109/cvpr.2017.690
  14. A self-adaptive correction method for perspective distortions of image Frontiers of Computer Science · Higher Education Press · 2019 10.1007/s11704-018-7269-8
  15. You Only Look Once: Unified, Real-Time Object Detection 2016 10.1109/cvpr.2016.91
  16. A robust detection method of yarn residue for automatic bobbin management system 2022 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM) · 2019 10.1109/aim.2019.8868733
  17. Adaptive Edge Detection Algorithm Based on Improved Grey Prediction Model IEEE Access · Institute of Electrical and Electronics Engineers · 2020 10.1109/access.2020.2999071
  18. Dynamic Convolution: Attention Over Convolution Kernels 2020 10.1109/cvpr42600.2020.01104
  19. A Machine Vision System for Manual Assembly Line Monitoring 2020 10.1109/iciem48762.2020.9160011
  20. Tool Wear Condition Monitoring by Combining Variational Mode Decomposition and Ensemble Learning Sensors · Multidisciplinary Digital Publishing Institute · 2020 10.3390/s20216113
  21. Enhanced Canny edge detection for Covid-19 and pneumonia X-Ray images IOP Conference Series Materials Science and Engineering · IOP Publishing · 2020 10.1088/1757-899x/979/1/012016
  22. Construction and verification of color fundus image retinal vessels segmentation algorithm under BP neural network The Journal of Supercomputing · Springer Science+Business Media · 2021 10.1007/s11227-020-03551-0
  23. Assessing the potential for deep learning and computer vision to identify bumble bee species from images Scientific Reports · Nature Portfolio · 2021 10.1038/s41598-021-87210-1
  24. Fish Volume Monitoring Using Stereo Vision for Fish Farms IFAC-PapersOnLine · Elsevier BV · 2020 10.1016/j.ifacol.2020.12.232
  25. Four-direction global matching with cost volume update for stereovision Applied Optics · Optica Publishing Group · 2021 10.1364/ao.422798
  26. MS-SSPCANet: A powerful deep learning framework for tool wear prediction Robotics and Computer-Integrated Manufacturing · Elsevier BV · 2022 10.1016/j.rcim.2022.102391
  27. Hybrid robust convolutional autoencoder for unsupervised anomaly detection of machine tools under noises Robotics and Computer-Integrated Manufacturing · Elsevier BV · 2022 10.1016/j.rcim.2022.102441
  28. Computed tomography reconstruction based on canny edge detection algorithm for acute expansion of epidural hematoma Journal of Radiation Research and Applied Sciences · Elsevier BV · 2022 10.1016/j.jrras.2022.07.011
  29. Memristive Fast-Canny Operation for Edge Detection IEEE Transactions on Electron Devices · Institute of Electrical and Electronics Engineers · 2022 10.1109/ted.2022.3204525
  30. Novel motor fault detection scheme based on one-class tensor hyperdisk Knowledge-Based Systems · Elsevier BV · 2023 10.1016/j.knosys.2023.110259