Algorithm for detecting yarn bobbin margin based on inverse projection transformation
Objective The detection of bobbin yarn margin is an important part of the automatic production process in the textile industry,of which the design of an image algorithm is a key part for facilitating the automatic bobbin change system.Because the bobbin installed on the take-up bar rotates in two directions and the front image of the bobbin is oval,it is necessary to design a bobbin yarn margin detection algorithm suitable for the actual production situation.Method In view of the special imaging effect of the bobbin and considering the actual production situation,the inverse projection transformation algorithm was designed based on the multi-point perspective model.The initial inverse projection transformation matrix was calculated according to the spatial position relationship between the bobbin and the camera,and then the bobbin area was segmented to obtain the inner and outer bobbin areas of the bobbin and calculate the position information of the inner and outer bobbin areas.The compensation matrix was set,and the transformation matrix was optimized according to the position information of the inner and outer bobbin and the element transformation characteristics of the transformation matrix.The polar coordinates of the image were expanded after the inverse projection transformation and the bobbin yarn margin was calculated according to the set yarn margin calculation criteria.Results The processing effect of this method and the experimental results were discussed in detail.The inverse projection transformation effect of the algorithm was compared with that of the conventional three-point perspective model.It was seen that the conventional inverse projection transformation was difficult to consider the transformation effect of the inner and outer cylinders,and the yarn width in the same direction of the yarn area was not equal or even different.Therefore,the compensation matrix was set based on conventional inverse projection transformation to optimize the effect of inverse projection transformation.The element value of the compensation matrix was determined according to the position relationship between the inner and outer barrels of the bobbin.Therefore,the inner and outer barrels of the bobbin were first segmented,and the contour of the inner and outer barrels was fitted.The position information of the inner and outer cylinder,such as roundness,direction angle and area size,were calculated by obtaining the contour of the inner and outer cylinder.The compensation matrix was solved according to the element transformation characteristics of the compensation matrix after obtaining the position information of the inner and outer drums and the yarn area width at the inner and outer drums.Taking the square calibration board as an example,the transformation characteristics of the compensation matrix elements were shown in compensation matrix factor transformation effect.The fifth bobbin was selected to calculate the compensation matrix,and the product of the initial transformation matrix and the compensation matrix were as the inverse projection transformation matrix.Considering the limitations of the transformation effect,the conventional ellipse polar coordinates were optimized,and the angle information of the ellipse was added to the polar coordinate transformation to obtain the polar coordinate expansion diagram of the corrected bobbin image.The yarn margin of the bobbin was obtained according to the specified yarn margin calculation criteria.The objective in this paper was to determine different types of yarn bobbins under the sampling angle,so that the two types of yarn bobbins could be considered separately in the experiment.The test results of partial yarn margin of cylindrical bobbin were shown in margin detection results.It was seen that the test error was mostly within 5 mm,but it reached over 10%under some circumstances.In fact,although the error of the bobbin with large margin is relatively large,it will not have a significant impact on the actual production.This is because the main purpose of this algorithm is to provide warnings when there is less yarn surplus.Therefore,as long as the yarn surplus is detected before it is used up,the system can calculate the remaining usage time based on the yarn usage speed.The test results of part of the yarn margin of the cone bobbin were shown in margin detection result.The test error was within 4 mm,the error accuracy was about 95%,and the yarn width of the sample with large error was within 40 mm.Conclusion In order to solve the problems of poor transformation effect and high requirement of experimental conditions in general inverse projection transformation algorithm,this paper proposes a yarn margin detection algorithm based on inverse projection transformation based on multi-point perspective model.The experimental results show that the algorithm proposed in this paper can obtain good transformation effect of inner and outer bobbin at the same time for different types of bobbins under the determined sampling angle,and the detection error of yarn margin is within 5 mm,which meets the practical production requirements.Compared with other inverse projection transformation algorithms,this algorithm is simpler to implement and has higher detection efficiency.In the future work,the bobbin at different angles and different distances,and design filters to further reduce the interference of external environmental factors on the algorithm will be further studied,to enhance the detection accuracy of the algorithm.