Quality detection method of cutting piece and sewing equipment
By acquiring the three-dimensional contour and key points of the cut piece in the sewing equipment, converting them into two-dimensional space for inspection, and combining them with a calibrated cut piece template, the problem of misjudgment in the quality inspection of cut pieces in the existing technology is solved, and efficient and reliable quality inspection of cut pieces is achieved.
Patent Information
- Application Number
- CN202311245910.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2043-09-25
AI Technical Summary
In garment production, existing technologies are insufficient to effectively detect the quality of cut pieces, resulting in poor quality of sewn garments. Furthermore, manual quality inspection is inefficient and unreliable, while image detection in automated quality inspection is susceptible to misjudgment due to the camera angle.
By acquiring the image information of the cut piece, its three-dimensional contour and three-dimensional key points are determined, which are then converted into the first two-dimensional contour and key points in two-dimensional space. This is combined with a pre-determined calibrated cut piece template for quality inspection, avoiding misjudgment caused by directly using two-dimensional image information.
This improves the reliability and efficiency of cut piece quality inspection, ensures stable operation of sewing equipment, avoids misjudgments caused by improper camera angles, and guarantees the reliable conduct of cut piece quality inspection.
Smart Images

Figure CN117274199B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of intelligent manufacturing, and particularly relates to a quality detection method of a cutting piece and a sewing device. BACKGROUND
[0002] In a garment production process, a plurality of cutting pieces are sewn into a garment. Before the cutting pieces are sewn, the quality of the cutting pieces needs to be detected to avoid sewing the cutting pieces with qualified quality and unqualified quality, so as to obtain a garment with poor quality. SUMMARY
[0003] The present application provides a quality detection method of a cutting piece and a sewing device.
[0004] The present application provides a quality detection method of a cutting piece, comprising:
[0005] According to the image information of the target cutting piece, the three-dimensional contour and the three-dimensional key point of the target cutting piece are determined.
[0006] According to the three-dimensional contour and the three-dimensional key point, the first two-dimensional contour and the first two-dimensional key point of the target cutting piece are determined.
[0007] According to the first two-dimensional contour, the first two-dimensional key point, and the pre-determined calibration cutting piece template, the quality of the target cutting piece is detected.
[0008] In the quality detection method of the cutting piece provided by the present application, the sewing device can determine the three-dimensional contour and the three-dimensional key point of the target cutting piece in the three-dimensional space according to the image information of the target cutting piece, that is, the image of the cutting piece to be detected. According to the three-dimensional contour and the three-dimensional key point, the first two-dimensional contour and the first two-dimensional key point of the target cutting piece in the two-dimensional space are determined. According to the first two-dimensional contour and the first two-dimensional key point, and the pre-determined calibration cutting piece template, that is, the cutting piece master or the cutting piece with qualified quality, the quality of the target cutting piece is detected.
[0009] Therefore, the sewing device can determine the three-dimensional contour and the three-dimensional key point of the target patch in the three-dimensional space after obtaining the image information of the target patch, or in other words, after obtaining the image of the patch to be identified, and then complete the subsequent quality detection according to the three-dimensional contour and the three-dimensional key point of the target patch, thereby avoiding the situation that the sewing device incorrectly determines that the quality of the target patch is unqualified due to the improper camera angle setting, which causes the image information to fail to correctly reflect the shape of the patch, and ensuring the reliable quality detection of the patch. In addition, after the sewing device determines the first two-dimensional contour and the first two-dimensional key point of the target patch in the two-dimensional space according to the three-dimensional contour and the three-dimensional key point, the sewing device can complete the quality detection of the target patch according to the first two-dimensional contour, the first two-dimensional key point, and the pre-determined calibration patch template. Therefore, compared with the quality detection method that directly uses the complete image of the target patch and the calibration patch template, the quality detection method that uses the first two-dimensional contour, the first two-dimensional key point, and the calibration patch template is more efficient or simple, and can ensure the efficient and stable detection of the quality of the patch to a certain extent, so that the sewing device can stably perform subsequent operations such as sewing work, and ensure the stable operation of the sewing device.
[0010] In some embodiments, the determining the three-dimensional contour and the three-dimensional key point of the target patch according to the obtained image information of the target patch comprises:
[0011] determining a second two-dimensional contour and a second two-dimensional key point of the target patch according to the image information captured by the camera;
[0012] determining the three-dimensional contour and the three-dimensional key point in the world coordinate system according to the second two-dimensional contour, the second two-dimensional key point, and the camera calibration parameters of the camera.
[0013] Therefore, the sewing device can determine the three-dimensional contour and the three-dimensional key point of the target patch in the three-dimensional space after obtaining the image information of the target patch, or in other words, after obtaining the image of the patch to be identified, and then complete the subsequent quality detection according to the three-dimensional contour and the three-dimensional key point of the target patch, thereby avoiding the situation that the sewing device incorrectly determines that the quality of the target patch is unqualified due to the improper camera angle setting, which causes the image information to fail to correctly reflect the shape of the patch, and ensuring the reliable quality detection of the patch. In addition, after the sewing device determines the first two-dimensional contour and the first two-dimensional key point of the target patch in the two-dimensional space according to the three-dimensional contour and the three-dimensional key point, the sewing device can complete the quality detection of the target patch according to the first two-dimensional contour, the first two-dimensional key point, and the pre-determined calibration patch template. Therefore, compared with the quality detection method that directly uses the complete image of the target patch and the calibration patch template, the quality detection method that uses the first two-dimensional contour, the first two-dimensional key point, and the calibration patch template is more efficient or simple, and can ensure the efficient and stable detection of the quality of the patch to a certain extent, so that the sewing device can stably perform subsequent operations such as sewing work, and ensure the stable operation of the sewing device.
[0014] In some embodiments, the three-dimensional key point includes multiple groups, each group of the three-dimensional key point includes two three-dimensional key points, and the first size parameter includes multiple, each group of the three-dimensional key point corresponds to one first size parameter, and the method further comprises:
[0015] determine each first size parameter of the target cutting piece based on a preset mapping relationship between key points and the first size parameters and position information of two three-dimensional key points in each group of the three-dimensional key points;
[0016] detect the quality of the target cutting piece according to the first size parameters and the calibration cutting piece template.
[0017] Thus, the sewing device of the embodiments of the present application can detect the quality of the target cutting piece according to the first size parameters after determining the three-dimensional key points of the target cutting piece and determining the corresponding first size parameters according to the three-dimensional key points, so that the quality detection of the target cutting piece can be reliably performed. At the same time, since the embodiments of the present application can detect the quality of the cutting piece through the size parameters of the cutting piece, the situation that the profile is qualified but the size is unqualified cannot occur when the quality is detected by simply using the profile or shape of the cutting piece, so that the reliability of the quality detection result of the cutting piece can be guaranteed.
[0018] In some embodiments, the detecting the quality of the target cutting piece according to the first size parameters and the calibration cutting piece template comprises:
[0019] determining the difference of each size parameter between the target cutting piece and the calibration cutting piece template according to the corresponding second size parameter of each first size parameter and the calibration cutting piece template;
[0020] determining that the quality of the target cutting piece is unqualified when at least one of the differences of the size parameters does not satisfy a preset size error.
[0021] Thus, the sewing device of the embodiments of the present application can determine whether there is at least one first size parameter whose difference with the corresponding second size parameter does not satisfy the preset size error among all the first size parameters after obtaining the first size parameters of the target cutting piece, in combination with the second size parameters of the calibration cutting piece template, according to the difference between each first size of the target cutting piece and the corresponding second size parameter. If there is, it is determined that the size of the target cutting piece does not meet the standard, and thus it is determined that the quality of the target cutting piece is unqualified. Therefore, the quality detection of the cutting piece can be determined according to the difference between the first size parameters of the cutting piece and the second size parameters of the calibration cutting piece template, so that the quality detection efficiency and quality detection accuracy of the cutting piece can be guaranteed to a certain extent, and the reliable performance of the cutting piece quality detection is guaranteed.
[0022] In some embodiments, the detecting the quality of the target cutting piece according to the first two-dimensional profile, the first two-dimensional key points and the pre-determined calibration cutting piece template comprises:
[0023] determining a rigid transformation matrix of the target patch corresponding to the calibration patch template according to the first two-dimensional key points of the target patch and third two-dimensional key points of the calibration patch template;
[0024] determining a rigid transformation post-contour of the target patch according to the rigid transformation matrix and the first two-dimensional contour;
[0025] detecting the quality of the target patch according to the rigid transformation post-contour and the calibration patch template.
[0026] Thus, the sewing device of the embodiments of the present application can determine the rigid transformation matrix of the target patch to the calibration patch template according to the first two-dimensional key points of the target patch and the third two-dimensional key points of the target patch template, and then perform rigid transformation on the first two-dimensional contour of the target patch by using the rigid transformation matrix, so that the contour shape of the target patch is the same or similar in size to the contour shape of the calibration patch, thereby obtaining the rigid transformation post-contour of the target patch, and then determining the quality of the target patch according to the rigid transformation post-contour and the third two-dimensional contour of the target patch, such as detecting the matching condition of the contour shape of the target patch and the contour shape of the calibration patch template, thereby determining the quality of the target patch. Thus, the sewing device can detect whether the contour shape or overall shape of the target patch meets the standard according to the rigid transformation post-contour, so that the quality detection of the patch can be reliably performed.
[0027] In some embodiments, the detecting the quality of the target patch according to the rigid transformation post-contour and the calibration patch template comprises:
[0028] In a case where the first intersection-over-union of the rigid transformation post-contour and the third two-dimensional contour of the calibration patch template is lower than a first preset ratio, it is determined that the quality of the target patch is unqualified.
[0029] Thus, the embodiments of the present application enable the sewing device to determine whether the quality of the target patch is qualified according to the first intersection-over-union of the rigid transformation post-contour of the target patch and the third two-dimensional contour of the calibration patch, such as determining that there is a large difference between the contour shape of the target patch and the contour shape of the calibration patch template in a case where the first intersection-over-union is lower than the first preset ratio, and then determining that the quality of the target patch is unqualified. Thus, the sewing device can also determine the quality of the target patch according to the first intersection-over-union, so that the quality detection of the target patch can be reliably performed.
[0030] In some embodiments, the detecting the quality of the target patch according to the first two-dimensional contour, the first two-dimensional key points and the predetermined calibration patch template comprises:
[0031] determining an affine transformation matrix of the target patch corresponding to the calibration patch template according to the first two-dimensional key points and third two-dimensional key points of the calibration patch template;
[0032] determine an affine transformed contour of the target patch according to the affine transformation matrix and the first two-dimensional contour of the target patch;
[0033] detect a quality of the target patch according to the affine transformed contour and the third two-dimensional contour.
[0034] Thus, the sewing device of the embodiments of the present application can, after determining the affine transformation matrix of the target patch to the calibration patch template through the first two-dimensional key points of the target patch and the third two-dimensional key points of the calibration patch, perform affine transformation on the first two-dimensional contour of the target patch by using the affine transformation matrix, so that the deviation between the contour of the target patch and the contour of the calibration patch template is highlighted, thereby obtaining the affine transformed contour of the target patch, and then determining the quality of the target patch according to the affine transformed contour and the third two-dimensional contour of the target patch. Therefore, the sewing device can detect the quality of the patch according to the contour of the target patch with highlighted deviation, so that the quality detection of the patch can be reliably performed.
[0035] In some embodiments, the detecting the quality of the target patch according to the affine transformed contour and the third two-dimensional contour comprises:
[0036] determining a plurality of reference bounding boxes on the affine transformed contour according to the position information of the affine transformed contour and a pre-determined bounding box size;
[0037] determining a second intersection-over-union according to the intersection-over-union of any two reference bounding boxes intersecting in each of the reference bounding boxes;
[0038] determining a plurality of contour line distances according to the distance between the affine transformed contour and the third two-dimensional contour in each of the reference bounding boxes;
[0039] detecting the quality of the target patch according to the second intersection-over-union and the contour line distances.
[0040] Thus, the embodiments of the present application enable the sewing device to, after obtaining the affine transformed contour, or in other words, after the first two-dimensional contour and the third two-dimensional contour are stacked in the same plane through the affine transformation matrix, determine or generate a plurality of reference bounding boxes with different sizes on the affine transformed contour based on a pre-determined bounding box size, determine a second intersection-over-union based on the intersection-over-union of any two reference bounding boxes intersecting after all the reference bounding boxes, and determine contour line distances based on the distance between the affine transformed contour and the third two-dimensional contour in each reference bounding box, so as to determine the deviation between the affine transformed contour and the third two-dimensional contour according to the second intersection-over-union and the contour line distances, complete the quality detection of the target patch, and ensure the reliability and accuracy of the quality detection of the patch to a certain extent.
[0041] In some embodiments, the detecting the quality of the target patch according to the second intersection-over-union ratio and the contour interval includes:
[0042] In a case where there are a preset number of second intersection-over-union ratios lower than a second preset ratio and a maximum value of the contour intervals is higher than a preset interval, it is determined that the quality of the target patch is unqualified.
[0043] In this way, the sewing device provided in the embodiments of the present application can detect the quality of the target patch according to the second intersection-over-union ratio and the maximum value of the contour intervals. For example, in a case where the preset number of second intersection-over-union ratios are all less than the second preset ratio, it is determined that the contour of the target patch has obvious defects, and thus it is determined that the quality of the target patch is unqualified. Alternatively, in a case where the maximum value of the contour intervals is less than the preset interval, it is determined that there is a large deviation between the contour of the target patch and the contour of the calibration patch template, and thus it is determined that the quality of the target patch is unqualified. In this way, the quality of the patch can be reliably detected.
[0044] The embodiments of the present application provide a sewing device including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the above-mentioned method for detecting the quality of the patch is implemented.
[0045] The sewing device provided in the embodiments of the present application can determine the three-dimensional contour and the three-dimensional key point of the target patch in the three-dimensional space after obtaining the image information of the target patch, or in other words, after obtaining the image of the patch to be identified for quality. Then, the subsequent quality detection can be completed according to the three-dimensional contour and the three-dimensional key point of the target patch. In this way, to some extent, the situation that the sewing device incorrectly determines that the quality of the target patch is unqualified due to the fact that the image information fails to correctly reflect the shape of the patch because of improper camera angle setting when the quality detection is directly performed by using the two-dimensional information in the image information is avoided, and the reliable quality detection of the patch is ensured. In addition, after the first two-dimensional contour and the first two-dimensional key point of the target patch in the two-dimensional space are determined according to the three-dimensional contour and the three-dimensional key point, the quality detection of the target patch can be completed according to the first two-dimensional contour, the first two-dimensional key point, and the calibration patch template determined in advance. In this way, compared with the quality detection directly performed by using the complete image of the target patch and the calibration patch template, the quality detection performed by using the first two-dimensional contour, the first two-dimensional key point, and the calibration patch template is more efficient or simpler, and the efficient and stable quality detection of the patch can be ensured to some extent, so that the sewing device can stably perform the subsequent operation such as the sewing operation, and the stable operation of the sewing device is ensured.
[0046] Additional aspects and advantages of the embodiments of the present application will be in part apparent and in part pointed out hereinafter. Attached Figure Description
[0047] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein:
[0048] Figure 1 This is a flowchart illustrating the quality inspection method for cut pieces in certain embodiments of this application;
[0049] Figure 2 This is a schematic diagram of a quality inspection device for cut pieces in some embodiments of this application;
[0050] Figure 3 This is a schematic diagram of the cut piece in some embodiments of this application;
[0051] Figure 4 This is a schematic diagram of the cut piece in some embodiments of this application;
[0052] Figure 5 This is a schematic diagram of a sewing device in some embodiments of this application;
[0053] Figure 6 This is a schematic diagram of the operation process of the sewing equipment in some embodiments of this application;
[0054] Figure 7 This is a schematic diagram of the feeding mechanism in some embodiments of this application;
[0055] Figure 8 This is a schematic diagram of the feeding gripper mechanism in some embodiments of this application;
[0056] Figure 9 This is a schematic diagram of the sheet-jointing gripper mechanism in some embodiments of this application;
[0057] Figure 10 This is a schematic diagram of a sewing device in some embodiments of this application;
[0058] Figure 11 This is a flowchart illustrating the quality inspection method for cut pieces in certain embodiments of this application;
[0059] Figure 12 This is a flowchart illustrating the quality inspection method for cut pieces in certain embodiments of this application;
[0060] Figure 13 This is a flowchart illustrating the quality inspection method for cut pieces in certain embodiments of this application;
[0061] Figure 14 This is a flowchart illustrating the quality inspection method for cut pieces in certain embodiments of this application;
[0062] Figure 15An application scenario in some embodiments of the present application is shown in the figure;
[0063] Figure 16 A flowchart of a quality detection method of a cutting piece in some embodiments of the present application is shown in the figure;
[0064] Figure 17 A flowchart of a quality detection method of a cutting piece in some embodiments of the present application is shown in the figure;
[0065] Figure 18 An application scenario in some embodiments of the present application is shown in the figure;
[0066] Figure 19 An application scenario in some embodiments of the present application is shown in the figure;
[0067] Figure 20 An application scenario in some embodiments of the present application is shown in the figure;
[0068] Figure 21 A flowchart of a quality detection method of a cutting piece in some embodiments of the present application is shown in the figure;
[0069] Figure 22 A flowchart of a quality detection method of a cutting piece in some embodiments of the present application is shown in the figure. DETAILED DESCRIPTION
[0070] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the embodiments of the present application, and cannot be understood as limiting the embodiments of the present application.
[0071] In a conventional cutting piece quality inspection scheme, workers need to detect the quality of cutting pieces according to experience and fixed quality inspection methods, such as observing whether the cutting piece has tears or damage by naked eye, or observing whether the shape of the cutting piece is normal.
[0072] However, after observing cutting pieces for a period of time, workers may not be able to continue to perform cutting piece quality inspection work due to eye fatigue, or in other words, cannot accurately perform cutting piece quality inspection work, so the efficiency of manual quality inspection is not high. In addition, the results of manual quality inspection have strong subjectivity and the reliability is difficult to guarantee.
[0073] Therefore, some factories use intelligent cutting piece automatic quality inspection solutions to avoid the problems of low efficiency and unreliable results of manual quality inspection in the foregoing cutting piece quality inspection solutions. Specifically, in the foregoing cutting piece automatic quality inspection solution, the quality of the cutting piece can be determined according to the image of the cutting piece, such as comparing the image of the cutting piece with the image of a pre-determined quality-qualified cutting piece at the pixel level. If they are similar, the quality of the cutting piece is determined to be qualified, otherwise, the quality of the cutting piece is determined to be unqualified.
[0074] However, in the foregoing solution of comparing the image of the cutting piece with the image of the quality-qualified cutting piece at the pixel level to determine the quality of the cutting piece, the quality of each cutting piece is determined by comparing the complete image of the cutting piece with the complete image of the quality-qualified cutting piece at the pixel level, which has a large amount of calculation. At the same time, if the shooting angle of the camera is not properly set, the quality of the cutting piece may actually be qualified. When the shooting angle of the camera is not properly set, the image of the cutting piece and the image of the quality-qualified cutting piece have large differences, so that the quality detection result does not match the actual situation.
[0075] Based on the above-mentioned possible problems, please refer to Figure 1 The embodiment of the present application provides a cutting piece quality detection method, comprising:
[0076] 01: determining the three-dimensional contour and the three-dimensional key point of the target cutting piece according to the image information of the target cutting piece;
[0077] 02: determining the first two-dimensional contour and the first two-dimensional key point of the target cutting piece according to the three-dimensional contour and the three-dimensional key point;
[0078] 03: detecting the quality of the target cutting piece according to the first two-dimensional contour, the first two-dimensional key point and the pre-determined calibration cutting piece template.
[0079] Please refer to Figure 2 The embodiment of the present application also provides a cutting piece quality detection device 200. The cutting piece quality detection method of the embodiment of the present application can be realized by the cutting piece quality detection device 200 of the embodiment of the present application. Specifically, the quality detection device 200 comprises a first determination module 210, a second determination module 220 and a detection module 230. The first determination module 210 is configured to determine the three-dimensional contour and the three-dimensional key point of the target cutting piece according to the image information of the target cutting piece. The second determination module 220 is configured to determine the first two-dimensional contour and the first two-dimensional key point of the target cutting piece according to the three-dimensional contour and the three-dimensional key point. The detection module 230 is configured to detect the quality of the target cutting piece according to the first two-dimensional contour, the first two-dimensional key point and the pre-determined calibration cutting piece template.
[0080] The sewing device according to the embodiments of the present application comprises a memory and a processor. The quality detection method of the cutting piece according to the embodiments of the present application can be implemented by the sewing device according to the embodiments of the present application. Specifically, the memory stores a computer program, and the processor is configured to determine a three-dimensional contour and a three-dimensional key point of the target cutting piece according to the image information of the target cutting piece; determine a first two-dimensional contour and a first two-dimensional key point of the target cutting piece according to the three-dimensional contour and the three-dimensional key point; and detect the quality of the target cutting piece according to the first two-dimensional contour, the first two-dimensional key point and a pre-determined calibration cutting piece template.
[0081] That is, the sewing device according to the embodiments of the present application can perform operations such as target recognition or semantic recognition according to the image information of the target cutting piece when the quality of the cutting piece needs to be detected, that is, when the image information of the target cutting piece is obtained, so as to determine the contour and the key point of the target cutting piece in the three-dimensional space, that is, the three-dimensional contour and the three-dimensional key point.
[0082] After the three-dimensional contour and the three-dimensional key point are obtained, the mapping of the three-dimensional contour and the three-dimensional key point in the two-dimensional space can be determined, that is, the first two-dimensional contour and the first two-dimensional key point. Then, the quality of the target cutting piece is detected according to the first two-dimensional contour, the first two-dimensional key point and the pre-determined calibration cutting piece template, such as determining the similarity between the first two-dimensional contour of the target cutting piece and the contour of the calibration cutting piece template. If the similarity is higher than a certain value, it is determined that the quality is qualified, otherwise, it is determined that the quality is unqualified.
[0083] It should be noted that the contour (including the three-dimensional contour and the two-dimensional contour) in the embodiments of the present application can be understood as the expression or shape of the contour of the cutting piece in the three-dimensional space or the two-dimensional space. For a clearer description of the contour in the embodiments of the present application, please refer to Figure 3 and Figure 4 , Figure 3 and Figure 4 are schematic diagrams of the cutting piece in some embodiments of the present application. It can be understood that Figure 3 and Figure 4 the closed figure formed by the black solid line can be understood as the two-dimensional contour in the embodiments of the present application.
[0084] It should be further noted that, similar to the key points of the skeleton in the gait recognition task, the key points (including the three-dimensional key points and the two-dimensional key points) in the embodiments of the present application can be understood as specific points that can represent the image features (such as the contour and / or shape) of the cutting piece. For example, the circular shape on the contour line of Figure 3 and Figure 4 , Figure 3 and Figure 3 can be understood as the two-dimensional key points in the embodiments of the present application.
[0085] It should also be understood that the specific manner of determining the three-dimensional contour and the three-dimensional key point according to the image information in the embodiments of the present application is content that can be set according to actual conditions. For example, in some embodiments, after projecting the two-dimensional image information to a preset plane to obtain three-dimensional image information, inputting the three-dimensional image information into a preset semantic segmentation algorithm (or semantic segmentation model), the semantic segmentation algorithm extracts the patch in the image information as the foreground and outputs, thereby obtaining the three-dimensional contour. In the case of obtaining the three-dimensional contour, the key point in the three-dimensional contour can be extracted based on a preset key point extraction algorithm, and then the three-dimensional key point is obtained.
[0086] In addition, the manner of obtaining the first two-dimensional contour and the first two-dimensional key point according to the three-dimensional key point and the three-dimensional contour in the embodiments of the present application is also content that can be set according to actual conditions. For example, in some embodiments, the process of obtaining the first two-dimensional contour and the first two-dimensional key point can include: in the case that the three-dimensional contour can be composed of three dimensions of width (corresponding to the X axis), length (corresponding to the Y axis) and height (corresponding to the Z axis), the Z axis dimension in the three-dimensional contour can be deleted to obtain the first two-dimensional contour. Similarly, the Z axis dimension in the three-dimensional coordinates of the three-dimensional key point can be deleted to obtain the first two-dimensional key point.
[0087] In addition, it should be clear that the calibration patch template in the embodiments of the present application can be understood as the image of the qualified patch, or the contour and key point of the qualified patch.
[0088] In addition, the specific process of detecting the quality of the target patch by using the first two-dimensional contour, the first two-dimensional key point and the pre-determined calibration patch template in the embodiments of the present application is content that can be set according to actual conditions. For example, in some embodiments, the similarity between the first two-dimensional contour of the target patch and the two-dimensional contour of the calibration patch template can be calculated, and the distance between the first two-dimensional key point of the target patch and the corresponding two-dimensional key point in the calibration patch template can be calculated, to determine the quality of the target patch.
[0089] Specifically, taking the two-dimensional contour shown in Figure 3 as an example, Figure 5 the two-dimensional contour includes the key point corresponding to the left side of the neckline (i.e. the key point with serial number 1 in Figure 5 ), and after determining the key point corresponding to the left side of the neckline in the two-dimensional contour of the calibration patch template, the distance between the key point corresponding to the left side of the neckline in the two-dimensional contour of the target patch (assuming this point is P A ) and the key point corresponding to the left side of the neckline in the two-dimensional contour of the calibration patch template (assuming this point is P B ) is calculated, that is, |P A -P B | is calculated, and if |P A -P B| The quality of the target cutting piece is determined to be qualified if the first two-dimensional contour of the target cutting piece and the two-dimensional contour of the calibration cutting piece template are less than the preset value and the similarity degree is greater than the preset value, and is determined to be unqualified otherwise.
[0090] In summary, the sewing equipment in the embodiments of the present application can determine the three-dimensional contour and the three-dimensional key point of the target cutting piece in the three-dimensional space after obtaining the image information of the target cutting piece, or in other words, after obtaining the image of the cutting piece to be identified for quality, to complete the subsequent quality detection according to the three-dimensional contour and the three-dimensional key point of the target cutting piece, thereby to a certain extent, avoiding the situation that the sewing equipment incorrectly determines that the quality of the target cutting piece is unqualified when directly using the two-dimensional information in the image information for quality detection, which may be caused by improper camera angle setting, so that the image information fails to correctly reflect the shape of the cutting piece. The reliable quality detection of the cutting piece is ensured. In addition, after the sewing equipment determines the first two-dimensional contour and the first two-dimensional key point of the target cutting piece in the two-dimensional space according to the three-dimensional contour and the three-dimensional key point, the quality detection of the target cutting piece can be completed according to the first two-dimensional contour, the first two-dimensional key point and the pre-determined calibration cutting piece template. Therefore, compared with the way of directly detecting the quality by using the complete image of the target cutting piece and the calibration cutting piece template, the way of detecting the quality by using the first two-dimensional contour, the first two-dimensional key point and the calibration cutting piece template is more efficient or simple, which can to a certain extent ensure the efficient and stable detection of the quality of the cutting piece, so that the sewing equipment can stably perform subsequent operations such as sewing operation, and the stable operation of the sewing equipment is ensured.
[0091] In addition, it should be noted that the specific structure of the sewing equipment in the embodiments of the present application is content that can be set according to actual conditions. For example, in some embodiments, the sewing equipment includes a host computer and an execution mechanism, wherein the execution mechanism can include a camera or a clamping unit. Then, after the camera photographs the target cutting piece to obtain the image information of the target cutting piece, the image information is sent to the host computer, and the host computer executes the above steps 01 to 03 to determine whether the quality of the target cutting piece is qualified. In the case that the quality of the target cutting piece is qualified, the host computer can control the clamping unit to grab and place the target cutting piece in the pre-set cutting piece qualified area, and in the case that the quality of the target cutting piece is unqualified, the host computer can control the clamping unit to grab and place the target cutting piece in the pre-set waste cutting piece recycling area.
[0092] In other embodiments, please refer to Figure 5 , Figure 6 is a schematic view of the sewing equipment in some embodiments of the present application. For example, Figure 7As shown, the present application provides a sewing device 300, which includes a feeding mechanism 310, a feeding gripper mechanism 320, a patch gripper mechanism 330, a patch inspection table 340, and a camera 350. The feeding mechanism 310 is used to transport the patch (or other mechanical gripper places the patch itself) on the receiving pipeline, and when there is a patch on the table itself, it is controlled to move a certain distance upward (i.e., in the direction opposite to the direction of gravity) so that the feeding gripper mechanism 320 can grab the patch on the table itself. For a clearer description of the feeding mechanism 310 in the present application, please refer to Figure 6 and Figure 7 , Figure 7 For the operation flowchart of the sewing device 300 in some embodiments of the present application, Figure 8 For the schematic diagram of the feeding mechanism 310 in some embodiments of the present application.
[0093] Specifically, as shown in Figure 8 , the feeding gripper mechanism 320 can be used to place the patch on the patch inspection table 340 after grabbing the patch from the table of the feeding mechanism 310. In addition, after placing the patch on the patch inspection table 340, the patch can be dragged to lay flat on the patch inspection table 340. For a clearer description of the feeding gripper mechanism 320 in the present application, please refer to Figure 9 , Figure 9 For the schematic diagram of the feeding gripper mechanism 320 in some embodiments of the present application.
[0094] After the feeding gripper mechanism 320 completes the patch placement and patch laying operation (or said, dragging operation), the camera 350 will perform a shooting action on the patch on the patch inspection table 340 to generate image information of the patch, and send the image information to the controller or processor of the sewing device 300. In turn, the sewing device 300 can perform steps 01 to 03 described above to obtain the quality of the patch.
[0095] If the sewing device 300 determines that the quality of the patch on the patch inspection table 340 is qualified, the patch gripper mechanism 330 can be controlled to grab the patch on the patch inspection table 340 and place it in the pre-set patch qualified area so that other devices can perform the sewing (or said, patching) of the patch. For a clearer description of the patch gripper mechanism 330 in the present application, please refer to Figure 10 , Figure 10 For the schematic diagram of the patch gripper mechanism 330 in some embodiments of the present application.
[0096] If it is determined that the quality of the patch on the patch inspection table 340 is unqualified, the feeding gripper mechanism 320 can be controlled to push the patch into the pre-set waste collection area. For a clearer description of the sewing device 300 in the present application, please refer to Figure 8 ,Figure 10 is a schematic diagram of the sewing device 300 in some embodiments of the present application. It should be noted that, on the basis of Figure 10 , the feeding mechanism 310, the feeding gripper mechanism 320 and the patch gripper mechanism 330 are hidden to obtain Figure 11 .
[0097] Further, as shown in Figure 5 , in the case of unqualified quality, the patches on the patch quality inspection table 340 will be pushed to the waste collection 341 by the feeding gripper mechanism 320, that is, pushed down from the patch quality inspection table 340. In the case of qualified quality, the patch gripper mechanism 330 will pick up the patches on the patch quality inspection table 340 and place them in the patch qualified area 342.
[0098] In some embodiments of the present application, referring to Figure 10 , step 01 in the quality detection method comprises:
[0099] 010: determining a second two-dimensional contour and a second two-dimensional key point of the target patch according to image information captured by the camera;
[0100] 011: determining a three-dimensional contour and a three-dimensional key point in the world coordinate system according to the second two-dimensional contour, the second two-dimensional key point and the camera calibration parameters of the camera.
[0101] The detection module of the embodiments of the present application is also used to determine a second two-dimensional contour and a second two-dimensional key point of the target patch according to image information captured by the camera; and determine a three-dimensional contour and a three-dimensional key point in the world coordinate system according to the second two-dimensional contour, the second two-dimensional key point and the camera calibration parameters of the camera.
[0102] The processor of the embodiments of the present application is also used to determine a second two-dimensional contour and a second two-dimensional key point of the target patch according to image information captured by the camera; and determine a three-dimensional contour and a three-dimensional key point in the world coordinate system according to the second two-dimensional contour, the second two-dimensional key point and the camera calibration parameters of the camera.
[0103] That is, the sewing device of the embodiments of the present application can perform two-dimensional contour extraction and key point extraction on the image information of the target patch after capturing a two-dimensional image of the target patch by the camera, or in other words, after the target patch is projected to the camera coordinate system (or in other words, to the view plane) and converted to two-dimensional image information by the camera capturing the target patch in the world coordinate system or the real world, thereby obtaining a second two-dimensional contour and a second two-dimensional key point of the target patch in the two-dimensional space.
[0104] It can be understood that the second two-dimensional contour and the second two-dimensional key point can also represent the shape and features of the target cutting piece, but the image information captured by the camera can have a "small far and large near" situation. For example, assuming that the first distance between the camera and the neckline of the target cutting piece is less than the second distance between the camera and the hem of the target cutting piece, the neckline in the image captured by the camera can be larger in proportion or size than the hem.
[0105] Therefore, to avoid or improve the "small far and large near" situation of the image information, after obtaining the second two-dimensional contour and the second two-dimensional key point, the second two-dimensional contour and the second two-dimensional key point are back projected into the three-dimensional space based on the camera calibration parameters, i.e., the extrinsic and intrinsic parameters of the camera, so as to obtain the above-mentioned three-dimensional contour corresponding to the second two-dimensional contour and the above-mentioned three-dimensional key point corresponding to the second two-dimensional key point.
[0106] Therefore, after back projecting the second two-dimensional contour and the second two-dimensional key point to obtain the three-dimensional contour and the three-dimensional key point, the "small far and large near" situation of the target cutting piece in the three-dimensional space is eliminated or weakened, and then, after obtaining the first two-dimensional contour according to the three-dimensional contour of the target cutting piece in the world coordinate system and obtaining the first two-dimensional key point according to the three-dimensional contour of the target cutting piece in the world coordinate system, the reliability of the first two-dimensional key point and the first two-dimensional contour can be ensured because the first two-dimensional contour and the first two-dimensional key point are not directly obtained from the "image information that can be'small far and large near'".
[0107] In addition, it can be understood that the specific process of mapping the second two-dimensional contour and the second two-dimensional key point to the three-dimensional space to obtain the above-mentioned three-dimensional contour and the above-mentioned three-dimensional key point is content that can be set according to the situation, such as in some embodiments, please refer to Figure 12 and / or Figure 3 again. In which, the camera 350 captures the target cutting piece on the cutting piece inspection table 340, so that the sewing equipment (or the controller in the sewing equipment) back projects the second two-dimensional contour and the second two-dimensional key point to the cutting piece inspection table 340 after determining the second two-dimensional contour and the second two-dimensional key point, so as to obtain the above-mentioned three-dimensional contour and the above-mentioned three-dimensional key point.
[0108] Thus, the embodiment of the application enables the sewing device to, after the image information of the target patch is captured by the camera, determine the first two-dimensional key points and the first two-dimensional contour in the image information, map the first two-dimensional key points to the three-dimensional key points in the world coordinate system and map the first two-dimensional contour to the three-dimensional contour in the world coordinate system in combination with the pre-determined camera calibration parameters, and then, when the first two-dimensional key points are obtained through the three-dimensional key points and the first two-dimensional contour is obtained through the three-dimensional contour, and the patch quality inspection is performed according to the first two-dimensional contour and the first two-dimensional key points, the situation that the shape of the target patch in the image information may be different from the actual situation, resulting in that the first two-dimensional contour and the first two-dimensional key points are not reliable, can be avoided to some extent, so that the patch quality inspection process can be reliably performed.
[0109] In some embodiments of the application, the three-dimensional key points include multiple groups, each group of three-dimensional key points includes two three-dimensional key points, and the first size parameters include multiple, each group of three-dimensional key points corresponds to a first size parameter. Based on this, please refer to Figure 3 The quality detection method of the embodiment of the application further includes:
[0110] 04: Based on the mapping relationship between the pre-determined key points and the first size parameters and the position information of the two three-dimensional key points in each group of three-dimensional key points, each first size parameter of the target patch is determined.
[0111] 05: The quality of the target patch is detected according to the first size parameters and the calibration patch template.
[0112] The quality detection device of the embodiment of the application further includes a third determination module and a parameter detection module. The third determination module is used to determine each first size parameter of the target patch based on the mapping relationship between the pre-determined key points and the first size parameters and the position information of the two three-dimensional key points in each group of three-dimensional key points. The parameter detection module is used to detect the quality of the target patch according to the first size parameters and the calibration patch template.
[0113] The processor of the embodiment of the application is further used to determine each first size parameter of the target patch based on the mapping relationship between the pre-determined key points and the first size parameters and the position information of the two three-dimensional key points in each group of three-dimensional key points, and detect the quality of the target patch according to the first size parameters and the calibration patch template.
[0114] That is, the embodiments of the present application group the three-dimensional key points according to the pre-set size parameters, so that each group of three-dimensional key points can be used to calculate a corresponding size parameter. Then, after obtaining the plurality of three-dimensional key points of the target pattern piece, the plurality of three-dimensional key points of the target pattern piece can be divided into a plurality of groups according to the pre-determined grouping manner, and the corresponding calculation can be completed according to the size parameters that can be calculated for each group of the target pattern piece, so as to obtain the first size parameters of the target pattern piece.
[0115] For a clearer description of the embodiments of the present application, please refer to the serial numbers in Figure 3 and Figure 3 , assuming that Figure 3 the first to eighth key points shown in the figures are all three-dimensional key points, then Figure 4 include: the first key point corresponding to the left collar of the pattern piece, the second key point corresponding to the right collar of the pattern piece, the third key point corresponding to the left shoulder of the pattern piece, the fourth key point corresponding to the right shoulder of the pattern piece, the fifth key point corresponding to the left underarm of the pattern piece, the sixth key point corresponding to the right underarm of the pattern piece, the seventh key point corresponding to the left hem of the pattern piece, and the eighth key point corresponding to the right hem of the pattern piece.
[0116] Further, in combination with the corresponding relationship between the three-dimensional key point groups and the first size parameters in some embodiments, namely: the left shoulder width corresponding to the "first key point and third key point", the right shoulder width corresponding to the "second key point and fourth key point", the left side seam length corresponding to the "fifth key point and seventh key point", the right side seam length corresponding to the "sixth key point and eighth key point", the hem width corresponding to the "seventh key point and eighth key point", the underarm width corresponding to the "fifth key point and sixth key point", and the pattern piece length corresponding to the "first key point, second key point, seventh key point and eighth key point".
[0117] Among them, in addition to the aforementioned pattern piece length, the other first size parameters can be calculated according to the distance between the two key points in the corresponding three-dimensional key point group, such as the left shoulder width which can be understood as the distance between the first key point and the third key point. For the aforementioned pattern piece length, after determining the first midpoint position of the first key point and the second key point, and determining the second midpoint position of the seventh key point and the eighth key point, the distance between the first midpoint position and the second midpoint position can be calculated to obtain
[0118] Based on this, after the sewing equipment obtains the first to eighth key points as shown in Figure 4 from the image information of the target pattern piece, the left shoulder width, the right shoulder width, the left side seam length, the right side seam length, the hem width, the underarm width and the pattern piece length of the target pattern piece can be determined in combination with the aforementioned corresponding relationship between the three-dimensional key point groups and the first size parameters.
[0119] Then, based on the determined first size parameters of the target pattern piece, it is determined whether the target pattern piece is similar to the calibration pattern piece template, thereby determining the quality of the target pattern piece. For example, the quality of the target pattern piece can be determined based on the difference between the first size parameters of the target pattern piece and the calibration size parameters of the calibration pattern piece template.
[0120] Thus, the embodiments of this application enable the sewing equipment to determine the three-dimensional key points of the target fabric piece, and after determining the corresponding first size parameters based on the three-dimensional key points, to detect the quality of the target fabric piece based on the first size parameters, thereby ensuring reliable quality inspection of the target fabric piece. Furthermore, because the embodiments of this application can detect the quality of the fabric piece through its size parameters, it avoids the situation where simply using the fabric piece's outline or shape to detect quality fails to detect cases where the outline is acceptable but the size is not, thus ensuring the reliability of the fabric piece quality inspection results.
[0121] Furthermore, since the first size parameter is obtained based on three-dimensional key points rather than the first two-dimensional key points, it can avoid the situation where the shape of the cut piece in the image information does not match the actual situation, resulting in low reliability of the first two-dimensional key points. This makes it difficult to guarantee the reliability of the first size parameter when it is obtained from the first two-dimensional key points, thus ensuring that the quality inspection of the cut piece can be carried out reliably.
[0122] Furthermore, it can be understood that the correspondence between 3D key points and the first dimension parameter is something that can be set according to the situation, such as... Figure 4 For example, Figure 3 The six key points shown can be divided into three groups, corresponding to " Figure 3 The two key points at the top of the middle, the waist length group, "corresponding to Figure 13 The two key points of the left trouser leg opening and the corresponding left trouser leg opening group. Figure 3 The right trouser leg group consists of "two key points on the right side of the trouser leg".
[0123] In some embodiments of this application, please refer to Figure 14 Step 05 in the quality inspection method includes:
[0124] 050: Based on each first dimension parameter and the corresponding second dimension parameter of the calibration pattern template, determine the difference between each dimension parameter of the target pattern and the calibration pattern template;
[0125] 051: If at least one of the dimensional parameters does not meet the preset dimensional error, the quality of the target cut piece is determined to be unqualified.
[0126] The parameter detection module of the embodiment of the present application is further configured to determine the difference of each size parameter of the target cutting piece from the calibration cutting piece template according to each first size parameter and the corresponding second size parameter of the calibration cutting piece template; and determine that the quality of the target cutting piece is unqualified if at least one of the differences of the size parameters does not satisfy the preset size error.
[0127] The processor of the embodiment of the present application is further configured to determine the difference of each size parameter of the target cutting piece from the calibration cutting piece template according to each first size parameter and the corresponding second size parameter of the calibration cutting piece template; and determine that the quality of the target cutting piece is unqualified if at least one of the differences of the size parameters does not satisfy the preset size error.
[0128] That is, the embodiment of the present application can compare all the first size parameters of the target cutting piece with the second size parameters of the calibration cutting piece template to determine whether the difference (corresponding to the "difference of size parameters") between the two is within the preset error range (corresponding to the preset size error), and determine that the quality of the target cutting piece is unqualified if not.
[0129] For example, Figure 15 For example, according to the three-dimensional key points of the target cutting piece and the correspondence between the three-dimensional key point groups and the first size parameters (i.e., the left shoulder width, the right shoulder width, the left side seam length, the right side seam length, the hem width, the underarm width, and the cutting piece length), the sewing equipment calculates the left shoulder width of the target cutting piece to obtain the first left shoulder width, calculates the right shoulder width of the target cutting piece to obtain the first right shoulder width, and calculates the underarm width of the target cutting piece to obtain the first underarm width.
[0130] Then, the sewing equipment can read the left shoulder width value, the right shoulder width value, and the underarm width value of the (pre-stored) calibration cutting piece template to obtain the second left shoulder width, the second right shoulder width, and the second underarm width.
[0131] Next, the sewing equipment can calculate the difference between the first left shoulder width and the second left shoulder width to obtain the left shoulder width difference, calculate the difference between the first right shoulder width and the second right shoulder width to obtain the right shoulder width difference, and calculate the difference between the first underarm width and the second underarm width to obtain the underarm width difference.
[0132] Finally, the sewing equipment can determine whether the left shoulder width difference is within the preset size error, determine whether the right shoulder width is within the preset size error, and determine whether the underarm width difference is within the preset size error. If one or more of the left shoulder width difference, the right shoulder width difference, and the underarm width difference is not within the preset size error, it is determined that the size of the cutting piece is unqualified, and thus the quality of the cutting piece is unqualified.
[0133] Optionally, in some embodiments of the present application, when the difference between each first size parameter of the target cutting piece and the corresponding second size parameter is within the preset size error, it is determined that the size of the target cutting piece is qualified, and thus it is determined that the quality of the target cutting piece is qualified.
[0134] It should be noted that the preset size error in the embodiments of the present application is a content that can be set according to actual conditions. For example, in some embodiments, different size parameters correspond to different preset size errors. For example, the aforementioned left shoulder width difference corresponds to a left shoulder width size error, the aforementioned right shoulder width difference corresponds to a right shoulder width size error, and the aforementioned underarm width difference corresponds to an underarm width size error.
[0135] It should also be noted that the specific value of the preset size error in the embodiments of the present application is also a content that can be set according to actual conditions. For example, in some embodiments, because the machine precision of different garment manufacturers is different and the quality requirements of cutting pieces are different, the value of the preset size error can be determined according to the value input by the user through the terminal.
[0136] In this way, the sewing equipment of the embodiments of the present application can obtain the first size parameters of the target cutting piece, combine the second size parameters of the calibration cutting piece template, and determine whether there is at least one first size parameter whose difference from the corresponding second size parameter does not satisfy the preset size error among all first size parameters according to the difference between each first size of the target cutting piece and the corresponding second size parameter. If there is, it is determined that the size of the target cutting piece does not meet the standard, and thus it is determined that the quality of the target cutting piece is unqualified. Therefore, the quality detection of the cutting piece can be determined according to the difference between the first size parameters of the cutting piece and the second size parameters of the calibration cutting piece template, thereby ensuring the quality detection efficiency and quality detection accuracy of the cutting piece to a certain extent, and ensuring the reliable performance of the cutting piece quality detection.
[0137] In addition, it should be noted that the acquisition method of the second size parameters of the calibration cutting piece template in the embodiments of the present application can be consistent with the acquisition method of the first size parameters of the target cutting piece.
[0138] Specifically, the sewing equipment can determine the three-dimensional key points and the three-dimensional contour of the calibration cutting piece template after obtaining the image information of the calibration cutting piece template. Alternatively, the sewing equipment can determine the two-dimensional key points and the two-dimensional contour of the calibration cutting piece template after the camera captures the image information of the calibration cutting piece template, and combine the intrinsic and extrinsic parameters of the camera to project the two-dimensional key points and the two-dimensional contour to a preset plane of the world coordinate system to obtain the three-dimensional key points and the three-dimensional contour of the calibration cutting piece template (for reference to steps 010 and 011 described above).
[0139] Then, the sewing device can further divide the three-dimensional key points of the calibration patch template into a plurality of groups according to the three-dimensional key points of the calibration patch template and the pre-set correspondence between the three-dimensional key point groups and the first size parameters, calculate the size parameters of the calibration patch template through each three-dimensional key point group of the calibration patch template, and obtain the second size parameters (for reference to step 04).
[0140] In some embodiments of the present application, referring to Figure 15 , step 03 in the quality detection method comprises:
[0141] 030: determining a rigid transformation matrix of the target patch corresponding to the calibration patch template according to the first two-dimensional key points and the third two-dimensional key points of the calibration patch template;
[0142] 031: determining a rigid transformation after contour of the target patch according to the rigid transformation matrix and the first two-dimensional contour;
[0143] 032: detecting the quality of the target patch according to the rigid transformation after contour and the calibration patch template.
[0144] The detection module of the embodiment of the present application is further configured to determine a rigid transformation matrix of the target patch corresponding to the calibration patch template according to the first two-dimensional key points and the third two-dimensional key points of the calibration patch template, determine a rigid transformation after contour of the target patch according to the rigid transformation matrix and the first two-dimensional contour, and detect the quality of the target patch according to the rigid transformation after contour and the calibration patch template.
[0145] The processor of the embodiment of the present application is further configured to determine a rigid transformation matrix of the target patch corresponding to the calibration patch template according to the first two-dimensional key points and the third two-dimensional key points of the calibration patch template, determine a rigid transformation after contour of the target patch according to the rigid transformation matrix and the first two-dimensional contour, and detect the quality of the target patch according to the rigid transformation after contour and the calibration patch template.
[0146] That is, the embodiment of the present application can further determine the rigid transformation relationship between the target patch and the calibration patch template through the first two-dimensional key points of the target patch and the third two-dimensional key points of the calibration patch template, or the rigid transformation matrix of the first two-dimensional contour to the third two-dimensional contour.
[0147] After obtaining the rigid transformation matrix, the sewing device performs rigid transformation on the first two-dimensional contour, thereby obtaining the changed first two-dimensional contour, i.e., the rigid transformation after contour. It should be understood that the rigid transformation after contour of the target patch matches the third two-dimensional contour of the calibration patch template in size. It should also be understood that the size of the first two-dimensional contour may be increased or reduced before and after the rigid transformation, but the shape of the first two-dimensional contour does not change.
[0148] After obtaining the rigidly transformed contour of the target cutting piece, the sewing device can calculate the similarity between the target cutting piece and the calibration cutting piece template by rigidly transforming the contour of the target cutting piece and the third two-dimensional contour of the calibration cutting piece template. If the similarity is lower than a preset threshold, it is determined that the overall shape of the target cutting piece is not similar to the overall shape of the calibration cutting piece template, and thus it is determined that the shape of the target cutting piece is unqualified, and further it is determined that the quality of the target cutting piece is unqualified.
[0149] Thus, the sewing device of the embodiments of the present application can determine the rigid transformation matrix of the target cutting piece to the calibration cutting piece template according to the first two-dimensional key points of the target cutting piece and the third two-dimensional key points of the calibration cutting piece template, and then rigidly transform the first two-dimensional contour of the target cutting piece by using the rigid transformation matrix, so that the contour shape of the target cutting piece is the same or similar in size to the contour shape of the calibration cutting piece, thereby obtaining the rigidly transformed contour of the target cutting piece. Then, the quality of the target cutting piece is determined according to the rigidly transformed contour and the third two-dimensional contour of the target cutting piece, such as detecting the matching condition of the contour shape of the target cutting piece and the contour shape of the calibration cutting piece template, thereby determining the quality of the target cutting piece. Thus, the sewing device can detect whether the contour shape or overall shape of the target cutting piece meets the standard according to the rigidly transformed contour, so that the quality detection of the cutting piece can be reliably performed.
[0150] In addition, it should be noted that the specific way of obtaining the rigid transformation matrix is content that can be set according to actual conditions. For example, in some embodiments, the specific way can refer to Figure 15 , Figure 16 is a schematic diagram of the application scenario in some embodiments of the present application. That is, the embodiments of the present application can obtain the first two-dimensional key points of the target cutting piece as shown in Figure 18 After obtaining the first two-dimensional key points of the target cutting piece, the midpoint P0 of the 7th key point and the 8th key point is taken as the origin, the direction of the 7th key point pointing to the 8th key point is taken as the positive direction of the first axis, and after determining the midpoint P1 of the 1st key point and the 2nd key point, the direction of P0 pointing to P1 is taken as the positive direction of the second axis, and then the coordinate system in which the first two-dimensional contour of the target cutting piece is located is obtained.
[0151] Then, in a similar manner, after obtaining the coordinate system in which the third two-dimensional contour of the calibration cutting piece template is located, that is, after obtaining the 7th key point, the 8th key point, the midpoint P0, the 1st key point, the 2nd key point and the midpoint P1 of the calibration cutting piece template, the coordinate system in which the third two-dimensional contour of the calibration cutting piece template is located is determined.
[0152] Finally, the rotation matrix, the translation matrix and the scaling coefficient of the transformation of the first two-dimensional contour coordinate system of the target cutting piece to the third two-dimensional contour coordinate system of the calibration cutting piece template are determined, thereby obtaining the above-mentioned rigid transformation matrix.
[0153] In some embodiments of the present application, step 032 in the quality detection method comprises:
[0154] In a case where the first intersection-over-union ratio of the contour after the rigid transformation and the third two-dimensional contour of the calibration template is lower than a first preset ratio, it is determined that the quality of the target template is unqualified.
[0155] The detection module of the embodiment of the present application is further configured to determine that the quality of the target template is unqualified in a case where the first intersection-over-union ratio of the contour after the rigid transformation and the third two-dimensional contour of the calibration template is lower than a first preset ratio.
[0156] The processor of the embodiment of the present application is further configured to determine that the quality of the target template is unqualified in a case where the first intersection-over-union ratio of the contour after the rigid transformation and the third two-dimensional contour of the calibration template is lower than a first preset ratio.
[0157] That is, the embodiment of the present application can determine the similarity of the contour shape of the target template and the calibration template according to the value of the intersection-over-union ratio of the contour after the rigid transformation and the third two-dimensional contour (i.e., the first intersection-over-union ratio).
[0158] Then, in a case where the similarity of the contour shape of the target template and the calibration template is low, or in a case where the first intersection-over-union ratio is lower than the first preset ratio, the sewing equipment can determine that the contour shape or the overall shape of the target template is unqualified, and further determine that the quality of the target template is unqualified.
[0159] Optionally, in some embodiments, in a case where the first intersection-over-union ratio is not lower than the first preset ratio, the sewing equipment can determine that the quality of the target template is qualified.
[0160] It can be understood that the first preset ratio in the embodiment of the present application is a content that can be set according to actual conditions. For example, in some embodiments, because the machine precision of different garment manufacturers is different, the quality requirements of the templates are different, and therefore the specific value of the first preset ratio is determined according to the value input by the user through the terminal.
[0161] Therefore, the embodiment of the present application enables the sewing equipment to determine whether the quality of the target template is qualified according to the first intersection-over-union ratio of the contour after the rigid transformation of the target template and the third two-dimensional contour of the calibration template. For example, in a case where the first intersection-over-union ratio is lower than the first preset ratio, it is determined that there is a large difference in the contour shape between the target template and the calibration template, and further it is determined that the quality of the target template is unqualified. Thus, the sewing equipment can also determine the quality of the target template according to the first intersection-over-union ratio, and the quality detection of the target template can be reliably performed.
[0162] In addition, it can be understood that the manner of obtaining the third two-dimensional contour of the calibration template in the embodiments of the present application can be consistent with the manner of obtaining the first two-dimensional contour of the target template, and the manner of obtaining the third two-dimensional key point of the calibration template in the embodiments of the present application can be consistent with the manner of obtaining the first two-dimensional key point of the target template.
[0163] Specifically, the sewing device can determine the three-dimensional key point and the three-dimensional contour of the calibration template after obtaining the image information of the calibration template. Alternatively, the sewing device can determine the two-dimensional key point and the two-dimensional contour of the calibration template after capturing the image information of the calibration template by the camera, and project the two-dimensional key point and the two-dimensional contour back to the preset plane of the world coordinate system in combination with the intrinsic and extrinsic parameters of the camera to obtain the three-dimensional key point and the three-dimensional contour of the calibration template (which can refer to steps 010 and 011 described above).
[0164] Then, the sewing device can further convert the three-dimensional key point and the three-dimensional contour of the calibration template to the two-dimensional space to obtain the third two-dimensional contour and the third two-dimensional key point. Specifically, in some embodiments, in the case that the three-dimensional contour can be composed of three dimensions of width (corresponding to the X axis), length (corresponding to the Y axis) and width (corresponding to the Z axis), the Z-axis dimension of the three-dimensional key point of the calibration template can be deleted to obtain the third two-dimensional key point, and the Z-axis dimension of the third two-dimensional contour of the calibration template can be deleted to obtain the third two-dimensional contour.
[0165] In addition, it can be understood that the first intersection-over-union ratio can describe the similarity or difference between the target template and the calibration template in the overall shape, however, if the target template and the calibration template only have certain differences in size or contour, but the target template and the calibration template are similar in the overall shape, it means that the target template and the calibration template have a larger overlapping contour, that is, the overlap or intersection of the first two-dimensional contour and the third two-dimensional contour is higher, so that the first intersection-over-union ratio is a higher value, thereby it is difficult to reflect that the target template and the calibration template only have differences in size or contour.
[0166] Therefore, in some embodiments in which the sewing device detects the quality of the template by the first size parameter (corresponding to steps 04 to 05 described above, and steps 050 and 051 described above), the sewing device can determine whether the difference between each first size parameter of the target template and the corresponding second size parameter is within the preset size error, and whether the first intersection-over-union ratio is lower than the first preset ratio after determining the first size parameter of the target size and the post-rigid transformation contour.
[0167] If the difference between each first size parameter of the target template and the corresponding second size parameter is within the preset size error, and the first intersection-over-union ratio is lower than the first preset ratio, the sewing device can determine that the quality of the target template is qualified.
[0168] Conversely, if there is one and more than one first size parameter of the target cutting piece that has a difference from the corresponding second size parameter that is outside the preset size error, or the first intersection-over-union ratio is not lower than the first preset ratio, the sewing equipment can determine that the quality of the target cutting piece is unqualified.
[0169] Further, compared with the way of determining the cutting piece quality through the first intersection-over-union ratio, the way of determining the cutting piece quality through the size parameter can more simply determine whether the target cutting piece has a significant difference from the calibration cutting piece template at a specific position. For example, if the left shoulder width difference is not lower than the preset size error, it can be determined that the left shoulder of the cutting piece has a large deviation from the left shoulder of the calibration cutting piece template. Meanwhile, in the process of determining the cutting piece quality through the size parameter, only the difference between the first size parameter and the second size parameter is compared to determine whether the difference is lower than the preset size error, and the quality inspection can be completed, so the quality inspection efficiency is higher.
[0170] Therefore, in some embodiments of the present application, if the difference between the first size parameter and the corresponding second size parameter of the target cutting piece is less than the preset size error, other quality inspection methods such as detecting the contour shape through the first intersection-over-union ratio are performed. Conversely, if there is one first size parameter that has a difference from the corresponding second size parameter that is not less than the preset size error, the quality of the cutting piece is directly determined to be unqualified, and other quality inspection methods such as detecting the contour shape through the first intersection-over-union ratio are not performed. Therefore, the quality inspection efficiency of the cutting piece can be improved to a certain extent.
[0171] In some embodiments of the present application, referring to Figure 19 , step 03 in the quality detection method comprises:
[0172] 033: determining an affine transformation matrix of the target cutting piece corresponding to the calibration cutting piece template according to the first two-dimensional key points and the third two-dimensional key points of the calibration cutting piece template;
[0173] 034: determining an affine transformation contour of the target cutting piece according to the affine transformation matrix and the first two-dimensional contour;
[0174] 035: detecting the quality of the target cutting piece according to the affine transformation contour and the third two-dimensional contour.
[0175] The detection module of the embodiments of the present application is also used to determine an affine transformation matrix of the target cutting piece corresponding to the calibration cutting piece template according to the first two-dimensional key points and the third two-dimensional key points of the calibration cutting piece template; determine an affine transformation contour of the target cutting piece according to the affine transformation matrix and the first two-dimensional contour; and detect the quality of the target cutting piece according to the affine transformation contour and the third two-dimensional contour.
[0176] The processor of the embodiment of the present application is further configured to determine an affine transformation matrix of the target patch corresponding to the calibration patch template according to the first two-dimensional key points and the third two-dimensional key points of the calibration patch template; determine an affine transformed contour of the target patch according to the affine transformation matrix and the first two-dimensional contour; and detect the quality of the target patch according to the affine transformed contour and the third two-dimensional contour.
[0177] It should be understood that, since the patch is usually made of flexible material, the patch may be deformed, such as stretched or shrunk, during transportation, manufacturing, processing, and the like. Meanwhile, the deformation of the patch may occur in a specific area of the patch, or in other words, the deformation of the patch may occur locally, and the overall shape of the patch does not change greatly. Based on this, the embodiment of the present application determines whether the patch may fail in subsequent patching operations due to local deformation, and therefore further verifies the quality of the patch through affine transformation.
[0178] Specifically, after the sewing device of the embodiment of the present application obtains the first two-dimensional key points of the target patch and the third two-dimensional key points of the calibration patch template, the mapping relationship between the first two-dimensional key points and the third two-dimensional key points is determined based on the key point types, so as to obtain the affine transformation matrix. Specifically, it is assumed that the first two-dimensional key points of the target patch include a collar key point P t1 and a hem key point P t2 , and the third two-dimensional key points of the calibration patch template also include a collar key point P s1 and a hem key point P s2 . Then, the affine transformation matrix includes the mapping relationship of P t1 transformed to P s1 and the mapping relationship of P t2 transformed to P s2 .
[0179] After the sewing device obtains the affine transformation matrix, the first two-dimensional contour is subjected to affine transformation by using the affine transformation matrix, so as to obtain the affine transformed contour.
[0180] It should be further noted that, the proportions of the line segments in the first two-dimensional contour change before and after the affine transformation, but the directions of the line segments do not change, that is, the line segments that are straight lines before the transformation are still straight lines after the transformation, and the line segments that are curves before the transformation are still curves after the transformation. In addition, if the patch is locally deformed, such as locally stretched, so that the contour of the patch deviates from the standard patch (for example, the contour line is distorted from a straight line to a curve), the deviation will be magnified after the affine transformation. Therefore, the affine transformation matrix of the embodiment of the present application can highlight the local deformation of the target patch to a certain extent.
[0181] Therefore, the sewing device can determine the quality of the cutting piece according to the difference between the profile of the cutting piece and the profile of the calibration cutting piece template after the profile of the cutting piece is subjected to the affine transformation, that is, after the distortion of the profile of the cutting piece is highlighted.
[0182] Therefore, the sewing device can determine the quality of the cutting piece according to the difference between the profile of the cutting piece and the profile of the calibration cutting piece template after the profile of the cutting piece is subjected to the affine transformation, that is, after the distortion of the profile of the cutting piece is highlighted.
[0183] Therefore, the sewing device can determine the quality of the cutting piece according to the difference between the profile of the cutting piece and the profile of the calibration cutting piece template after the profile of the cutting piece is subjected to the affine transformation, that is, after the distortion of the profile of the cutting piece is highlighted.
[0184] In some embodiments of the present application, referring to the drawings, step 035 in the quality detection method includes:
[0185] 0350: determining a plurality of reference bounding boxes on the profile after the affine transformation according to the position information of the profile after the affine transformation and the pre-determined size of the bounding box;
[0186] 0351: determining a second intersection-over-union according to any two bounding boxes intersecting in each reference bounding box;
[0187] 0352: determining a plurality of profile line distances according to the distance between the profile after the affine transformation and the third two-dimensional profile in each reference bounding box;
[0188] 0353: detecting the quality of the cutting piece according to the second intersection-over-union and the profile line distance.
[0189] The detection module in the embodiments of the present application is further configured to determine that the quality of the cutting piece is unqualified when the second intersection-over-union of the profile after the affine transformation and the third two-dimensional profile is lower than the second pre-determined ratio.
[0190] The processor in the embodiments of the present application is further configured to determine that the quality of the cutting piece is unqualified when the second intersection-over-union of the profile after the affine transformation and the third two-dimensional profile is lower than the second pre-determined ratio.
[0191] For a clearer description of the embodiments of the present application, refer to Figure 18 and Figure 19 , Figure 18 andFigure 18 These are all schematic diagrams illustrating application scenarios in certain embodiments of this application.
[0192] That is, such as Figure 19 As shown, after performing an affine transformation on the first two-dimensional contour so that the transformed first two-dimensional contour (i.e., the affine-transformed contour) overlaps with the third two-dimensional contour of the target piece, there are regions in the affine-transformed contour that differ from the overlapping region of the third two-dimensional contour, i.e., as shown... Figure 19 In the three white boxes shown, the local contour lines of the affine transformation contour do not completely overlap with the local contour lines of the third two-dimensional contour.
[0193] Therefore, in order to determine whether there is a significant deviation between the contour lines of the affine-transformed contour and the third-dimensional contour in a certain region, this application generates multiple reference candidate boxes with fixed candidate box sizes on the affine-transformed contour. That is, as... Figure 19 As shown, Figure 20 The sewing equipment performs an affine transformation on the first two-dimensional contour based on an affine transformation matrix. After the affine-transformed contour is stacked with the third two-dimensional contour, multiple reference candidate boxes are generated on the contour line of the affine-transformed contour, using the coordinates of points on the contour line as the center of the candidate boxes, and combining this with a pre-determined candidate box size. Figure 20 The white rectangle and the black rectangle.
[0194] Next, for any two intersecting reference candidate boxes, the sewing device can calculate the intersection-union ratio (IoU1) of the two reference candidate boxes to obtain the second IoU1. For example, suppose there are three reference candidate boxes on the contour line of the affine transformation, namely bbox1, bbox2, and bbox3, bbox1 intersects bbox2, and bbox2 intersects bbox3. Then: calculate the IoU1 of bbox1 and bbox2, and calculate the IoU2 of bbox2 and bbox3. Both IoU1 and IoU2 will be one of the second IoU1.
[0195] Simultaneously, for each reference candidate frame, the sewing device will also calculate the distance between the affine transformed contour and the third two-dimensional contour within the reference candidate frame, thereby obtaining the contour line spacing corresponding to each candidate frame. For a clearer illustration of the implementation methods of this application, please refer to... Figure 20 , Figure 20 This is a schematic diagram illustrating application scenarios in certain embodiments of this application, and can also be understood as an internal schematic diagram of the candidate box. That is, the sewing equipment can... Figure 21 The distance between the gray line segment and the black line segment is calculated to obtain... Figure 21 The distance M between the affine transformed contour within the corresponding reference candidate box and the third two-dimensional contour is the contour line spacing.
[0196] It should be understood that since the second intersection-over-union ratio is obtained according to the affine-transformed contour and the distribution of the contour lines along the affine-transformed contour, the higher the second intersection-over-union ratio is, the smaller the difference between the contour lines of the affine-transformed contour in the two intersected reference candidate boxes is, and vice versa.
[0197] For example, if the affine-transformed contour in the two intersected reference candidate boxes is a straight line segment in the ideal case, but due to unexpected deformation, the affine-transformed contour in the two reference candidate boxes is distorted into a line segment similar to a sinusoidal function curve in the actual case, the second intersection-over-union ratio of the two reference candidate boxes can be smaller.
[0198] It should also be understood that the contour line spacing in any one reference candidate box can represent the deviation of the affine-transformed contour from the third two-dimensional contour in the reference candidate box, and the larger the contour line spacing is, the more obvious the difference between the two is.
[0199] Therefore, the embodiments of the present application can determine the distortion of the affine-transformed contour, or the deviation of the affine-transformed contour from the third two-dimensional contour, according to the second intersection-over-union ratio and the contour line spacing.
[0200] In this way, the sewing device can determine or generate a plurality of reference candidate boxes of different sizes on the affine-transformed contour based on the preset candidate box size after obtaining the affine-transformed contour, or after the first two-dimensional contour and the third two-dimensional contour are stacked in the same plane by the affine transformation matrix, determine the second intersection-over-union ratio based on the intersection-over-union ratio of any two reference candidate boxes that intersect after all the reference candidate boxes, and determine the contour line spacing based on the spacing between the affine-transformed contour and the third two-dimensional contour in each reference candidate box, so as to determine the deviation of the affine-transformed contour from the third two-dimensional contour according to the second intersection-over-union ratio and the contour line spacing, complete the quality detection of the target patch, and ensure the reliability and accuracy of the patch quality detection to a certain extent.
[0201] In addition, it can also be understood that in the foregoing embodiment of detecting the quality of the target patch according to the rigidly-transformed contour of the target patch (which can be referred to as steps 030 to 032), the sewing device can determine whether the target patch and the calibration patch template are similar in contour based on the rigidly-transformed contour. In the embodiment of detecting the quality of the target patch according to the second intersection-over-union ratio and the contour line spacing proposed by the present application, it is detected whether the target patch and the target patch template are similar in contour line, or in other words, similar in patch edge region.
[0202] And, the shape of the cutting piece can be detected based on the post-rigid transformation contour, but it is difficult to detect defects or deviations of the edge (or contour line) of the cutting piece. Therefore, in some embodiments, the sewing device can detect the quality of the cutting piece based on the post-rigid transformation contour, the second intersection-over-union ratio, and the contour line spacing, i.e., by performing steps 030 to 032 and steps 033 to 035 (including sub-steps 0350 to 0353) to detect the quality of the target cutting piece.
[0203] In some embodiments of the present application, step 0353 in the quality detection method comprises:
[0204] In the case that there are a preset number of second intersection-over-union ratios lower than the second preset ratio in the plurality of second intersection-over-union ratios, and the maximum value of the plurality of contour line spacings is not lower than the preset spacing, it is determined that the quality of the target cutting piece is unqualified.
[0205] The detection module of the embodiment of the present application is also used to determine that the quality of the target cutting piece is unqualified in the case that there are a preset number of second intersection-over-union ratios lower than the second preset ratio in the plurality of second intersection-over-union ratios, and the maximum value of the plurality of contour line spacings is not lower than the preset spacing.
[0206] The processor of the embodiment of the present application is also used to determine that the quality of the target cutting piece is unqualified in the case that there are a preset number of second intersection-over-union ratios lower than the second preset ratio in the plurality of second intersection-over-union ratios, and the maximum value of the plurality of contour line spacings is not lower than the preset spacing.
[0207] That is, the sewing device of the embodiment of the present application can determine that the contour line (or the edge of the cutting piece) of the target cutting piece has a more obvious defect when it is determined that there are a preset number of second intersection-over-union ratios lower than the second preset ratio in the plurality of second intersection-over-union ratios, and thus determine that the quality of the target cutting piece is unqualified.
[0208] At the same time, the sewing device also determines that there is a larger deviation between the target cutting piece and the calibration cutting piece template on the contour line (or on the edge of the cutting piece) when it is determined that the maximum value of the plurality of contour line spacings is lower than the preset spacing, and thus determines that the quality of the target cutting piece is unqualified.
[0209] It can be understood that the specific values of the preset number, the second preset ratio, and the specific value of the preset spacing in the embodiment of the present application are all content that can be set according to actual conditions. For example, in some embodiments, because the machine precision of different garment manufacturers is different and the quality requirements of cutting pieces are different, the preset number, the second preset ratio, and the preset spacing are determined according to the values input by the user through the terminal.
[0210] Therefore, the sewing device of the embodiments of the present application can detect the quality of the target cutting piece according to the second intersection ratio and the maximum value of the contour line spacing. For example, if the second intersection ratio of the preset number of times is less than the second preset ratio, it is determined that the target cutting piece contour line has obvious defects, and thus the quality of the target cutting piece is determined to be unqualified. Alternatively, if the maximum value of the contour line spacing is less than the preset spacing, it is determined that the target cutting piece has a large deviation from the calibration cutting piece template on the contour line, and thus the quality of the target cutting piece is determined to be unqualified. Thus, the quality detection of the cutting piece can be reliably performed.
[0211] In some embodiments of the present application, please refer to Figure 22 , Figure 21 The flowchart of the cutting piece quality detection method in some embodiments of the present application is shown.
[0212] Specifically, the embodiments of the present application can first generate a calibration cutting piece template. That is, the sewing device can capture a qualified cutting piece (or a cutting piece master) by a camera to obtain image information, determine three-dimensional key points and a three-dimensional contour according to the image information (for reference to the above step 01 and / or the sub-steps 010-011 of step 01). Then, according to the predetermined correspondence between the three-dimensional key points and the size parameters, the second size parameters of the qualified cutting piece are detected (for reference to the above step 04). Then, according to the camera intrinsic and extrinsic parameters, the three-dimensional key points and the three-dimensional contour of the qualified cutting piece are mapped to the two-dimensional space to obtain the third two-dimensional key points and the third two-dimensional contour of the qualified cutting piece (for reference to the above step 02), thereby completing the generation of the calibration cutting piece template.
[0213] When the sewing device triggers the cutting piece quality detection event, that is, the sewing device needs to detect the quality of the target cutting piece, the cutting piece information of the target cutting piece can be obtained, that is, the three-dimensional key points, the three-dimensional contour, the first two-dimensional key points, the first two-dimensional contour and the first size parameters of the target cutting piece. For reference to the above step 01 and / or the sub-steps 010-011 of step 01, and for reference to the above step 02 and the above step 04.
[0214] After obtaining the cutting piece information of the target cutting piece, the sewing device can perform size detection according to the cutting piece information of the target cutting piece, that is, determine whether there is one or more than one first size parameter that does not satisfy the preset size error difference with the corresponding second size parameter among all the first size parameters. If there is, the cutting piece quality is determined to be unqualified. If not, subsequent detection is performed. For reference to the above step 05.
[0215] After the size detection passes, the sewing device determines a rigid transformation matrix of the target panel relative to the calibration panel template according to the first two-dimensional key points and the third two-dimensional key points. Then, the first two-dimensional contour is rigidly transformed by using the rigid transformation matrix to obtain a rigidly transformed contour. After that, it is determined whether the first intersection-over-union of the rigidly transformed contour and the third two-dimensional contour is not less than the first preset ratio. If not, it is determined that the panel quality is unqualified. If yes, it is determined that the shape of the panel is qualified, and subsequent detection is performed. For details, please refer to steps 030 to 032 described above.
[0216] After the shape detection passes, the sewing device determines an affine transformation matrix of the target panel relative to the calibration panel template according to the first two-dimensional key points and the third two-dimensional key points. Then, the first two-dimensional contour is affinely transformed by using the affine transformation matrix to obtain an affinely transformed contour. After that, a plurality of reference candidate boxes are generated on the affinely transformed contour according to the affinely transformed contour and the preset candidate box size. Then, a plurality of second intersection-over-unions are obtained according to the intersection-over-union of any two candidate boxes in the reference candidate boxes that have an intersection relationship. At the same time, a plurality of contour line distances are obtained according to the distance between the affinely transformed contour and the third two-dimensional contour in each reference candidate box. Finally, if there is a preset number of second intersection-over-unions that are lower than the second preset ratio in all the second intersection-over-unions, or the maximum value in the plurality of contour line distances is greater than the preset distance, the sewing edge does not meet the condition, the matching detection fails, and the panel quality is unqualified. For details, please refer to steps 033 to 035 and the sub-steps 0350-0353 of step 035 described above.
[0217] On the contrary, if the matching detection passes, that is, the size detection, the shape detection and the matching detection all pass, it can be determined that the panel quality is qualified.
[0218] Optionally, in some embodiments of the present application, please refer to . That is, the embodiments of the present application further add the sewing detection of the back and front panels on the basis of . That is, in the matching detection, in addition to detecting whether the sewing edge between the target panel and the calibration panel template meets the condition, it is also detected whether the sewing edge between the target panel and the corresponding back panel and / or the corresponding front panel meets the condition.
[0219] Specifically, assuming the target patch is a back patch, after obtaining the first two-dimensional contour and the first two-dimensional key point of the target patch, according to the two-dimensional contour and the two-dimensional key point of the front patch corresponding to the target patch, the corresponding affine transformation matrix and the affine transformed contour (assuming the affine transformed contour is T) are obtained. Then, similar to the aforementioned steps 033 to 035, and the sub-steps 0350-0353 of step 035, it is determined whether there is a second intersection-over-union ratio less than the second preset ratio among all the second intersection-over-union ratios corresponding to T, and whether the maximum value among the plurality of contour line distances corresponding to T is greater than the preset distance. If there is no second intersection-over-union ratio less than the second preset ratio, and the maximum value is not greater than the preset distance, then whether the stitched edge meets the condition, and the matching test passes.
[0220] The application further provides a computer readable storage medium, which stores a computer program, and when the computer program is executed by one or more processors, the above-mentioned patch quality detection method is realized.
[0221] In the description of the present specification, the description referring to the terms "specifically", "further", "particularly", "can be understood", and the like means that the specific features, structures, materials, or characteristics described in connection with the embodiments or examples are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not mean to refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the present specification and the features of the different embodiments or examples without contradiction.
[0222] Any process or method descriptions in flow charts or described elsewhere herein can be understood as representing one or more steps in a set of steps performed in support of one or more functions or processes described herein, and that the presentation of steps in a specific order should not be understood to necessarily require that such steps be performed in that specific order, nor that all illustrated steps be performed to support one or more functions or processes described herein. One will further appreciate that a variety of "logic" described herein, such as in the form of modules, can be implemented in hardware, software, firmware, or any combination thereof.
[0223] Although the embodiments of the present application have been shown and described above, it should be understood that the above-described embodiments are exemplary, and should not be construed as limiting the present application, and those of ordinary skill in the art can make changes, modifications, replacements and variations to the above-described embodiments within the scope of the present application.
Claims
1. A method of quality detection of a cut piece, characterized by, The method comprises the following steps: According to the image information of the target cutting sheet obtained, the three-dimensional contour and the three-dimensional key point of the target cutting sheet are determined; According to the three-dimensional contour and the three-dimensional key point, the first two-dimensional contour and the first two-dimensional key point of the target cutting sheet are determined; According to the first two-dimensional contour, the first two-dimensional key point and the pre-determined calibration cutting sheet template, the quality of the target cutting sheet is detected; According to the first two-dimensional contour, the first two-dimensional key point and the pre-determined calibration cutting sheet template, the quality of the target cutting sheet is detected, which comprises the following steps: According to the first two-dimensional key point and the third two-dimensional key point of the calibration cutting sheet template, the affine transformation matrix corresponding to the target cutting sheet and the calibration cutting sheet template is determined; According to the affine transformation matrix and the first two-dimensional contour, the affine transformation contour of the target cutting sheet is determined; According to the affine transformation contour and the third two-dimensional contour of the calibration cutting sheet template, the quality of the target cutting sheet is detected; According to the affine transformation contour and the third two-dimensional contour, the quality of the target cutting sheet is detected, which comprises the following steps: According to the position information of the affine transformation contour and the pre-determined candidate box size, a plurality of reference candidate boxes on the affine transformation contour are determined; According to the intersection-over-union of any two candidate boxes intersected in each reference candidate box, a second intersection-over-union is determined; According to the distance between the affine transformation contour and the third two-dimensional contour in each reference candidate box, a plurality of contour line distances are determined; According to the second intersection-over-union and the contour line distance, the quality of the target cutting sheet is detected.
2. The method of claim 1, wherein, According to the image information of the target cutting sheet obtained, the three-dimensional contour and the three-dimensional key point of the target cutting sheet are determined, which comprises the following steps: According to the image information captured by the camera, the second two-dimensional contour and the second two-dimensional key point of the target cutting sheet are determined; According to the second two-dimensional contour, the second two-dimensional key point and the camera calibration parameter of the camera, the three-dimensional contour and the three-dimensional key point in the world coordinate system are determined.
3. The method of claim 1, wherein, The three-dimensional key point comprises a plurality of groups, each group of the three-dimensional key point comprises two three-dimensional key points, a plurality of first size parameters, each group of the three-dimensional key point corresponds to a first size parameter, and the method further comprises the following steps: Based on the pre-set mapping relationship between the key point and the first size parameter and the position information of the two three-dimensional key points in each group of the three-dimensional key point, each first size parameter of the target cutting sheet is determined; According to the first size parameter and the calibration cutting sheet template, the quality of the target cutting sheet is detected.
4. The method of claim 3, wherein, According to the first size parameter and the calibration cutting sheet template, the quality of the target cutting sheet is detected, which comprises the following steps: According to each first size parameter and the corresponding second size parameter of the calibration cutting sheet template, the difference of each size parameter between the target cutting sheet and the calibration cutting sheet template is determined; In the case that at least one of the size parameter differences does not meet the pre-set size error, it is determined that the quality of the target cutting sheet is unqualified.
5. The method of claim 1, wherein, The method further comprises: determining a rigid transformation matrix of the target patch corresponding to the calibration patch template according to the first two-dimensional key points and third two-dimensional key points of the calibration patch template; determining a rigid transformation post-contour of the target patch according to the rigid transformation matrix and the first two-dimensional contour; detecting the quality of the target patch according to the rigid transformation post-contour and the calibration patch template.
6. The method of claim 5, wherein, The method further comprises: in a case that a first intersection-over-union of the rigid transformation post-contour and third two-dimensional contour of the calibration patch template is lower than a first preset ratio, determining that the quality of the target patch is unqualified.
7. The method of claim 1, wherein, The method further comprises: in a case that a preset number of the second intersection-over-unions are lower than a second preset ratio, and a maximum value of the contour line distances is higher than a preset distance, determining that the quality of the target patch is unqualified.
8. A sewing apparatus characterized by comprising: A device comprises a memory and a processor, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1-7.
Citation Information
Patent Citations
Defect detection system
CN110161053A
Object size measurement method, device and equipment and storage medium
CN112683169A