A method for identifying the position and posture of cheese yarn

The recognition of the posture of the yarn by image processing technology is solved, and the problem of poor universal recognition in the prior art is achieved, and the accuracy of the identification of the arbitrary posture of the yarn is achieved, which improves the automation level and efficiency of the production line.

CN115753765BActive Publication Date: 2024-12-17DONGHUA UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211418143.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-14
Publication Date
2024-12-17
Estimated Expiration
2042-11-14

AI Technical Summary

Technical Problem

The prior art cannot effectively identify any posture of the cylindrical yarn, resulting in poor universal recognition and the inability to realize a fully automated cylindrical production line.

Method used

By taking images from above the cylindrical yarn, a two-dimensional continuous coordinate system is established, and the outer contour of the largest connecting domain in the image matches the shape of the smallest circumference circle. Combined with the Hu moment constant moment to calculate the similarity, the cylindrical yarn is determined. The shape characteristics of the yarn barrel are obtained through mean filtering, threshold segmentation and connection domain analysis, and the size and rotation angle of the yarn barrel are determined by judging the direction and rotation angle of the yarn barrel.

Benefits of technology

It realizes accurate identification of arbitrary postures of the yarn, reduces the failure rate, improves the recognition speed and efficiency, simplifies the equipment structure, and reduces friction damage. It is suitable for yarns of various sizes and colors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115753765B_ABST
    Figure CN115753765B_ABST
Patent Text Reader

Abstract

The invention relates to a method for identifying the posture of a cheese yarn. During the conveying process of the cheese yarn, the cheese yarn is photographed from above to obtain an image containing the complete cheese yarn, a two-dimensional continuous coordinate system 0-UV is established, the image is processed to obtain a connected domain with the largest area in the image, that is, the outer contour of the maximum connected domain, and the outer contour of the maximum connected domain is matched with the minimum circumscribed circle of the maximum connected domain. If the similarity is higher than a threshold value I, it is determined that the cheese yarn is in an upright placement state; otherwise, it is determined that the cheese yarn is in a lying placement state. The method provided by the invention is universal, simple and can accurately identify the posture of the cheese yarn.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of textile equipment automation and relates to a method for identifying the position and posture of cheese yarn. Background Art

[0002] With the rapid development of my country's textile industry, the market has higher requirements for automation and intelligence in the textile industry. High-speed, high-efficiency and new technology applications in production methods have become the future development direction of the textile industry. Most companies sort cheese production lines manually or semi-automatically, which takes up a lot of human resources and is not conducive to information management and control. The factory's working environment is also harmful to the human body. It is very important to study a method for fully automatic identification of cheese posture.

[0003] Patent CN208132973U discloses a variable-pitch yarn grabbing robot device. An integral variable-pitch slide is installed on the front wrist of the robot, which can realize the variable horizontal and vertical spacing of multiple yarn grabbing clamps. The camera installed at the end of the robot controls the spacing to adjust the spacing, thereby realizing one-time grabbing of multiple bobbins. However, this method can only be applied to bobbins in upright or inverted postures, which increases the difficulty of designing a mechanical device that cooperates with the robot and has low general applicability.

[0004] Patent CN212314884U discloses a cheese yarn clamping mechanism based on image processing. The clamping structure includes a clamping jaw assembly, a camera, and a laser sensor. The clamping jaw utilizes the three-jaw centering clamping principle in conjunction with image processing and sensors to achieve centering and clamping of the yarn tube. However, this method is also only applicable to cheese yarn in upright and inverted postures, and cannot be applied to cheese yarn in lying postures, etc., and has poor universality.

[0005] Therefore, it is very important to study a universal, simple and accurate method to identify the position of package yarn without human intervention. Summary of the invention

[0006] Aiming at the problem of poor universality of existing cheese yarn recognition, the present invention provides a method for recognizing arbitrary postures of cheese yarns in combination with image processing.

[0007] A method for identifying the posture of a cheese yarn, during the cheese yarn conveying process, photographing from above the cheese yarn to obtain an image containing the complete cheese yarn, establishing a two-dimensional continuous coordinate system 0-UV, and then processing the image to obtain the connected domain with the largest area in the image, that is, the outer contour of the maximum connected domain, and matching the outer contour of the maximum connected domain with the minimum circumscribed circle of the maximum connected domain. If the similarity is higher than a threshold value I, it is determined that the cheese yarn is in an upright placement state; otherwise, it is determined that the cheese yarn is in a lying placement state;

[0008] The origin of the two-dimensional continuous coordinate system 0-UV coincides with the origin of the image coordinate system, and the U axis and V axis coincide with the x axis and y axis of the image coordinate system respectively and have the same direction;

[0009] The similarity calculation formula is as follows:

[0010]

[0011] In the formula, I(A,B) represents the similarity; i represents the code of the invariant moment in the Hu moment; The i-th invariant moment in the Hu moment representing the outer contour of the largest connected domain; The i-th invariant moment in the Hu moment representing the minimum circumscribed circle of the maximum connected domain;

[0012] The method for determining the threshold I is: test the package yarn in the upright state w times, obtain w corresponding similarities, and find the minimum value At the same time, test the cheese yarn in the lying state w times, obtain w corresponding similarities, and find the maximum value calculate and The threshold value I is obtained by taking the average value of , where w≥100. The shape of the cheese yarn is circular when standing upright and is trapezoidal when lying down. The similarity between the outer contour of the maximum connected domain and the circumscribed circle of the maximum connected domain when standing upright is higher than that when lying down. Because cheese yarns have various sizes and shapes, the similarity values ​​of different cheese yarns with the circumscribed circle when standing upright and lying down will fluctuate. In order to make the set threshold value I adapt to cheese yarns of various sizes and shapes, different cheese yarns are tested multiple times to find the range of value fluctuations. The minimum value of the similarity fluctuation when standing upright must be higher than the maximum value of the fluctuation when lying down. The middle value between the two can distinguish between standing upright and lying down.

[0013] As the preferred technical solution:

[0014] In the method for identifying the cheese posture as described above, an industrial camera, such as a CMOS camera, is used for shooting.

[0015] In the method for identifying the cheese posture as described above, the steps for obtaining the maximum connected domain are as follows:

[0016] (a) Perform mean filtering on the image to remove image noise and texture information while retaining contour information;

[0017] (b) Perform threshold segmentation on the image, set threshold II, convert the pixel points with values ​​less than threshold II in the image to 0, and convert the other pixel points to 255, to obtain a binary image; threshold II is related to the pixel value of the platform where the cheese yarn is placed and the pixel value of the cheese yarn. If the cheese yarn is placed on a dark platform, the pixel value of the platform is less than 30, and the pixel value of the cheese yarn is greater than 30, then threshold II is 30;

[0018] (c) Perform a connected domain analysis on the binary image to find out the connected domains with pixel values ​​of 255 in the binary image, number each connected domain, calculate the area of ​​each connected domain, filter out the largest connected domain and retain it, and remove other connected domains. The retained connected domain is the complete area of ​​the cheese yarn, and the removed one is the interference information in the binary image.

[0019] In the method for identifying the cheese posture as described above, a 5×5 mean filter is used for mean filtering, and the number of mean filtering is 5 times.

[0020] In the method for identifying the cheese posture as described above, the process of obtaining the outer contour of the maximum connected domain is: searching the outer contour of the maximum connected domain, recording the outermost contour of the maximum connected domain in the form of point set coordinates (x, y), and obtaining the outer contour of the maximum connected domain.

[0021] In the above method for identifying the cheese posture, before the outer contour of the maximum connected domain is matched with the minimum circumscribed circle of the maximum connected domain, the image is processed to obtain the center point O(u o ,v0), this point is used to indicate the position of the cheese yarn;

[0022] The center point of the largest connected region O(u o ,v0) is obtained by setting the pixel values ​​of the area outside the largest connected domain in the image to 0 and calculating the quality m of the largest connected domain. The formula is as follows:

[0023]

[0024] u o The calculation formula is as follows:

[0025]

[0026] v o The calculation formula is as follows:

[0027]

[0028] Among them, x s and s are the x-axis and y-axis dimensions of the image respectively, and n(x,y) is the value of the image pixel (x,y).

[0029] According to the method for identifying the position and posture of the package yarn, after determining that the package yarn is in an upright position, the orientation of the large and small ends of the package yarn is also determined. The specific method is: calculating the inner contour area of ​​the maximum connected domain and comparing it with the threshold value III. If the inner contour area is greater than the threshold value III, it is determined that the package yarn is in a state where the large end is on the top; otherwise, it is determined that the package yarn is in a state where the small end is on the top.

[0030] The method for determining threshold III is as follows: photograph the big end and the small end of the cheese yarn respectively to obtain images a and b, and then process images a and b respectively to obtain the inner contour area of ​​their respective maximum connected domains, and then take the average value to obtain threshold III; the calculation of threshold III belongs to the parameter setting stage, which only needs to be set once and is not within the formal identification process of the cheese yarn; wherein, the cheese yarn is composed of a yarn tube and the yarn wound on the yarn tube, and its appearance is a truncated cone with large and small heads. The yarn tube of the cheese yarn is hollow, and the connected domain will have an inner contour. The big end of the yarn tube is larger than the small end, so the area of ​​the inner contour of the connected domain of the big end and the small end is different, and the middle value is taken for distinction. In addition, it is noted that the taper of the yarn tube size of cheese yarns of different sizes is the same, so there is no need to conduct multiple tests.

[0031] In the method for identifying the cheese posture as described above, the steps of calculating the inner contour area of ​​the maximum connected domain are as follows:

[0032] (i) Searching for the contour of the largest connected domain, recording the innermost contour of the largest connected domain in the form of point set coordinates (x, y), and obtaining the inner contour of the largest connected domain;

[0033] (ii) The inner contour area of ​​the largest connected domain is calculated based on the inner contour of the largest connected domain.

[0034] The above method for identifying the position of the cheese yarn, after determining that the cheese yarn is in a lying position, also calculates the rotation angle of the cheese yarn. The specific method is: using Hough line transform to perform a straight line search on the outer contour of the maximum connected domain to extract the two waistlines of the cheese yarn, calculate the intersection point S of the two waistlines, and the intersection point S and the center point O (u o ,v0) The angle with the positive direction of the U axis of the coordinate system is the rotation angle of the cheese yarn.

[0035] A method for identifying the position and posture of a cheese yarn as described in any of the above items, the overall process is as follows:

[0036] (1) Obtaining an image of cheese yarn;

[0037] (2) Establish a two-dimensional continuous coordinate system 0-UV for the image;

[0038] (3) Processing the image to obtain the outer contour of the largest connected domain in the image;

[0039] (4) Process the image to obtain the center point O(u o ,v0);

[0040] (5) judging whether the cheese yarn is in an upright position or in a lying position based on the outer contour; if it is in an upright position, proceeding to step (6); otherwise, proceeding to step (7);

[0041] (6) Determine the direction of the cheese head;

[0042] (7) Calculate the cheese rotation angle.

[0043] Beneficial Effects

[0044] (1) Compared with mechanical devices that require graded screening and adjustment of the cheese posture, and may fail and require manual processing, image processing can adapt to any posture of the cheese and has a lower failure rate.

[0045] (2) It takes a long time for the cheese yarn to go through the entire mechanical device. Image processing can instantly obtain the cheese yarn posture, which is faster and more efficient.

[0046] (3) Mechanical devices require more non-standard designs and sensors, and the overall structure is relatively complex and the cost is high; while image processing systems only require cameras and robots, and the overall structure is simple and the cost is low.

[0047] (4) The mechanical device may rub against the cheese yarn and damage it, while image processing detection is contactless and reduces contact friction.

[0048] (5) The image processing algorithm of the present invention has good adaptability and can be applied to cheese yarns of various colors and sizes. It can identify any position and posture of the cheese yarn for grabbing, rather than only grabbing cheese yarns in an upright or inverted state, and is not affected by ambient light. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 It is a schematic diagram of the shape of cheese yarn;

[0050] Figure 2 This is a schematic diagram of the cheese yarn lying down;

[0051] Figure 3 This is a schematic diagram of the cheese yarn placed upright;

[0052] Figure 4 It is a schematic diagram of the overall flow of the identification method of the present invention;

[0053] Figure 5It is a schematic diagram of calculating the rotation angle of the cheese yarn when lying down in the present invention. DETAILED DESCRIPTION

[0054] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art may make various changes or modifications to the present invention, and these equivalent forms also fall within the scope limited by the appended claims of the application.

[0055] like Figures 1 to 3 As shown, the cheese yarn consists of a yarn tube and yarn wound on the yarn tube. Its appearance is a frustum, and it has large and small heads.

[0056] A method for identifying the position of package yarn, such as Figure 4 As shown, the specific steps are as follows:

[0057] (1) Obtaining an image of cheese yarn;

[0058] During the conveying process of the package yarn, an industrial camera is used to shoot from above the package yarn to obtain an image containing the complete package yarn;

[0059] (2) Establish a two-dimensional continuous coordinate system 0-UV for the image;

[0060] The origin of the two-dimensional continuous coordinate system 0-UV coincides with the origin of the image coordinate system, and the U axis and V axis coincide with the x axis and y axis of the image coordinate system respectively and have the same direction;

[0061] (3) Process the image to obtain the outer contour of the largest connected domain in the image. The specific steps are as follows:

[0062] (a) A 5×5 mean filter is used to perform five mean filtering on the image to remove image noise and texture information while retaining contour information;

[0063] (b) Perform threshold segmentation on the image, set threshold II, convert the pixel points in the image whose values ​​are less than threshold II to 0, and convert the other pixel points to 255, to obtain a binary image;

[0064] (c) Performing a connected domain analysis on the binary image, finding the connected domains of all pixels with a value of 255 in the binary image, numbering each connected domain, calculating the area of ​​each connected domain, selecting the largest connected domain and retaining it, and removing other connected domains;

[0065] (d) searching for the outer contour of the largest connected domain, recording the outermost contour of the largest connected domain in the form of point set coordinates (x, y), and obtaining the outer contour of the largest connected domain;

[0066] (4) Process the image to obtain the center point O(u o ,v0); the specific process is as follows:

[0067] The pixel values ​​of the area outside the largest connected domain in the image are set to 0, and the quality m of the largest connected domain is calculated using the following formula:

[0068]

[0069] u o The calculation formula is as follows:

[0070]

[0071] v o The calculation formula is as follows:

[0072]

[0073] In the formula, x s and s are the x-axis and y-axis dimensions of the image respectively, and n(x,y) is the value of the image pixel (x,y);

[0074] (5) judging whether the cheese yarn is in an upright position based on the outer contour;

[0075] The outer contour of the maximum connected domain is matched with the minimum circumscribed circle of the maximum connected domain. If the similarity is higher than a threshold value I, the cheese is determined to be in an upright state, and the process goes to step (6); otherwise, the cheese is determined to be in a lying state, and the process goes to step (7);

[0076] in:

[0077] The similarity calculation formula is as follows:

[0078]

[0079] In the formula, I(A,B) represents the similarity; i represents the code of the invariant moment in the Hu moment; The i-th invariant moment in the Hu moment representing the outer contour of the largest connected domain; The i-th invariant moment in the Hu moment representing the minimum circumscribed circle of the maximum connected domain;

[0080] The method for determining the threshold I is: test the package yarn in the upright state w times, obtain w corresponding similarities, and find the minimum value At the same time, test the cheese yarn in the lying state w times, obtain w corresponding similarities, and find the maximum value calculate and The average value of is the threshold I, where w≥100;

[0081] (6) Determine the direction of the size of the cheese yarn. The specific steps are as follows:

[0082] (i) Searching for the contour of the largest connected domain, recording the innermost contour of the largest connected domain in the form of point set coordinates (x, y), and obtaining the inner contour of the largest connected domain;

[0083] (ii) calculating the inner contour area of ​​the largest connected domain according to the inner contour of the largest connected domain;

[0084] (iii) comparing the inner contour area of ​​the maximum connected domain with the threshold value III. If the inner contour area is greater than the threshold value III, the cheese is determined to have the big end on top; otherwise, the cheese is determined to have the small end on top. The method for determining the threshold value III is as follows: photographing the big end and the small end of the cheese to obtain images a and b, respectively, and then processing images a and b to obtain the inner contour areas of their respective maximum connected domains, and then taking the average value to obtain the threshold value III.

[0085] (7) Calculate the cheese rotation angle;

[0086] like Figure 5 As shown in the figure, the specific method is: use Hough line transform to perform straight line search on the outer contour of the maximum connected domain to extract the two waistlines of the cheese yarn, calculate the intersection point S of the two waistlines, and the intersection point S and the center point O(u o ,v0) The angle between the positive direction of the coordinate system U axis and the package yarn is the rotation angle (i.e. Figure 2 a) in the figure.

[0087] Now, in combination with the specific use process, a method for identifying the cheese posture of the present invention is briefly described:

[0088] The above-mentioned method for identifying the cheese yarn posture was used to carry out cheese yarn posture recognition experiments, and the number of experiments was 1000 times, among which the cheese yarn was placed in upright and lying state 500 times respectively; in the upright state, the accuracy of judging the direction of the size head of the cheese yarn was 100%, and the center point position error range was 0-4mm; in the lying state, the center point position error range was 0-5mm, and the rotation angle error range was 0-3°; the above experimental results show that the method for identifying the cheese yarn posture of the present invention has high effectiveness and accuracy.

[0089] The technical principle of the present invention is described above in conjunction with specific embodiments. These descriptions are only for explaining the principle of the present invention and cannot be interpreted as limiting the scope of protection of the present invention in any way. Based on the explanations herein, those skilled in the art can associate other specific implementations of the present invention without paying creative labor, and these methods will fall within the scope of protection of the present invention.

Claims

1. A method for identifying the position of a cheese yarn, characterized in that: During the delivery of the cheese yarn, the cheese yarn is photographed from above to obtain an image containing the complete cheese yarn, and a two-dimensional continuous coordinate system 0-UV is established. The image is then processed to obtain the outer contour of the largest connected domain in the image, and the outer contour of the largest connected domain is matched with the minimum circumscribed circle of the largest connected domain. If the similarity is higher than a threshold value I, it is determined that the cheese yarn is in an upright placement state; Otherwise, it is determined that the cheese yarn is in a lying state; The maximum connected domain is the connected domain with the largest area; The origin of the two-dimensional continuous coordinate system 0-UV coincides with the origin of the image coordinate system, and the U axis and V axis coincide with the x axis and y axis of the image coordinate system respectively and have the same direction; The similarity calculation formula is as follows: In the formula, I(A,B) represents the similarity; i represents the code of the invariant moment in the Hu moment; The i-th invariant moment in the Hu moment representing the outer contour of the largest connected domain; The i-th invariant moment in the Hu moment representing the minimum circumscribed circle of the maximum connected domain; The method for determining the threshold I is: test the package yarn in the upright state w times, obtain w corresponding similarities, and find the minimum value At the same time, test the cheese yarn in the lying state w times, obtain w corresponding similarities, and find the maximum value calculate and The average value of is the threshold I, where w≥100.

2. A method for identifying the position and posture of cheese according to claim 1, characterized in that: The filming was done using an industrial camera.

3. A method for identifying the position and posture of cheese according to claim 1, characterized in that: The steps to obtain the maximum connected domain are as follows: (a) Perform mean filtering on the image to remove image noise and texture information while retaining contour information; (b) Perform threshold segmentation on the image, set threshold II, convert the pixel points in the image whose values ​​are less than threshold II to 0, and convert the other pixel points to 255, to obtain a binary image; (c) Perform a connected domain analysis on the binary image to find the connected domains with pixel values ​​of 255 in the binary image. Number each connected domain and calculate the area of ​​each connected domain. Filter out the largest connected domain and retain it, and remove other connected domains.

4. A method for identifying the cheese posture according to claim 3, characterized in that: The mean filter uses a 5×5 mean filter, and the number of mean filters is 5.

5. A method for identifying the cheese posture according to claim 1, characterized in that: The process of obtaining the outer contour of the maximum connected domain is as follows: searching for the outer contour of the maximum connected domain, recording the outermost contour of the maximum connected domain in the form of point set coordinates (x, y), and obtaining the outer contour of the maximum connected domain.

6. A method for identifying the position and posture of cheese according to claim 1, characterized in that: Before matching the outer contour of the maximum connected domain with the minimum circumscribed circle of the maximum connected domain, the image is processed to obtain the center point O(u o ,v0), this point is used to indicate the position of the cheese yarn; The center point of the largest connected region O(u o ,v0) is obtained by setting the pixel values ​​of the area outside the largest connected domain in the image to 0 and calculating the quality m of the largest connected domain. The formula is as follows: u o The calculation formula is as follows: v o The calculation formula is as follows: Among them, x s and s are the x-axis and y-axis dimensions of the image respectively, and n(x,y) is the value of the image pixel (x,y).

7. A method for identifying the position and posture of cheese according to claim 6, characterized in that: After determining that the cheese yarn is in an upright position, the direction of the big and small ends of the cheese yarn is also determined. The specific method is: calculate the inner contour area of ​​the maximum connected domain and compare it with the threshold III. If the inner contour area is greater than the threshold III, it is determined that the cheese yarn is in a state of big end on top; otherwise, it is determined that the cheese yarn is in a state of small end on top; The method for determining the threshold III is as follows: photograph the big end and the small end of the cheese yarn to obtain images a and b respectively, and then process images a and b respectively to obtain the inner contour area of ​​their respective maximum connected domains, and then take the average value to obtain the threshold III.

8. A method for identifying the position and posture of cheese according to claim 7, characterized in that: The steps to calculate the inner contour area of ​​the maximum connected domain are as follows: (i) Searching for the contour of the largest connected domain, recording the innermost contour of the largest connected domain in the form of point set coordinates (x, y), and obtaining the inner contour of the largest connected domain; (ii) The inner contour area of ​​the largest connected domain is calculated based on the inner contour of the largest connected domain.

9. A method for identifying the position and posture of cheese according to claim 6, characterized in that: After determining that the cheese is in a lying state, the rotation angle of the cheese is also calculated. The specific method is: use Hough line transform to perform a straight line search on the outer contour of the maximum connected domain to extract the two waistlines of the cheese, calculate the intersection point S of the two waistlines, and the intersection point S and the center point O (u o ,v0) The angle with the positive direction of the U axis of the coordinate system is the rotation angle of the cheese yarn.

10. A method for identifying the position and posture of a cheese according to any one of claims 1 to 9, characterized in that: The overall process is as follows: (1) Obtaining an image of cheese yarn; (2) Establish a two-dimensional continuous coordinate system 0-UV for the image; (3) Processing the image to obtain the outer contour of the largest connected domain in the image; (4) Process the image to obtain the center point O(u o ,v0); (5) judging whether the cheese yarn is in an upright position or in a lying position based on the outer contour; if it is in an upright position, proceeding to step (6); otherwise, proceeding to step (7); (6) Determine the direction of the cheese head; (7) Calculate the cheese rotation angle.