| With the continuous development of the textile industry and the improvement of industrial automation level,the development of automation equipment in textile production has been increasingly valued.In textile enterprises,inspection workers use methods such as vernier calipers to measure the remaining amount of yarn tubes in the workshop and judge the remaining time of yarn use based on experience.There are thousands of yarn tubes in the production workshop,and this traditional method cannot meet the growing needs of textile enterprises.Therefore,a high-precision and high-efficiency yarn tube and yarn residual detection system is needed to improve the efficiency of yarn tube replacement.In this paper,the following research contents are carried out around the above problems:Firstly,a design scheme for image acquisition system is proposed.The actual environment of the yarn tube area in textile enterprises is analyzed,and a gantry robot arm inspection route equipped with an image acquisition system is designed.Various yarn detection schemes based on sensors,monocular vision,binocular vision,laser scanning,and deep learning are compared.Finally,the yarn tube and yarn residual detection system is designed based on the actual conditions and functional requirements of textile enterprises.Secondly,aiming at the problem of complex background and difficult segmentation of yarn tube images,a filtering and segmentation algorithm is designed to achieve the detection and positioning of all yarn tubes in the yarn tube images.The imaging characteristics of the original yarn tube image are analyzed,and histogram equalization is used to enhance the image features.The traditional anisotropic diffusion filtering is optimized,and a Gaussian convolution filter is designed to combine the geometric features and lighting conditions of the yarn tube to suppress the image background and realize the recognition and positioning of the yarn tube and the extraction of the inner tube contour through Blob analysis.Thirdly,in view of the problem that the inner tube contour of the yarn tube is greatly affected by the lighting and the outer tube contour is blurred,a curvature convolution filter and an optimized curve fitting model are proposed to extract the inner and outer tube contours of the yarn tube.A Gaussian convolution filter based on the average curvature of the image is designed to extract the inner tube curve of the yarn tube,which solves the problem that the inner tube of the yarn tube is greatly affected by the light effect.Then,the front contour of the yarn tube is fitted and extracted by segmenting the blurred edge area of the yarn tube using color space conversion and establishing a mixed Bezier curve.Finally,aiming at the problem that the traditional inverse projection transformation model has large errors and is difficult to apply in industrial production,an inverse projection transformation model with compensation matrix optimization is proposed to achieve the inverse projection transformation of the yarn tube in the industrial production environment.For the yarn tube image with single-axis rotation,four reference points are selected according to the direction angle of the inner and outer tubes to establish the inverse projection transformation matrix.For the yarn tube image with two-axis rotation,a three-point perspective inverse projection model is established,and a compensation matrix is set according to the characteristics of the transformation matrix elements and optimized based on the width difference between the inner and outer tube axes to achieve perspective correction of the yarn tube and residual detection of the yarn according to the yarn residual calculation criteria.The detection accuracy of different yarn tube types,rotation angles,and shooting distances is tested in the built system platform.The experimental results show that the detection error of this system for three common yarn tubes at any shooting distance within a certain range of rotation angles is within 7%,which meets the production requirements of enterprises. |