An intelligent device and method for finding yarn holes in empty storage tubes based on machine vision
By applying intelligent empty-storage pipe yarn hole-finding device based on machine vision in the textile industry, combined with embedded control system and camera module, real-time detection and automatic supplementation of pipe yarn holes are realized, and the yarn library type automatic network is solved The problem of inefficiency when replacing pipe yarn by the barrel machine has improved the automation level of the production line.
Patent Information
- Application Number
- CN202210645032.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-07
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2042-06-07
AI Technical Summary
The textile industry's automatic winders rely on manual inspection when replacing pipe yarns, resulting in workers watching and moving back and forth for a long time, which is inefficient, and the prior art cannot realize real-time detection and automatic replenishment of missing pipe yarns.
Design an intelligent empty-air storage tube yarn hole device based on machine vision, combining embedded control system and camera module, identify the profile of the storage tube yarn disc and hole through Hough transformation, detect the number of tube yarns in real time, and pass the small cart and the delivery mechanism automatically replenishes the missing yarn.
It realizes automatic identification and supplementation of the lack of yarn in the pipe storage yarn hole on the winder production line, improves worker efficiency, reduces the time of manual inspection, and ensures the continuous operation of the production line.
Smart Images

Figure CN115035062B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent textile technology, and in particular to an intelligent device for finding yarn holes in a storage tube based on machine vision and a method thereof. Background Art
[0002] As a typical labor-intensive industry, the textile industry employs a large number of workers, especially in the process of replacing bobbins in yarn storage automatic winders. According to incomplete statistics, at present, more than 20,000 yarn storage automatic winders in my country still use the method of manually replacing bobbins. Spinning workers patrol back and forth on the winding machine production line. When they find that the number of bobbins at a certain spindle position is insufficient, they need to retrieve the same type of bobbins from the bobbin preparation area and put them into the bobbin storage disc of the spindle position to ensure that the winding process of this spindle position is not interrupted. This method of changing bobbins not only requires textile workers to pay attention to the bobbin usage of each spindle position for a long time, but also requires uninterrupted walking back and forth for inspection. In addition, the winding machine production line is long, with many spindle numbers, and the amount of bobbins to be replaced is large. Summary of the invention
[0003] 1. Technical issues to be resolved
[0004] In view of the shortcomings of the prior art, the present invention provides an intelligent device and method for finding empty storage tube yarn holes based on machine vision, and designs an empty tube detection mechanism integrating an embedded control system and a camera module to meet the real-time detection of the empty tube status of each spindle position by the controller before insertion.
[0005] (II) Technical solution
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a machine vision-based intelligent device for finding empty storage tube yarn holes, which is used to identify the number of tube yarns on the storage tube yarn disk on the winding machine, including a trolley, a camera, and a bracket. The bracket is arranged on the trolley, and a linear slide rail is arranged on the bracket toward the storage tube yarn disk. A linear slider is slidably adapted on the linear slide rail, and a locking piece for locking the linear slider is arranged on the linear slide rail. The middle part of the camera is rotatably connected to the middle part of the linear slider, and the camera corresponds to the tube yarn disk up and down. The linear slider is provided with an angle adjustment mechanism for adjusting the camera angle.
[0007] Preferably, the angle adjustment mechanism includes two concentric arc rails, which are arranged on a linear slider and symmetrically arranged with the camera's rotating axis as the center. An arc slider connected to the camera is slidably adapted in the two arc rails. A ratchet and a ratchet 2 are respectively arranged on the two arc rails along their length directions, and the teeth of the ratchet and the ratchet 2 are in opposite directions. A ratchet and a ratchet 2 that are adapted to the ratchet and the ratchet 2 are respectively hinged on the two arc sliders, and the backs of the ratchet and the ratchet 2 are connected to a fixed point on the arc slider through a spring.
[0008] Preferably, an electromagnet and an electromagnet 2 are provided on the back of the ratchet and the ratchet 2 in the two arc sliders, and the ratchet and the ratchet 2 are made of a magnetic body.
[0009] Preferably, the trolley is provided with a delivery mechanism for changing the tube yarn, the delivery mechanism includes a yarn storage disk, a rotating arm and a support disk, the yarn storage disk is pivotally connected to the trolley, the yarn storage disk is provided with a spindle rod with the same position and number as the tube yarn on the tube yarn storage disk, the tube yarn is inserted on the spindle rod, one end of the rotating arm is rotatably connected to the trolley, the support disk is pivotally connected to the other end of the rotating arm, the rotating arm can bring the support disk from above the yarn storage disk to above the tube yarn storage disk, a plurality of suction cups corresponding to the tube yarn on the yarn storage disk are provided at the bottom of the support disk, an air valve connected to the plurality of suction cups one by one is provided at the top of the support disk, and the air valve is connected to an air source.
[0010] Preferably, the locking member is a locking bolt, which is threadedly connected to the linear slide rail and corresponds to the linear slider.
[0011] A method for intelligently finding yarn holes in empty storage tubes based on machine vision, characterized in that it comprises the following steps:
[0012] Step 1, preparation stage, the preparation stage mainly includes four links: learning, adjustment, block localization, and correction. The preparation stage roughly determines the profile and size of the storage tube yarn disc, storage tube yarn hole, and bobbin; its main process is carried out in sequence from process a (learning link), process b (adjustment link), process c (block localization link), and process d (correction link);
[0013] Process a: (function: roughly determine the radius of the tube yarn storage disk, the radius of the tube yarn storage hole, and the center distance between the tube yarn storage hole and the tube yarn storage disk within the imaging range);
[0014] Step 1, adjust the camera position, jump to step 2;
[0015] Step 2, initialize the camera sensor parameters and shoot, then jump to step 3;
[0016] Step 3, using Hough transform to identify the characteristic circle of the imaging range, and then jumping to step 4;
[0017] Step 4, according to the radius of the characteristic circle, distinguish the bobbin yarn storage disc and the bobbin yarn storage hole from the various characteristic circles, and save the radius of the bobbin yarn storage disc and the radius of the bobbin yarn storage hole, and jump to step 5;
[0018] Step 5, according to the identified radius of each storage tube yarn hole, calculate its average value; according to the center position of each storage tube yarn hole and the storage tube yarn disk corresponding to the characteristic circle, calculate the average value of the center distance between the storage tube yarn hole and the storage tube yarn disk, and jump to step 6;
[0019] Step 6, process a (learning phase) ends, process b (adjustment phase) begins, jump to step 7;
[0020] Process b: (Function: determine the maximum and minimum values of the storage tube yarn hole filtering parameters);
[0021] Step 7, according to the mean value of the diameter of the yarn storage tube hole determined in process a, roughly adjust the radius range of the yarn storage tube hole, set the maximum and minimum values of the yarn storage tube hole filtering parameters, and jump to step 8;
[0022] Step 8, according to the radius of each storage tube yarn hole determined in process a, carefully adjust the radius range of the storage tube yarn hole, so that each storage tube yarn hole radius is within the set storage tube yarn hole filter parameter maximum and minimum values, and is limited to the deviation range Eg, and jump to step 9;
[0023] Step 9, process b (adjustment phase) ends, process c (block localization phase) begins, and jump to step 10;
[0024] Process c: (Function: Display the characteristic circle information obtained in processes a and b by drawing, so as to facilitate the correction of process d (after actual installation, the camera plane is not completely square and there is a certain angle difference));
[0025] Step 10, drawing the outer contour of the tube yarn storage disk according to the radius and center position of the tube yarn storage disk obtained in process a, and jumping to step 11;
[0026] Step 11, according to the average value of the yarn storage hole radius and the average value of the center distance obtained in process a, draw the first yarn storage hole just above the center of the yarn storage hole, the radius is the average value of the yarn storage hole radius obtained in process a, and the center distance is the average value of the center distance obtained in process a. Jump to step 12;
[0027] Step 12, with the center of the drawn tube yarn storage disc as the rotation center, draw the remaining 8 tube yarn storage holes in sequence at intervals of 40° (taking the nine-hole tube yarn storage disc as an example), and the center distance and radius are consistent with the first tube yarn storage hole drawn. Jump to step 13;
[0028] Step 13, process c (block localization phase) ends, process d (correction phase) begins, and jump to step 14;
[0029] Process d: (functions: 1. making the imaging plane angle square, 2. making the drawn storage tube yarn hole inside the actual storage tube yarn hole);
[0030] Step 14, compare the angle deviation between the yarn storage disk and the actual imaging range drawn in process c, fine-tune the camera angle, and jump to step 15;
[0031] Step 15, comparing the deviation between the drawn storage tube yarn hole and the actual storage tube yarn hole, fine-tuning the drawn storage tube yarn hole so that the drawn storage tube yarn hole is inside the actual storage tube yarn hole, and then jumping to step 16;
[0032] Step 16, the preparation phase ends;
[0033] Step 2: Real-time processing flow of air traffic control detection; mainly includes main program, subprogram 1, subprogram 2 and auxiliary program;
[0034] Main program: used to identify the tube yarn storage disc and feed back the empty tube detection result obtained by subprogram 1 to the controller;
[0035] Step 1-1, when an external interrupt signal is detected, execute step 1-2, otherwise continue to wait at step 1-1;
[0036] Step 1-2, take a photo, jump to step 1-3;
[0037] Step 1-3, set the Hough circle detection threshold point and the radius range of the yarn storage disk (based on the preparation stage), and jump to step 1-4;
[0038] Step 1-4, identify the yarn storage disc, and jump to step 1-5;
[0039] Step 1-5, when the tube yarn storage disk is identified, the program jumps to step 2-1; otherwise, when the number of shots does not exceed 3, jump to step 1-2, otherwise the main program ends (the empty tube detection algorithm at this spindle position fails);
[0040] Step 1-6, determine whether the result of running subroutine 1 returns 0xffff, if so, the main program ends, and the empty pipe detection algorithm for this spindle position fails), if not, the empty pipe detection result of the running result of subroutine 1 is sent to the controller, and jump to step 1-7;
[0041] Step 1-7, the main program ends;
[0042] Subroutine 1: Identify the yarn hole of the storage tube;
[0043] Step 2-1, set the Hough circle detection threshold point, the storage tube yarn hole radius range (based on the preparation stage) and the algorithm detection range (within the storage tube yarn disk contour range obtained in step 1-4), and jump to step 2-2;
[0044] Step 2-2, sequentially comparing the center coordinates and radius of the identified storage tube yarn hole with the center coordinates and radius of the 9 storage tube yarn holes obtained in the preparation stage. If the error of the current storage tube yarn hole is less than 2 pixels, it is considered that the current storage tube yarn hole has been identified and is at the corresponding position 1, and jumps to step 2-3;
[0045] Step 2-3, whether step 2-2 is repeated 9 times, if yes, jump to step 2-4, if no, jump to step 2-2;
[0046] Step 2-4, if the number set to 1 is equal to 9, jump to subroutine 2 step 3-1; otherwise return 0xffff to the main program and jump to step 1-6;
[0047] Step 2-5, pass the result returned by subroutine 2 to the main program, jump to step 1-6, and subroutine 1 ends;
[0048] Subroutine 2: Identify whether there is a bobbin in the bobbin storage hole;
[0049] Step 3-1, set the Hough circle detection threshold point and algorithm detection range (one of the storage tube yarn hole contour ranges obtained in step 2-2), and jump to step 3-2;
[0050] Step 3-2, identify whether there is a characteristic circle that meets the conditions within the current detection range (the deviation between the center coordinate position and the current storage tube yarn hole is not less than 2 pixels, and the radius deviation exceeds 5 pixels). If it meets the conditions, jump to step 3-3; if not, jump to step 3-4;
[0051] Step 3-3, set the detection result of this bit to 1, jump to step 3-1, and perform empty pipe detection on the next detection range (9 times this time, jump to step 3-6 after 9 times);
[0052] Step 3-4, jump to step 3-2, repeat detection of the position (the maximum number of repetitions does not exceed 3), if the number of repetitions exceeds 3 and still cannot be identified, jump to step 4-1;
[0053] Step 3-5, determine whether the auxiliary program returns 1, if so, jump to step 3-3, if not, jump to step 3-6;
[0054] Step 3-6, return the ATC identification result to subroutine 1, jump to step 2-5, and subroutine 2 ends;
[0055] Auxiliary program: assist in identifying whether there is bobbin yarn in the bobbin yarn storage hole from the perspective of color;
[0056] Step 4-1, extract all colors from the color library and jump to step 4-2;
[0057] Step 4-2, determine whether there is a color block within the current detection range (one of the storage tube yarn hole contour ranges obtained in step 2-2), if yes, return 1 to subroutine 2, and jump to step 3-5 and step 4-4 in sequence; otherwise, return 0 to subroutine 2, and jump to step 3-5 and step 4-3 in sequence;
[0058] Step 4-3, if the bobbin actually exists but the color does not exist in the color library, the color can be learned and stored in the color library, and then jump to step 4-4;
[0059] Step 4-4, the auxiliary function ends.
[0060] (III) Beneficial effects
[0061] The present invention provides an intelligent device and method for finding yarn holes in a storage tube based on machine vision. It has the following beneficial effects:
[0062] 1. The intelligent device and method for finding empty storage tube yarn holes based on machine vision is that the trolley performs reciprocating inspection work on the winding machine production line. Based on the program set by the camera, when the camera detects that the number of tube yarns in a certain spindle storage tube yarn disc is less than the set value, it reminds the worker or uses the delivery mechanism to load the missing tube yarn into the corresponding storage tube yarn disc. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is a schematic diagram of the camera and the yarn storage disc of the present invention;
[0064] Figure 2 It is an axonometric view of the trolley of the present invention;
[0065] Figure 3 It is a schematic diagram of the angle adjustment mechanism of the present invention;
[0066] Figure 4 A cross-sectional view of the circular arc rail and the circular arc slider of the present invention;
[0067] Figure 5 A top view of the tube yarn storage disc of the present invention;
[0068] Figure 6 It is a flow chart of the learning process of the present invention;
[0069] Figure 7 It is a schematic diagram of the flow of the adjustment link of the present invention;
[0070] Figure 8 It is a schematic diagram of the process of the block localization link of the present invention;
[0071] Fig. 9 It is a schematic diagram of the correction process of the present invention;
[0072] Fig.10 This is a schematic diagram of the main program of the real-time processing flow of empty pipe detection of the present invention;
[0073] Fig.11 It is a schematic diagram of the empty pipe detection real-time processing flow subroutine 1 of the present invention;
[0074] Fig.12It is a schematic diagram of the empty pipe detection real-time processing flow subroutine 2 of the present invention;
[0075] Fig.13 A schematic diagram of an auxiliary program for real-time processing of empty pipe detection according to the present invention;
[0076] Fig.14 It is a schematic diagram showing the Hough circle detection principle of the present invention.
[0077] In the figure: 1 bobbin yarn storage disc, 2 trolley, 3 camera, 4 bracket, 5 linear slide rail, 6 linear slider, 7 angle adjustment mechanism, 71 arc rail, 72 arc slider, 73 ratchet, 74 pawl, 75 spring, 76 electromagnet, 73′ ratchet second, 74′ pawl second, 76′ electromagnet second, 8 yarn storage disc, 9 bobbin yarn, 10 rotating arm, 11 supporting disc, 12 suction cup, 13 air valve, 14 locking bolt. DETAILED DESCRIPTION
[0078] The embodiment of the present invention provides an intelligent device and method for finding yarn holes in empty storage tubes based on machine vision, such as Figure 1-14 As shown, it is used to identify the number of bobbins 9 on the bobbin storage disc 1 on the winding machine, including a trolley 2, a camera 3, and a bracket 4. The bracket 4 is arranged on the trolley 2. A linear slide 5 is arranged on the bracket 4 toward the bobbin storage disc 1. A linear slider 6 is slidably adapted on the linear slide 5. A locking member for locking the linear slider 6 is arranged on the linear slide 5. The locking member is a locking bolt 14. The locking bolt 14 is threadedly connected to the linear slide 5 and corresponds to the linear slider 6. The cooperation between the linear slider 6 and the linear slide 5 is used to adjust the horizontal distance between the camera 3 and the bobbin storage disc 1.
[0079] like Figure 3 As shown, the middle part of the camera 3 is rotatably connected to the middle part of the linear slider 6 , the camera 3 corresponds to the tube yarn storage disc 1 up and down, and the linear slider 6 is provided with an angle adjustment mechanism 7 for adjusting the angle of the camera 3 .
[0080] like Figure 4 As shown, the angle adjustment mechanism 7 includes two concentric circular arc rails 71, which are arranged on the linear slider 6 and symmetrically arranged with the rotation axis of the camera 3 as the center. The two circular arc rails 71 are slidably adapted with circular arc sliders 72 connected to the camera 3, and the circular arc sliders 72 can slide along the arc direction of the circular arc rails 71. The two circular arc rails 71 are respectively provided with ratchet teeth 73 and ratchet second 73' along their length direction, and the teeth of the ratchet teeth 73 and ratchet second 73' are in opposite directions. The two circular arc sliders 72 are respectively hinged with ratchet pawls 74 and ratchet second 74' adapted to the ratchet teeth 73 and ratchet second 73', and the backs of the ratchet pawls 74 and ratchet second 74' are connected to the fixed points on the circular arc sliders 72 through springs 75.
[0081] Electromagnets 76 and second electromagnets 76' are arranged on the backs of the ratchet 74 and second ratchet 74' in the two arc sliders 72. The ratchet 74 and second ratchet 74' are made of magnetic material. Both the electromagnets 76 and second electromagnets 76' are connected to the controller.
[0082] like Figure 4 As shown, the tooth directions of the ratchet 73 and the second ratchet 73' on the two circular arc rails 71 are set to be opposite. When adjusting the angle of the camera 3, if the angle of the camera 3 needs to be adjusted clockwise, it is only necessary to energize the second electromagnet 76' to cause the second ratchet 74' to disengage from the second ratchet 73', and the ratchet 73 and the ratchet 74 are used to make the camera 3 only rotate clockwise, and the camera 3 will not rewind when the adjustment is completed. If the angle of the camera 3 needs to be adjusted counterclockwise, it is only necessary to energize the electromagnet 76 to cause the ratchet 74 to disengage from the ratchet 73, and the ratchet 73' and the second ratchet 74' are used to make the camera 3 only rotate counterclockwise, and the camera 3 will not rewind when the adjustment is completed.
[0083] The trolley 2 is provided with a delivery mechanism for replacing the cop yarn 9, and the delivery mechanism includes a yarn storage disc 8, a rotating arm 10 and a supporting disc 11. The yarn storage disc 8 is pivotally connected to the trolley 2, and a motor connected to the yarn storage disc 8 is provided in the trolley 2 for driving the yarn storage disc 8 to rotate. The yarn storage disc 8 is provided with a spindle rod with the same position and number as the cop yarn 9 on the tube yarn storage disc 1, and the cop yarn 9 is inserted on the spindle rod. How to load the cop yarn 9 on the yarn storage disc 8 is not the center of this case, and the cop yarn 9 can be loaded on the spindle rod on the yarn storage disc 8 by grabbing with a mechanical arm. One end of the rotating arm 10 is rotatably connected to the trolley 2, and a motor connected to the rotating shaft of the rotating arm 10 is provided in the trolley 2 for driving the rotating arm 10 to rotate. The support plate 11 is pivotally connected to the other end of the rotating arm 10. The rotating arm 10 can bring the support plate 11 from above the yarn storage plate 8 to above the tube yarn storage disc 1. The bottom of the support plate 11 is provided with a plurality of suction cups 12 corresponding to the tube yarns 9 on the yarn storage plate 8. The top of the support plate 11 is provided with an air valve 13 connected to the plurality of suction cups 12. The air valve 13 is connected to the air source. In this embodiment, the number of tube yarns 9 on the yarn storage plate 8, the number of suction cups 12, and the number of tube yarn storage holes 15 on the tube yarn storage disc 1 are all 9. The air valve 13 and each motor are connected to the controller.
[0084] When the camera 3 detects the number of missing tube yarns 9 in the tube yarn storage holes 15 on the tube yarn storage disk 1, the data is transmitted to the controller, and the controller sends a command, and the rotating arm 10 drives the support disk 11 to rotate to the top of the yarn storage disk (8). Using the detected data, the corresponding air valve 13 is controlled to open, and the suction cup 12 absorbs the tube yarn 9 on the support disk 11, and then the support disk 11 is driven to the top of the corresponding tube yarn storage disk 1 by the rotating arm 10, and the air valve 13 is closed, and the suction cup 12 releases the tube yarn 9, so that the tube yarn 9 falls into the corresponding vacant tube yarn storage hole 15 of the tube yarn storage disk 1.
[0085] A method for intelligently finding yarn holes in empty storage tubes based on machine vision comprises the following steps:
[0086] Step 1, such as Figure 6-9 As shown, the preparation stage, the role of the preparation link: when the visual inspection program is actually running, the preparation stage mainly includes four links: learning, adjustment, block localization, and correction. The preparation stage roughly determines the information such as the tube yarn storage disk 1, the tube yarn storage hole 15, the outline and size of the tube yarn, and determines the height position of the camera 3 and the tube yarn storage disk 1, the imaging range of the camera 1, the imaging angle of the camera 1, etc. Through this information obtained in the preparation stage, the relevant processing range threshold can be set in the classification processing stage, so as to reduce the running time of the classification processing link. For details, please see the content of the article; its main process is carried out in sequence from process a (learning link), process b (adjustment link), process c (block localization link), and process d (correction link);
[0087] Process a: Figure 6 As shown, (function: roughly determine the radius of the tube yarn storage disc 1, the radius of the tube yarn storage hole 15, and the center distance between the tube yarn storage hole 15 and the tube yarn storage disc 1 within the imaging range); in the figure: is the mean value of the diameter of the yarn hole in the storage tube; is the mean distance between the centers of the circles; g min , g max g are the minimum and maximum values of the filter radius of the storage tube yarn hole respectively; i is the radius of the i-th storage tube yarn hole; Eg is the offset value of the storage tube yarn hole filter radius; x0 and y0 are the horizontal and vertical coordinates of the center of the storage tube yarn disk respectively; β is the camera plane rotation angle; e is the allowable rotation angle deviation. i The radius of the yarn hole of the i-th storage tube can be set.
[0088] Step 1, adjust the position of camera 3, and jump to step 2;
[0089] Step 2, initialize the camera sensor parameters and shoot, then jump to step 3; O1
[0090] Step 3, using Hough transform to identify the characteristic circle of the imaging range, and then jumping to step 4;
[0091] Step 4, according to the radius of the characteristic circle, distinguish the tube yarn storage disc 1 and the tube yarn storage hole 15 from various characteristic circles, and save the radius of the tube yarn storage disc 1 and the radius of the tube yarn storage hole 15, and jump to step 5;
[0092] Step 5, according to the identified radii 15 of each storage tube yarn hole, find the average value thereof; according to the center positions of the characteristic circles corresponding to each storage tube yarn hole 15 and the storage tube yarn disk 1, find the average value of the center distance between the storage tube yarn hole 15 and the storage tube yarn disk 1, and jump to step 6;
[0093] Step 6, process a (learning phase) ends, process b (adjustment phase) begins, jump to step 7;
[0094] Process b: Figure 7 As shown, (function: determine the maximum and minimum values of the storage tube yarn hole filtering parameters);
[0095] Step 7, according to the mean value of the radius of the storage tube yarn hole 15 determined in process a, roughly adjust the radius range of the storage tube yarn hole 15, set the maximum and minimum values of the filtering parameters of the storage tube yarn hole 15, and jump to step 8;
[0096] Step 8, according to the radius of each storage tube yarn hole 15 determined in process a, carefully adjust the radius range of the storage tube yarn hole 15, so that the radius of each storage tube yarn hole 15 is within the set maximum and minimum values of the storage tube yarn hole 15 filtering parameters and is limited within the deviation range Eg, and jump to step 9;
[0097] Step 9, process b (adjustment phase) ends, process c (block localization phase) begins, and jump to step 10;
[0098] The Hough circle detection principle is used to obtain information such as the radius and center of the tube yarn storage disk 1, the radius, center, center distance and radius filtering parameters of each tube yarn storage hole 15 in the current image. The Hough circle detection principle is as follows: Fig.13 As shown in the figure: O1, O2, O3 are three arbitrary points in the XY plane, and their coordinates are (u x ,u y ), (v x ,v y ), (w x ,w y ), O m is the center of the Hough circle.
[0099] Taking point O1 as an example, the equations of the centers of all circles passing through O1 are:
[0100] a, b, and R are the horizontal coordinate, vertical coordinate, and radius of the center of the circle passing through point O1, respectively. θ is the angle between the center (a, b), point O1, and the X-axis, and its value range is (0, 360). Assuming that R is a fixed value, the trajectory of the center of all circles passing through point O1 in the XY plane is as follows: Fig.13 As shown in the dashed box on the left above, similarly, the center trajectories of all circles passing through points O2 and O3 are as follows Fig.13 As shown in the middle dashed box in the upper middle and the dashed box on the upper right, the three circular dashed boxes intersect at O m Point, so we can get point O1, O2, O3 in O mThe Hough circle is centered on the image and R is the radius (as shown in the black solid line). The more points detected on the image are on the Hough circle, the higher the accuracy of the Hough circle. Therefore, the accuracy of the Hough circle can be controlled by setting the point count threshold.
[0101] Process c: Figure 8 As shown, (function: to display the characteristic circle information obtained in process a and b by drawing, so as to facilitate the correction of process d (after actual installation, the camera plane is not completely square and there is a certain angle difference));
[0102] Step 10, according to the radius and center position of the tube yarn storage disk 1 obtained in process a, draw the outer contour of the tube yarn storage disk 1, and jump to step 11;
[0103] Step 11, according to the average radius of the storage tube yarn hole 15 and the average center distance obtained in process a, draw the first storage tube yarn hole 15 just above the center of the storage tube yarn hole 15, the radius is the average radius of the storage tube yarn hole 15 obtained in process a, and the center distance is the average center distance obtained in process a. Jump to step 12;
[0104] Step 12, taking the center of the drawn tube yarn storage disc 1 as the rotation center, draw the remaining 8 tube yarn storage holes 15 in sequence at intervals of 40° (taking the nine-hole tube yarn storage disc 1 as an example), and the center distance and radius are consistent with the drawn first tube yarn storage hole 15. Jump to step 13;
[0105] Step 13, process c (block localization phase) ends, process d (correction phase) begins, and jump to step 14;
[0106] Process d: Fig. 9 As shown, (functions: 1. making the imaging plane angle square, 2. making the drawn storage tube yarn hole 15 inside the actual storage tube yarn hole 15);
[0107] Step 14, compare the angle deviation between the yarn storage disk 1 and the actual imaging range drawn in process c, fine-tune the angle of the camera 3, and jump to step 15;
[0108] Step 15, comparing the deviation between the drawn storage tube yarn hole 15 and the actual storage tube yarn hole 15, fine-tuning the drawn storage tube yarn hole 15, so that the drawn storage tube yarn hole 15 is inside the actual storage tube yarn hole 15, and jumping to step 16;
[0109] Step 16, the preparation phase ends;
[0110] Among them, the block localization link mainly divides the effective area of each empty tube detection algorithm within the 9 tube yarn storage holes 15 in the tube yarn storage disk 1, and eliminates the interference of color blocks outside the effective area on calculation and analysis.
[0111] In addition, when the camera 3 is fixed on the vertical bracket 4, due to manual installation errors, the plane of the camera 3 has an angle deflection. Therefore, a correction link is designed to visualize the deviation between the 9 storage tube yarn holes 15 drawn by the block localization link and the actual 9 storage tube yarn imaging holes, so that the installation and debugging personnel can realize the correction of the camera 3 plane deflection angle and the radius that can be set for the i-th storage tube yarn hole 15, providing good preparation conditions for the next batch of empty tube detection real-time algorithms. The relationship between the coordinates of each storage tube yarn hole center and the camera plane deflection angle β is shown in equations (2) and (3).
[0112]
[0113]
[0114] Where: i is the serial number of the yarn hole in the storage tube, i>1; x i ,y i are the horizontal and vertical coordinates of the center of the yarn hole of the i-th storage tube, m.
[0115] Step 2: After the preparation phase is completed, the camera 3 moves horizontally and linearly with the trolley 2, and performs image processing on the empty tubes at each spindle position. The winding machine empty tube detection and classification processing algorithm is mainly based on the following: Figure 10-13 The process shown in the figure is implemented, in which: C_i, C_m, i, j, k are all counting variables; th_m is the Hough circle point number threshold; r_min, r_max are the minimum and maximum thresholds of the Hough circle radius; P1 is the detection mark variable; roi is the "region of interest" variable; area is the storage tube yarn disk area; area_j is the jth storage tube yarn disk area; x j ,y j , g j The horizontal coordinate, vertical coordinate and radius of the center of the yarn hole of the j-th storage tube obtained by real-time detection, m; x k ,y k , g k The horizontal coordinate, vertical coordinate and radius of the center of the yarn tube in the yarn hole of the kth storage tube are detected in real time, m; N_f and K_f are the results returned by subroutine 2 and auxiliary program; Th(lL, lM, aL, aM, bL, bM) is the color threshold, among which lL and lM are the minimum and maximum thresholds of the brightness "L" parameter in the Lab color model, aL and aM are the minimum and maximum thresholds of the color "a" parameter in the Lab color model, bL and bM are the minimum and maximum thresholds of the color "b" parameter in the Lab color model; th_s is the color threshold setting variable.
[0116] Real-time processing flow of air traffic control detection; mainly includes main program, subprogram 1, subprogram 2 and auxiliary program;
[0117] Main program: such as Fig.10As shown, it is used to identify the tube yarn storage disk 1 and feed back the empty tube detection result obtained by subroutine 1 to the controller; when the trolley 2 runs to the best effective shooting area of the spindle position, the camera external interrupt service program is triggered, and the tube yarn storage disk r obtained in the preparation stage is set p value, accurately set the radius range of the disk in this link, filter the search of other radius length disks, improve the algorithm processing time, and at the same time, based on Fig.13 The Hough circle detection principle and the actual test results of this project are shown. The Hough circle point count threshold is set to 5000, which has a good detection effect. In addition, in order to ensure the stability of the acquisition, up to 3 acquisitions can be made. In this process, only one identification of the storage tube yarn disk outline is required to trigger subroutine 1, realize the next step of storage tube yarn hole identification, and send the identification result to the controller. The specific steps are as follows:
[0118] Step 1-1, when an external interrupt signal is detected, execute step 1-2, otherwise continue to wait at step 1-1;
[0119] Step 1-2, take a photo, jump to step 1-3;
[0120] Step 1-3, set the Hough circle detection threshold point and the radius range of the tube yarn storage disk 1 (based on the preparation stage), and jump to step 1-4;
[0121] Step 1-4, identify the tube yarn storage disc 1, and jump to step 1-5;
[0122] Step 1-5, when the tube yarn storage disk 1 is identified, the program jumps to step 2-1; otherwise, when the number of shots does not exceed 3 times, jump to step 1-2, otherwise the main program ends (the empty tube detection algorithm at this spindle position fails);
[0123] Step 1-6, determine whether the result of running subroutine 1 returns 0xffff, if so, the main program ends, and the empty pipe detection algorithm for this spindle position fails), if not, the empty pipe detection result of the running result of subroutine 1 is sent to the controller, and jump to step 1-7;
[0124] Step 1-7, the main program ends;
[0125] Subroutine 1: Fig.11As shown, the tube yarn hole 15 is identified; similar to the main program link, first set the search radius range and Hough circle number threshold of the tube yarn hole in this link. In addition, this link sets the "region of interest" roi variable to the tube yarn disc area, which can shield the detection of the Hough circle in the imaging area outside the tube yarn disc and improve the speed of the image recognition algorithm. When the coordinates and radius of the center of the identified tube yarn hole deviate from the corresponding values obtained in the preparation stage by no more than 2 pixels, it can be determined that the tube yarn hole has been identified. Poll 9 times. When the P1 value is 0x1ff, it means that all 9 holes in the tube yarn disc have been identified. Subroutine 2 can be triggered to realize the next step of empty tube detection in the tube yarn hole. Otherwise, the P1 value is set to 0xffff and returned to the main program to end the real-time processing algorithm for empty tube detection of this winding machine. When the P1 value is 0xffff in most cases, it is necessary to observe whether the installation position of the empty tube detection mechanism is offset or whether the vibration amplitude of the intubation robot is too large, and the recognition probability of the storage tube yarn hole in this link can be improved by appropriately increasing the deviation pixel. The specific steps are as follows:
[0126] Step 2-1, set the Hough circle detection threshold point, the radius range of the tube yarn hole 15 (based on the preparation stage) and the algorithm detection range (within the contour range of the tube yarn disk 1 obtained in step 1-4), and jump to step 2-2;
[0127] Step 2-2, sequentially comparing the center coordinates and radius of the identified storage tube yarn hole 15 with the center coordinates and radius of the 9 storage tube yarn holes 15 obtained in the preparation stage. If the error of the current storage tube yarn hole 15 is less than 2 pixels, it is considered that the current storage tube yarn hole 15 has been identified and is at the corresponding position 1, and jumps to step 2-3;
[0128] Step 2-3, whether step 2-2 is repeated 9 times, if yes, jump to step 2-4, if no, jump to step 2-2;
[0129] Step 2-4, if the number set to 1 is equal to 9, jump to subroutine 2 step 3-1; otherwise return 0xffff to the main program and jump to step 1-6;
[0130] Step 2-5, pass the result returned by subroutine 2 to the main program, jump to step 1-6, and subroutine 1 ends;
[0131] Subroutine 2: Fig.12As shown, identify whether there is a bobbin 9 in the bobbin storage hole 15; similar to the main program link and subroutine 1 link, first set the search radius range of the kth bobbin and the Hough point number threshold of this link. When the coordinates and radius of the center of the kth bobbin obtained in the jth bobbin storage hole are found to deviate from the corresponding values of the jth bobbin storage hole obtained in the subroutine 1 link by no more than 2 pixels, it can be determined that there is a bobbin in the bobbin storage hole. Due to the complex environment of the winding production link and the changeable bobbin profile characteristics, this link can be processed up to 3 times. If the bobbin is not captured in the 3 identifications, the auxiliary program can be selectively used for identification, and the cycle is repeated 9 times to complete the real-time detection of the 9 bobbin storage holes, and the empty tube status identification result in the bobbin storage disc is fed back to the subroutine 1, and then passed to the main program. The specific steps are as follows:
[0132] Step 3-1, set the Hough circle detection threshold point and algorithm detection range (one of the storage tube yarn holes 15 contour ranges obtained in step 2-2), and jump to step 3-2;
[0133] Step 3-2, identifying whether there is a characteristic circle that meets the conditions within the current detection range (the deviation between the coordinate position of the center of the circle and the current storage tube yarn hole 15 is not less than 2 pixels, and the radius deviation exceeds 5 pixels). If it meets the conditions, jump to step 3-3; if not, jump to step 3-4;
[0134] Step 3-3, set the detection result of this bit to 1, jump to step 3-1, and perform empty pipe detection on the next detection range (9 times this time, jump to step 3-6 after 9 times);
[0135] Step 3-4, jump to step 3-2, repeat detection of the position (the maximum number of repetitions does not exceed 3), if the number of repetitions exceeds 3 and still cannot be identified, jump to step 4-1;
[0136] Step 3-5, determine whether the auxiliary program returns 1, if so, jump to step 3-3, if not, jump to step 3-6;
[0137] Step 3-6, return the ATC identification result to subroutine 1, jump to step 2-5, and subroutine 2 ends;
[0138] Auxiliary programs: such as Fig.13As shown, it assists in identifying whether there is a bobbin 9 in the bobbin storage hole from the perspective of color; this link uses the advantage of visual detection in color recognition, and uses the Lab color model to identify the color of the dye outside the bobbin 9. When the color information stored in the color library is detected in the bobbin storage hole 15, it can be considered that there is a bobbin 9 in the current bobbin storage hole 15, and the recognition result is fed back to subroutine 2. In addition, a winding workshop uses a variety of bobbin yarns 9 due to different types of bobbins to be produced, resulting in a variety of bobbin yarns 9. Therefore, when a new color bobbin 9 appears, the color can be learned and stored in the color library.
[0139] Step 4-1, extract all colors from the color library and jump to step 4-2;
[0140] Step 4-2, determine whether there is a color block within the current detection range (the contour range of one of the storage tube yarn holes 15 obtained in step 2-2), if yes, return 1 to subroutine 2, jump to step 3-5, step 4-4 in sequence; otherwise, return 0 to subroutine 2, jump to step 3-5, step 4-3 in sequence;
[0141] Step 4-3, if the bobbin 9 actually exists but the color does not exist in the color library, the color can be learned and stored in the color library, and then jump to step 4-4;
[0142] Step 4-4, the auxiliary function ends.
[0143] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An intelligent device for finding empty storage tube holes based on machine vision, used for identifying the number of tube yarns (9) on a storage tube yarn disc (1) on a winding machine, characterized in that: The invention comprises a trolley (2), a camera (3), and a bracket (4), wherein the bracket (4) is arranged on the trolley (2), a linear slide rail (5) is arranged on the bracket (4) in the direction of the tube yarn storage disc (1), a linear slider (6) is slidably adapted on the linear slide rail (5), a locking member for locking the linear slider (6) is arranged on the linear slide rail (5), the middle part of the camera (3) is rotatably connected to the middle part of the linear slider (6), the camera (3) corresponds to the tube yarn storage disc (1) in upper and lower positions, and the linear slider (6) is provided with a locking member for adjusting the angle of the camera (3). The angle adjustment mechanism (7) comprises two concentric circular arc rails (71), the two circular arc rails (71) are arranged on the linear slider (6) and are symmetrically arranged with the rotation axis of the camera (3) as the center, the two circular arc rails (71) are slidably adapted with a circular arc slider (72) connected to the camera (3), the two circular arc rails (71) are respectively provided with a ratchet (73) and a second ratchet (73′) along their length direction, the teeth of the ratchet (73) and the second ratchet (73′) are in opposite directions, and the two circular arc sliders (72) are respectively hinged with A ratchet (74) and a second ratchet (74') matched with the ratchet (73) and the second ratchet (73'), the backs of the ratchet (74) and the second ratchet (74') being connected to a fixed point on the arc slider (72) via a spring (75); a delivery mechanism for replacing the bobbin (9) is provided on the trolley (2), the delivery mechanism comprising a yarn storage disk (8), a rotating arm (10) and a support disk (11); the yarn storage disk (8) is pivotally connected to the trolley (2), and the yarn storage disk (8) is provided with spindles having the same position and number as the bobbin (9) on the bobbin storage disk (1). A bobbin (9) is inserted on the spindle rod, one end of the rotating arm (10) is rotatably connected to the trolley (2), the supporting plate (11) is pivotally connected to the other end of the rotating arm (10), the rotating arm (10) can bring the supporting plate (11) from above the yarn storage plate (8) to above the bobbin yarn storage disc (1), a plurality of suction cups (12) corresponding to the bobbin yarns (9) on the yarn storage plate (8) are arranged at the bottom of the supporting plate (11), and an air valve (13) connected to the plurality of suction cups (12) is arranged at the top of the supporting plate (11), and the air valve (13) is connected to an air source.
2. According to claim 1, an intelligent device for finding yarn holes in empty storage tubes based on machine vision is characterized in that: An electromagnet (76) and a second electromagnet (76') are provided on the backs of the ratchet (74) and the second ratchet (74') in the two arc sliders (72); the ratchet (74) and the second ratchet (74') are made of a magnetic body.
3. According to the machine vision-based intelligent device for finding empty yarn holes in storage tubes as claimed in claim 1, it is characterized by: The locking member is a locking bolt (14), which is threadedly connected to the linear slide rail (5) and corresponds to the linear slide block (6).
4. A method for finding yarn holes in an empty storage tube intelligently based on machine vision, characterized in that: The following steps are involved: Step 1: Preparation stage, which mainly includes four steps: learning, adjustment, block localization, and correction; The main process is carried out in sequence from process a (learning phase), process b (adjustment phase), process c (block localization phase), and process d (correction phase); Process a: (Function: roughly determine the radius of the tube yarn storage disk, the radius of the tube yarn storage hole, and the center distance between the tube yarn storage hole and the tube yarn storage disk within the imaging range); Step 1, adjust the camera position, jump to step 2; Step 2, initialize the camera sensor parameters and shoot, then jump to step 3; Step 3, using Hough transform to identify the characteristic circle of the imaging range, and then jumping to step 4; Step 4, according to the radius of the characteristic circle, distinguish the bobbin yarn storage disc and the bobbin yarn storage hole from the various characteristic circles, and save the radius of the bobbin yarn storage disc and the radius of the bobbin yarn storage hole, and jump to step 5; Step 5, according to the identified radius of each storage tube yarn hole, calculate its average value; according to the center position of each storage tube yarn hole and the storage tube yarn disk corresponding to the characteristic circle, calculate the average value of the center distance between the storage tube yarn hole and the storage tube yarn disk, and jump to step 6; Step 6, process a (learning phase) ends, process b (adjustment phase) begins, jump to step 7; Process b: (Function: determine the maximum and minimum values of the storage tube yarn hole filtering parameters); Step 7, according to the mean value of the diameter of the yarn storage tube hole determined in process a, roughly adjust the radius range of the yarn storage tube hole, set the maximum and minimum values of the yarn storage tube hole filtering parameters, and jump to step 8; Step 8, according to the radius of each storage tube yarn hole determined in process a, carefully adjust the radius range of the storage tube yarn hole, so that each storage tube yarn hole radius is within the set storage tube yarn hole filter parameter maximum and minimum values, and is limited to the deviation range Eg, and jump to step 9; Step 9, process b (adjustment phase) ends, process c (block localization phase) begins, jump to step 10; Process c: (Function: Display the characteristic circle information obtained in processes a and b by drawing, so as to facilitate the correction of process d (after actual installation, the camera plane is not completely square and there is a certain angle difference)); Step 10, drawing the outer contour of the tube yarn storage disk according to the radius and center position of the tube yarn storage disk obtained in process a, and jumping to step 11; Step 11, according to the average value of the radius of the yarn hole of the storage tube and the average value of the center distance of the circle obtained in process a, draw the first yarn hole of the storage tube just above the center of the circle of the yarn hole of the storage tube, the radius is the average value of the radius of the yarn hole of the storage tube obtained in process a, and the center distance is the average value of the center distance of the circle obtained in process a; jump to step 12; Step 12, taking the center of the drawn tube yarn storage disk as the rotation center, draw the remaining 8 tube yarn storage holes in sequence at intervals of 40° (taking the nine-hole tube yarn storage disk as an example), and the center distance and radius are consistent with the first tube yarn storage hole drawn; jump to step 13; Step 13, process c (block localization phase) ends, process d (correction phase) begins, and jump to step 14; Process d: (functions:
1. making the imaging plane angle square, 2. making the drawn storage tube yarn hole inside the actual storage tube yarn hole); Step 14, compare the angle deviation between the yarn storage disk and the actual imaging range drawn in process c, fine-tune the camera angle, and jump to step 15; Step 15, comparing the deviation between the drawn storage tube yarn hole and the actual storage tube yarn hole, fine-tuning the drawn storage tube yarn hole so that the drawn storage tube yarn hole is inside the actual storage tube yarn hole, and then jumping to step 16; Step 16, the preparation phase ends; Step 2: Real-time processing flow of air traffic control detection; mainly includes main program, subprogram 1, subprogram 2 and auxiliary program; Main program: used to identify the tube yarn storage disc and feed back the empty tube detection result obtained by subprogram 1 to the controller; Step 1-1, when an external interrupt signal is detected, execute step 1-2, otherwise continue to wait at step 1-1; Step 1-2, take a photo, jump to step 1-3; Step 1-3, set the Hough circle detection threshold point and the radius range of the yarn storage disk (based on the preparation stage), and jump to step 1-4; Step 1-4, identify the yarn storage disc, and jump to step 1-5; Step 1-5, when the tube yarn storage disk is identified, the program jumps to step 2-1; otherwise, when the number of shots does not exceed 3, jump to step 1-2, otherwise the main program ends (the empty tube detection algorithm at this spindle position fails); Step 1-6, determine whether the result of running subroutine 1 returns 0xffff, if so, the main program ends, and the empty pipe detection algorithm for this spindle position fails), if not, send the empty pipe detection result of the running result of subroutine 1 to the controller, and jump to step 1-7; Step 1-7, the main program ends; Subroutine 1: Identify the yarn hole of the storage tube; Step 2-1, set the Hough circle detection threshold point, the storage tube yarn hole radius range (based on the preparation stage) and the algorithm detection range (within the storage tube yarn disk contour range obtained in step 1-4), and jump to step 2-2; Step 2-2, sequentially comparing the center coordinates and radius of the identified storage tube yarn hole with the center coordinates and radius of the 9 storage tube yarn holes obtained in the preparation stage. If the error of the current storage tube yarn hole is less than 2 pixels, it is considered that the current storage tube yarn hole has been identified and is at the corresponding position 1, and jumps to step 2-3; Step 2-3: Is step 2-2 repeated 9 times? If yes, jump to step 2-4; if no, jump to step 2-2; Step 2-4, if the number set to 1 is equal to 9, jump to subroutine 2 step 3-1; otherwise return 0xffff to the main program and jump to step 1-6; Step 2-5, pass the result returned by subroutine 2 to the main program, jump to step 1-6, and subroutine 1 ends; Subroutine 2: Identify whether there is a bobbin in the bobbin storage hole; Step 3-1, set the Hough circle detection threshold point and algorithm detection range (one of the storage tube yarn hole contour ranges obtained in step 2-2), and jump to step 3-2; Step 3-2, identify whether there is a characteristic circle that meets the conditions within the current detection range (the deviation between the center coordinate position and the current storage tube yarn hole is not less than 2 pixels, and the radius deviation exceeds 5 pixels). If it meets the conditions, jump to step 3-3; if not, jump to step 3-4; Step 3-3, set the detection result of the position to 1, jump to step 3-1, and perform empty pipe detection on the next detection range (9 times this time, jump to step 3-6 after 9 times); Step 3-4, jump to step 3-2, repeat detection of the position (the maximum number of repetitions is no more than 3), if the number of repetitions exceeds 3 and still cannot be identified, jump to step 4-1; Step 3-5, determine whether the auxiliary program returns 1, if so, jump to step 3-3, if not, jump to step 3-6; Step 3-6, return the ATC identification result to subroutine 1, jump to step 2-5, and subroutine 2 ends; Auxiliary program: assist in identifying whether there is bobbin yarn in the bobbin yarn storage hole from the perspective of color; Step 4-1, extract all colors from the color library and jump to step 4-2; Step 4-2, determine whether there is a color block within the current detection range (one of the storage tube yarn hole contour ranges obtained in step 2-2), if yes, return 1 to subroutine 2, jump to step 3-5, step 4-4 in sequence; otherwise, return 0 to subroutine 2, jump to step 3-5, step 4-3 in sequence; Step 4-3, if the bobbin actually exists but the color does not exist in the color library, the color can be learned and stored in the color library, and then jump to step 4-4; Step 4-4, the auxiliary function ends.
