A Carbon Bowl Positioning Method, Device and Medium Based on Key Point Detection
By performing depth map processing and key point detection on the point cloud data of the carbon block, the center coordinates and angles of the carbon bowl are calculated, and the problem of positioning of the carbon bowl during grinding of the carbon block is solved, achieving high-precision and high-efficiency carbon bowl positioning.
Patent Information
- Application Number
- CN202411149299.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2044-08-21
AI Technical Summary
During the grinding of the carbon block, it is difficult to accurately locate the carbon bowl. The existing methods are inefficient and have insufficient accuracy, so they cannot meet the actual production needs.
By obtaining the point cloud data of the carbon block, mapping it as a carbon bowl depth map, performing circular fitting and key point detection, and calculating the center coordinates and angles of the carbon bowl to achieve accurate positioning of the carbon bowl.
It improves the accuracy and efficiency of the positioning of the charcoal bowl, reduces the cost and error of manual operation, and is suitable for situations where the charcoal bowl shape is irregular or the keyway characteristics are not obvious during the grinding of the charcoal block.
Smart Images

Figure CN119098825B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial automation, and particularly to a carbon bowl positioning method, device and medium based on key point detection. Background Art
[0002] Carbon block grinding is an indispensable link in the carbon block production process. For the carbon blocks produced by primary processing, their outer surfaces are usually very rough, covered with cracks, defects and carbon slag, and need to be ground to make their surfaces smooth before they can be sold on the market; the positioning of the carbon bowl center and the grinding of the inner wall of the carbon bowl are the most critical and difficult links in the production process. Common carbon blocks usually contain 4 carbon bowls, and 6 key grooves are distributed on the edge of each carbon bowl, with an interval of 60 degrees between any two adjacent key grooves, but the key groove directions of each carbon bowl are different. At present, there are mainly two methods for carbon bowl positioning: one is to rely on manual search for the carbon bowl center and move the grinding device to grind the inner wall of the carbon bowl; the other is to use methods such as key groove segmentation models or template matching to find the key grooves of the carbon bowl, and then estimate the center of the carbon bowl and the direction of the key grooves.
[0003] However, on the one hand, the method of relying on manual search for the carbon bowl center and moving the grinding device to grind the inner wall of the carbon bowl has low efficiency and high labor costs. At the same time, the on-site working environment has a large amount of dust, which is harmful to the human body and is not conducive to production manufacturers to enhance their competitiveness; on the other hand, the method of using methods such as key groove segmentation models or template matching to find the key groove positions and then estimate the carbon bowl angle has insufficient accuracy. In the case of low-quality carbon blocks and unclear carbon bowl key grooves, this method has a high false alarm rate and cannot meet the actual production needs. Summary of the Invention
[0004] The present invention provides a carbon bowl positioning method, device and medium based on key point detection to solve the problem of difficult accurate positioning of carbon bowls during carbon block grinding.
[0005] Obtain the point cloud data of the carbon block and map the point cloud data into a carbon bowl depth map;
[0006] Perform circle fitting on the carbon bowl depth map to obtain the center of the fitted circle;
[0007] Perform key point detection on the carbon bowl depth map to obtain the center key point and the key point position set of the key groove;
[0008] Calculate the carbon bowl center coordinates according to the center of the fitted circle and the center key point;
[0009] Calculate the carbon bowl angle according to the angle value between the key point position set of the key groove and the carbon bowl center coordinates;
[0010] Locate the carbon bowl in the carbon bowl depth map according to the carbon bowl center coordinates and the carbon bowl angle.
[0011] By acquiring the point cloud data of the carbon block and mapping it into a depth map, the present invention can more accurately represent the shape and contour of the carbon block in three-dimensional space. By performing circular fitting on the depth map of the carbon bowl, it is possible to find an optimal circular boundary through mathematical methods based on the pixel points or depth data of the edge of the carbon bowl, thereby determining the center position of the carbon bowl, effectively reducing the errors caused by factors such as the irregular shape, blurred edge, or noise interference of the carbon bowl, and ensuring the accuracy of the center of the fitted circle. Using key point detection technology, it is possible to accurately identify the center of the circle and the center point of the keyway in the depth map of the carbon bowl. Calculating the center coordinates of the carbon bowl based on the center of the fitted circle and the key point of the center can reduce the errors that may be brought by a single center calculation method and ensure the effectiveness of the center coordinates of the carbon bowl. In practical applications, the depth map of the carbon bowl may be interfered by various factors such as noise, light changes, and surface defects. Calculating the angle of the carbon bowl based on the specific feature of the position of the key point of the keyway can, to a certain extent, resist these interference factors and ensure the accuracy of the angle of the carbon bowl. Therefore, finally, based on the center coordinates of the carbon bowl and the angle of the carbon bowl, it is possible to effectively locate the carbon bowl in the depth map of the carbon bowl.
[0012] Compared with the prior art, the present invention initially calculates the center of the carbon bowl in two different ways, and then comprehensively calculates the center coordinates of the carbon bowl, which can reduce the errors that may be brought by a single center calculation method; then, based on the center coordinates of the carbon bowl and combined with the set of key point positions of the keyway, the angle of the carbon bowl is calculated, which can resist the interference of factors such as noise. Finally, by combining the center coordinates of the carbon bowl and the angle of the carbon bowl, precise positioning of the carbon bowl in three-dimensional space can be achieved, so that the problem of difficult accurate positioning of the carbon bowl during carbon block grinding can be solved.
[0013] As a preferred solution, circular fitting is performed on the depth map of the carbon bowl to obtain the center of the fitted circle, specifically:
[0014] Perform carbon bowl circular annotation on the depth map of the carbon bowl to obtain a carbon bowl circular label map;
[0015] Perform segmentation processing on the carbon bowl circular label map to obtain a segmented graph;
[0016] Generate a mask with the same size as the depth map of the carbon bowl for the segmented graph to obtain a carbon bowl mask;
[0017] Fit the boundary points of the carbon bowl mask into a standard circle, and use the center of the standard circle as the center of the fitted circle; wherein, the standard circle refers to a circle with a fixed radius and center.
[0018] This preferred solution performs circular annotation on the carbon bowl depth map, which can provide data information for accurately distinguishing and positioning the carbon bowl area in the subsequent process. By performing segmentation processing on the carbon bowl circular label map, the background and other unnecessary information are removed. By fitting the boundary points of the carbon bowl mask into a standard circle, an optimal fitting circle can be found to represent the shape of the carbon bowl, facilitating the determination of the center of the circle.
[0019] As a preferred solution, key point detection is performed on the carbon bowl depth map to obtain the position sets of the center key point and the key slot key point, specifically:
[0020] A regular hexagon is generated based on the center of the carbon bowl of the carbon bowl circular label map, so that the 6 vertices of the regular hexagon are aligned with the center of the carbon bowl key slot, obtaining a hexagon key point annotation map;
[0021] Key point detection is performed on the hexagon key point annotation map through a preset key point detection model to obtain the position sets of the center key point and the key slot key point.
[0022] This preferred solution is generated based on a regular hexagon centered on the carbon bowl, which can provide a preliminary and relatively accurate estimation of the key slot center position. This geometric constraint helps the key point detection model to more accurately locate the key slot center in the case of low image quality or unclear key slot features. Moreover, compared with directly performing unconstrained key point detection on the entire image, since the key point detection model only needs to search for key points within the range of the vertices of the hexagon without traversing the entire image, detecting based on the hexagon key point annotation map can significantly reduce the computational complexity and time.
[0023] As a preferred solution, according to the center of the fitted circle and the center key point, the carbon bowl center coordinates are calculated, specifically:
[0024] Calculate the Euclidean distance between the center of the fitted circle and the center key point to obtain the first distance;
[0025] If the first distance is greater than or equal to a preset threshold, the carbon block is polished through a re-inspection method;
[0026] If the first distance is less than the preset threshold, the average value of the center of the fitted circle and the center key point is used as the carbon bowl center coordinates.
[0027] In this preferred solution, by calculating the Euclidean distance between the center of the fitted circle and the key point of the center obtained through key point detection, the deviation between the two can be quantified. When the distance between the center of the fitted circle and the key point of the center is greater than or equal to the preset threshold, it means that there are large deviations or irregularities in the shape or position of the carbon bowl. At this time, problems can be discovered and corrected in a timely manner through re-inspection and polishing to ensure the quality and consistency of the final product. Moreover, when the first distance is less than the preset threshold, by averaging the center coordinates obtained by using two different methods, the error that may be brought by a single method can be reduced.
[0028] As a preferred solution, according to the angular value between the key point position set of the key slot and the center coordinates of the carbon bowl, the carbon bowl angle is calculated specifically as follows:
[0029] Taking the vertical direction of the center coordinates of the carbon bowl as the reference, calculate the clockwise rotation angle of the position of the first key point in the key point position set of the key slot to obtain the first angular value;
[0030] Convert the first angular value to within the preset angular range to obtain the initial carbon bowl angle;
[0031] Traverse the key point position set of the key slot to obtain a number of initial carbon bowl angles;
[0032] Take the mean value of the number of initial carbon bowl angles as the carbon bowl angle.
[0033] This preferred solution measures the angle with the vertical direction of the center coordinates of the carbon bowl as the reference, ensuring the consistency and stability of the measurement reference, which helps to reduce the error caused by the change of the reference. In practical applications, images or data may be affected by factors such as noise and interference. By performing multi-point measurement and taking the mean value, these factors' interference on the measurement result can be better resisted, and the influence of the measurement error of a single point on the final result can be significantly reduced, thereby improving the accuracy and robustness of the measurement.
[0034] The present invention provides a carbon bowl positioning device based on key point detection, including a depth module, a fitting module, a detection module, a coordinate module, an angle module, and a positioning module;
[0035] Among them, the depth module is used to obtain the point cloud data of the carbon block and map the point cloud data into a carbon bowl depth map;
[0036] The fitting module is used to perform circle fitting on the carbon bowl depth map to obtain the center of the fitted circle;
[0037] The detection module is used to perform key point detection on the carbon bowl depth map to obtain the key point of the center and the key point position set of the key slot;
[0038] The coordinate module is used to calculate the carbon bowl center coordinates based on the center of the fitted circle and the center key points of the circle.
[0039] The angle module is used to calculate the carbon bowl angle based on the angular values between the key point position set of the keyway and the carbon bowl center coordinates.
[0040] The positioning module is used to position the carbon bowl in the carbon bowl depth map according to the carbon bowl center coordinates and the carbon bowl angle.
[0041] As a preferred solution, the fitting module includes a labeling unit, a segmentation unit, a masking unit, and a center unit.
[0042] Among them, the labeling unit is used to label the carbon bowl circle on the carbon bowl depth map to obtain a carbon bowl circle label map.
[0043] The segmentation unit is used to perform segmentation processing on the carbon bowl circle label map to obtain a segmented graph.
[0044] The masking unit is used to generate a mask with the same size as the carbon bowl depth map for the segmented graph to obtain a carbon bowl mask.
[0045] The center unit is used to fit the boundary points of the carbon bowl mask into a standard circle and use the center of the standard circle as the center of the fitted circle; where the standard circle refers to a circle with a fixed radius and center.
[0046] As a preferred solution, the detection module includes a labeling unit and a detection unit.
[0047] Among them, the labeling unit is used to generate a regular hexagon based on the center of the carbon bowl in the carbon bowl circle label map, align the 6 vertices of the regular hexagon with the center of the carbon bowl keyway, and obtain a hexagonal key point labeling map.
[0048] The detection unit is used to perform key point detection on the hexagonal key point labeling map through a preset key point detection model to obtain the center key points and the key point position set of the keyway.
[0049] As a preferred solution, the coordinate module includes a distance unit, a grinding unit, and a coordinate unit.
[0050] Among them, the distance unit is used to calculate the Euclidean distance between the center of the fitted circle and the center key points to obtain a first distance.
[0051] The grinding unit is used to grind the carbon block by means of re-inspection if the first distance is greater than or equal to a preset threshold.
[0052] The coordinate unit is configured to use the mean value of the center of the fitted circle and the key point of the center as the coordinate of the center of the carbon bowl if the first distance is less than the preset threshold value.
[0053] As a preferred solution, the angle module includes a rotation unit, a conversion unit, a synthesis unit, and a calculation unit;
[0054] Among them, the rotation unit is configured to calculate the clockwise rotation angle of the position of the first key point in the concentration of the key point positions of the key groove with respect to the vertical direction of the coordinate of the center of the carbon bowl, and obtain a first angle value;
[0055] The conversion unit is configured to convert the first angle value within a preset angle range to obtain an initial carbon bowl angle;
[0056] The synthesis unit is configured to traverse the set of key point positions of the key groove to obtain a plurality of initial carbon bowl angles;
[0057] The calculation unit is configured to use the mean value of the plurality of initial carbon bowl angles as the carbon bowl angle.
[0058] The present application also provides a storage medium, on which a computer program is stored, and the computer program is called and executed by a computer to implement the above-mentioned carbon bowl positioning method based on key point detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Figure 1 is a schematic flowchart of a carbon bowl positioning method based on key point detection provided by an embodiment of the present application;
[0060] Figure 2 is a global depth map of a carbon block provided by an embodiment of the present application;
[0061] Figure 3 is a carbon bowl area map provided by an embodiment of the present application;
[0062] Figure 4 is a data annotation map of a semantic segmentation model provided by an embodiment of the present application;
[0063] Figure 5 is a segmentation map provided by an embodiment of the present application;
[0064] Figure 6 is a schematic structural diagram of a deep learning model Pointrend provided by an embodiment of the present application;
[0065] Figure 7 is a hexagonal key point annotation map provided by an embodiment of the present application;
[0066] Figure 8 is a schematic diagram of the center of the carbon bowl and the center of the key groove provided by an embodiment of the present application;
[0067] Figure 9 It is a schematic structural diagram of the deep learning model RTMPose provided by an embodiment of the present application;
[0068] Figure 10 It is a schematic diagram for calculating the angles of key points provided by an embodiment of the present application;
[0069] Figure 11 It is the overall flowchart provided by an embodiment of the present application;
[0070] Figure 12 It is a schematic structural diagram of a carbon bowl positioning device based on key point detection provided by an embodiment of the present application. Detailed implementation manners
[0071] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0072] In the description of the present application, it should be understood that the terms "first", "second", and "third" are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first", "second", and "third" may explicitly or implicitly include one or more of such features. In the description of the present application, unless otherwise stated, the meaning of "several" is two or more.
[0073] A carbon bowl positioning method based on key point detection provided by an embodiment of the present application is mainly applied to the situation where it is necessary to accurately position the carbon bowl in the carbon block, so as to accurately polish the inner wall of the carbon bowl.
[0074] Embodiment 1:
[0075] Please refer to Figure 1 , an embodiment of the present application provides a carbon bowl positioning method based on key point detection, including S1 to S6, and the specific implementation steps are as follows:
[0076] S1. Obtain the point cloud data of the carbon block and map the point cloud data into a carbon bowl depth map.
[0077] The specific content of step S1 in the embodiment of the present application is:
[0078] Obtain the point cloud data of the carbon block through a 3D camera directly above the carbon block, and map the point cloud data into a global depth map;
[0079] Four charcoal bowl regions are cut out from the global depth map to obtain four charcoal bowl depth maps; and, since the positions of the four charcoal bowls on the charcoal block are relatively fixed, this embodiment only requires that the cutout region of the global depth map include the complete charcoal bowl;
[0080] Among them, the point cloud data of the carbon block and the global depth map can be mapped to each other, and the mapping relationship is:
[0081]
[0082] Among them, u and v are arbitrary coordinate points of the image, u 0 and v 0 is the center coordinate of the image, x w ,y w and z w Represents the three-dimensional coordinate point of the point cloud data; z c Represents the z-axis value of the camera coordinates, that is, the distance from the target to the camera; dx, dy, and f are the parameters of the camera itself.
[0083] To apply the embodiments of this application, please refer to Figure 2 , Figure 2 This is a global depth map of the carbon block provided in an embodiment of the present application.
[0084] To apply the embodiments of this application, please refer to Figure 3 , Figure 3 is a charcoal bowl area diagram provided in an embodiment of the present application, Figure 3 The first module and the second module in the figure both represent four carbon bowl areas cut out from the global depth map, but the carbon blocks shown in the first module are of better quality, while the carbon blocks shown in the second module are of poor quality.
[0085] S2. Perform circle fitting on the carbon bowl depth map to obtain the center of the fitting circle.
[0086] Step S2 of the embodiment of the present application is specifically as follows:
[0087] For the charcoal bowl depth map A among the four charcoal bowl depth maps 1 Carry out carbon bowl circle labeling to obtain a carbon bowl circle label diagram;
[0088] Segment the charcoal bowl circle label image to obtain a segmented image;
[0089] Use the segmentation model PointRend to generate a depth map A for the segmentation graph that is similar to the charcoal bowl 1 A mask of the same size as , to obtain a charcoal bowl mask;
[0090] Then, the boundary points of the carbon bowl mask are fitted into a standard circle, and the center of the standard circle is used as the center C1 of the fitting circle; wherein the standard circle refers to a circle with a fixed radius and center;
[0091] Among them, the construction process of the segmentation model PointRend is as follows:
[0092] Collect a large number of carbon bowl pictures for manual annotation, and then use the annotated carbon bowl pictures to train the segmentation model PointRend;
[0093] Finally, integrate the trained segmentation model PointRend onto the hardware, so that whenever a carbon bowl picture is input, the system can immediately output the position of the mask through the segmentation model PointRend for subsequent steps of carbon block grinding.
[0094] For applying the embodiments of the present application, please refer to Figure 4 , Figure 4 which is the semantic segmentation model data annotation diagram provided by the embodiments of the present application. Figure 4 In, the first module represents the original carbon bowl picture, the second module represents the annotation process, and the third module represents the circular label picture of the carbon bowl after annotation.
[0095] For applying the embodiments of the present application, please refer to Figure 5 , Figure 5 which is the segmentation diagram provided by the embodiments of the present application. Figure 5 In, the first module represents the original carbon bowl picture; the second module represents the mask superimposed on the original carbon bowl picture.
[0096] For applying the embodiments of the present application, please refer to Figure 6 , Figure 6 which is the structural schematic diagram of the deep learning model Pointrend provided by the embodiments of the present application, representing the network structure of the segmentation model Pointrend.
[0097] In the embodiments of the present application, S2 performs carbon bowl circle annotation on the carbon bowl depth map, which can provide data information for accurately distinguishing and positioning the carbon bowl area in the subsequent steps. By performing segmentation processing on the carbon bowl circle label map, the background and other unnecessary information are removed. By fitting the boundary points of the carbon bowl mask into a standard circle, an optimal fitting circle can be found to represent the shape of the carbon bowl, facilitating the determination of the center of the circle.
[0098] S3. Perform key point detection on the carbon bowl depth map to obtain the position sets of the center key point and the key groove key point.
[0099] The specific steps of S3 in the embodiments of the present application are as follows:
[0100] Generate a regular hexagon according to the center of the carbon bowl of the carbon bowl circle label map, and the regular hexagon can be scaled and rotated; align the 6 vertices of the regular hexagon with the center of the carbon bowl key groove to obtain a hexagonal key point annotation map; moreover, the label of the hexagonal key point annotation map is the carbon bowl center coordinate and the six vertex coordinates of the regular hexagon.
[0101] Perform key point detection on the hexagonal key point annotation map through the preset key point detection model RTMPose to obtain the center key point C2 of the circle and the set P6 of the positions of the key groove key points; among them, the key groove key point refers to the center of the key groove.
[0102] Among them, the construction process of the key point detection model RTMPose is as follows:
[0103] Collect a large number of carbon bowl pictures for manual annotation, and then use the annotated carbon bowl pictures to train the key point detection model RTMPose;
[0104] Finally, integrate the trained key point detection model RTMPose onto the hardware;
[0105] So that whenever a carbon bowl picture is input, the system can immediately output the center key point of the carbon bowl picture and the positions of the key groove key points through the key point detection model RTMPose, which are used for the subsequent steps of carbon block grinding.
[0106] For applying the embodiments of the present application, please refer to Figure 7 , Figure 7 which is the hexagonal key point annotation map provided by the embodiments of the present application, representing the result of hexagonal key point annotation of the carbon bowl.
[0107] For applying the embodiments of the present application, please refer to Figure 8 , Figure 8 which is a schematic diagram of the center of the carbon bowl and the center of the key groove provided by the embodiments of the present application, representing the center of the carbon bowl and the center of the key groove obtained based on the key point detection model RTMPose, Figure 8 where the six points approximately evenly distributed on the circle represent the six key groove centers, and the point at the center of the circle represents the center of the carbon bowl.
[0108] For applying the embodiments of the present application, please refer to Figure 9 , Figure 9 which is a schematic structural diagram of the deep learning model RTMPose provided by the embodiments of the present application, representing the network structure of the key point detection model RTMPose.
[0109] Based on the generation of a regular hexagon centered on the center of the carbon bowl, the embodiments of the present application can provide a preliminary and relatively accurate estimation of the position of the key groove center. This geometric constraint helps the key point detection model to more accurately locate the key groove center in the case of low image quality or unclear key groove features. Moreover, compared with directly performing unconstrained key point detection on the entire image, since the key point detection model only needs to search for key points within the range of the vertices of the hexagon without traversing the entire image, detecting based on the hexagonal key point annotation map can significantly reduce the computational complexity and time.
[0110] S4. Calculate the center coordinates of the carbon bowl based on the center of the fitted circle and the key point of the center.
[0111] Step S4 of the embodiment of the present application is specifically as follows:
[0112] Calculate the Euclidean distance between the center C1 of the fitted circle and the key point C2 of the center to obtain the first distance D1;
[0113] If the first distance D1 is greater than or equal to the preset threshold, the carbon block is flowed out to the manual re-inspection area, and at the same time, the position of the carbon bowl is recorded, and the system alarms to notify manual processing: manually review whether the carbon bowl is normal and whether the carbon block is usable. If it is usable, manual grinding treatment is performed;
[0114] If the first distance D1 is less than the preset threshold, the average value of the center C1 of the fitted circle and the key point C2 of the center is used as the center coordinates C of the carbon bowl;
[0115] Among them, the preset threshold can be taken as 5 pixels.
[0116] It should be noted that if the first distance D1 is greater than or equal to the preset threshold, it means that the irregularity degree of the carbon bowl is relatively large and the center of the carbon bowl cannot be accurately calculated. Since the purpose of positioning the carbon bowl is to let the robotic arm polish and clean the carbon block, when the center cannot be accurately positioned (indicating that the shape of the carbon bowl may be damaged or deformed), the background system will not issue an instruction for the robotic arm to polish, so the carbon block is directly flowed out to the manual re-inspection area for inspection; if the first distance D1 is less than the preset threshold, it means that the center positions obtained by the two methods are close, and the accurate center position of the carbon bowl can be obtained.
[0117] In step S4 of the embodiment of the present application, by calculating the Euclidean distance between the center of the fitted circle and the key point of the center obtained by key point detection, the deviation between the two can be quantified. When the distance between the center of the fitted circle and the key point of the center is greater than or equal to the preset threshold, it means that there is a large deviation or irregularity in the shape or position of the carbon bowl. At this time, problems can be timely discovered and corrected through re-inspection and grinding to ensure the quality and consistency of the final product. And when the first distance is less than the preset threshold, by averaging the center coordinates obtained by using two different methods, the error that may be brought by a single method can be reduced.
[0118] S5. Calculate the angle of the carbon bowl according to the angle value between the key point position set of the keyway and the center coordinates of the carbon bowl.
[0119] Step S5 of the embodiment of the present application includes S5.1 to S5.2, specifically as follows:
[0120] S5.1. Calculate the clockwise rotation angle of the first keyway key point position P[1] in the keyway key point position set P6 with respect to the vertical 12 o'clock direction of the carbon bowl center coordinate C to obtain the first angle value;
[0121] Convert the first angle value to the range of [0°, 60°) to obtain the initial carbon bowl angle A[1];
[0122] Traverse the keyway key point position set to obtain a number of initial carbon bowl angles A[6];
[0123] Take the average value of the number of initial carbon bowl angles A[6] as the carbon bowl angle A.
[0124] It should be noted that each carbon bowl has 6 keyways, and the 6 keyways are evenly distributed along the edge of the carbon bowl; that is, the included angle between any two adjacent keyways is 60 degrees. It should be noted that although the included angle between any two adjacent keyways is equal, the distribution of the 6 keyways along the edge of the carbon bowl is different, so it can be considered that the value range of the carbon bowl angle is: 0° can be taken but 60° cannot be taken.
[0125] For the application of the embodiments of the present application, please refer to Figure 10 , Figure 10 is a schematic diagram of calculating the key point angle provided by the embodiments of the present application, which shows the angle value when performing angle conversion to obtain the initial carbon bowl angle. Figure 10 In, C is the carbon bowl center coordinate, T represents the vertical 12 o'clock direction of the carbon bowl center coordinate C, P represents the keyway key point position. After the angle value is converted, the initial carbon bowl angle (that is, the clockwise marked included angle between TC and PC) needs to be less than 60°;
[0126] For example, assuming that the calculated angle value is 119°, the converted initial carbon bowl angle is 59°; assuming that the calculated angle value is 120°, the converted initial carbon bowl angle is 0°; assuming that the calculated angle value is 121°, the converted initial carbon bowl angle is 1°.
[0127] In the embodiment S5.1 of the present application, the angle measurement is carried out with respect to the vertical direction of the carbon bowl center coordinate, which ensures the consistency and stability of the measurement reference, and helps to reduce the error caused by the change of the reference. In practical applications, images or data may be affected by factors such as noise and interference. By performing multi-point measurement and taking the average value, it is possible to better resist the interference of these factors on the measurement result and significantly reduce the influence of the single-point measurement error on the final result, thereby improving the accuracy and robustness of the measurement.
[0128] S5.2. Calculate the absolute value of the difference between each of the number of initial carbon bowl angles A[6] and the carbon bowl angle A respectively to obtain an absolute value set;
[0129] If all the absolute values in the absolute value set are less than 2°, it indicates that the detected key points are evenly distributed, and the average angle A is used as the final carbon bowl angle;
[0130] If any absolute value in the absolute value set is greater than or equal to 2°, it indicates that there is an abnormality in the detected key points. The background system is controlled to prohibit issuing commands for the robotic arm to polish, and the carbon block is directly flowed out to the manual re-inspection area. At the same time, the position of this carbon bowl is recorded, and the system alarms to notify manual handling: Manually review whether the carbon bowl is normal and whether the carbon block is usable. If it is usable, then manually perform the polishing process.
[0131] In the embodiment S5.2 of the present application, verifying the accuracy of the key point positions of the key slots can ensure the effectiveness of the carbon bowl angle; Since the 6 key slots of the carbon bowl are equally spaced, the 6 key slot angle values A[6] calculated based on the 6 key slot key points should not differ much. At the same time, the calculated average angle A also does not differ much from the 6 key slot angle values A[6]. Therefore, by calculating the absolute values of the differences between the 6 key slot angle values A[6] and the average angle A respectively, the effectiveness of the average angle can be judged.
[0132] S6. Locate the carbon bowl in the carbon bowl depth map according to the carbon bowl center coordinates and the carbon bowl angle.
[0133] The specific steps of the embodiment S6 of the present application are as follows:
[0134] Locate the carbon bowl in the carbon bowl depth map A according to the carbon bowl center coordinates C and the average angle A 1 in the carbon bowl;
[0135] Traverse the remaining carbon bowl depth maps in the four carbon bowl depth maps, and obtain the corresponding carbon bowl center coordinates and carbon bowl angles respectively to locate the carbon bowls in the remaining carbon bowl depth maps, and obtain the positioning results;
[0136] Polish the inner wall of the carbon bowl of the carbon block according to the positioning results.
[0137] To apply the embodiment of the present application, please refer to Figure 11 , Figure 11 is the overall flowchart provided by the embodiment of the present application, showing the general process of locating the carbon bowl according to the carbon bowl center coordinates C and the average angle A obtained by calculation in this Embodiment 1.
[0138] Overall, this embodiment has the following beneficial effects:
[0139] By acquiring the point cloud data of the carbon block and mapping it into a depth map, the present invention can more accurately represent the shape and contour of the carbon block in three-dimensional space. By performing circle fitting on the depth map of the carbon bowl, it is possible to find an optimal circular boundary through mathematical methods based on the pixel points or depth data of the carbon bowl edge, thereby determining the center position of the carbon bowl, effectively reducing the errors caused by factors such as irregular carbon bowl shape, blurred edge, or noise interference, and ensuring the accuracy of the center of the fitted circle. Using the key point detection technology, it is possible to accurately identify the center of the carbon bowl and the center points of the key grooves in the depth map of the carbon bowl. Calculating the carbon bowl center coordinates based on the center of the fitted circle and the key point of the center can reduce the errors that may be brought by a single center calculation method and ensure the effectiveness of the carbon bowl center coordinates. In practical applications, the depth map of the carbon bowl may be interfered by various factors such as noise, light changes, and surface defects. Calculating the carbon bowl angle based on the specific feature of the position of the key point of the key groove can, to a certain extent, resist these interference factors and ensure the accuracy of the carbon bowl angle. Therefore, finally, based on the carbon bowl center coordinates and the carbon bowl angle, it is possible to effectively locate the carbon bowl in the depth map of the carbon bowl;
[0140] Moreover, by directly detecting the 6 key points of the key grooves of the carbon bowl using the key point detection model, it is possible to obtain an accurate carbon bowl angle even when the quality of the carbon bowl image is not high. At the same time, when annotating the data, a regular hexagon annotation is used to strictly control the distribution of the label coordinate points, providing a high-quality data set for training the model, and a delicate logical judgment is designed, making the accuracy of the key groove angle judgment very high, with an error of about 0.2 degrees.
[0141] Embodiment 2:
[0142] Please refer to Figure 12 , the embodiment of the present application provides a carbon bowl positioning device based on key point detection, including a depth module 10, a fitting module 20, a detection module 30, a coordinate module 40, an angle module 50, and a positioning module 60;
[0143] Among them, the depth module 10 is used to acquire the point cloud data of the carbon block and map the point cloud data into a depth map of the carbon bowl;
[0144] The fitting module 20 is used to perform circle fitting on the depth map of the carbon bowl to obtain the center of the fitted circle;
[0145] The detection module 30 is used to perform key point detection on the depth map of the carbon bowl to obtain the key point of the center and the set of key point positions of the key grooves;
[0146] The coordinate module 40 is used to calculate the carbon bowl center coordinates based on the center of the fitted circle and the key point of the center;
[0147] The angle module 50 is used to calculate the carbon bowl angle based on the angle value between the set of key point positions of the key grooves and the carbon bowl center coordinates;
[0148] The positioning module 60 is used to position the charcoal bowl in the charcoal bowl depth map according to the coordinates of the charcoal bowl center and the charcoal bowl angle.
[0149] In one embodiment, the depth module 10 is specifically:
[0150] The point cloud data of the carbon block is obtained by a 3D camera directly above the carbon block, and the point cloud data is mapped into a global depth map;
[0151] Four charcoal bowl regions are cut out from the global depth map to obtain four charcoal bowl depth maps; and, since the positions of the four charcoal bowls on the charcoal block are relatively fixed, this embodiment only requires that the cutout region of the global depth map include the complete charcoal bowl;
[0152] Among them, the point cloud data of the carbon block and the global depth map can be mapped to each other, and the mapping relationship is:
[0153]
[0154] Among them, u and v are arbitrary coordinate points of the image, u 0 and v 0 is the center coordinate of the image, x w ,y w and z w Represents the three-dimensional coordinate point of the point cloud data; z c Represents the z-axis value of the camera coordinates, that is, the distance from the target to the camera; dx, dy, and f are the parameters of the camera itself.
[0155] To apply the embodiments of this application, please refer to Figure 2 , Figure 2 This is a global depth map of the carbon block provided in an embodiment of the present application.
[0156] To apply the embodiments of this application, please refer to Figure 3 , Figure 3 is a charcoal bowl area diagram provided in an embodiment of the present application, Figure 3 The first module and the second module in the figure both represent four carbon bowl areas cut out from the global depth map, but the carbon blocks shown in the first module are of better quality, while the carbon blocks shown in the second module are of poor quality.
[0157] In one embodiment, the fitting module 20 includes a labeling unit, a segmentation unit, a mask unit, and a circle center unit;
[0158] Among them, the annotation unit is used to annotate the carbon bowl depth map A in the four carbon bowl depth maps. 1 Carry out carbon bowl circle labeling to obtain a carbon bowl circle label diagram;
[0159] A segmentation unit is used to segment the charcoal bowl circle label image to obtain a segmentation image;
[0160] The mask unit is used to generate a depth map A for the segmented image using the segmentation model PointRend. 1 A mask of the same size as , to obtain a charcoal bowl mask;
[0161] The circle center unit is used to fit the boundary points of the carbon bowl mask mask into a standard circle, and the center of the standard circle is used as the center C1 of the fitting circle; wherein the standard circle refers to a circle with a fixed radius and center;
[0162] Among them, the construction process of the segmentation model PointRend is:
[0163] Collect a large number of charcoal bowl images for manual annotation, and then use the annotated charcoal bowl images to train the segmentation model PointRend;
[0164] Finally, the trained segmentation model PointRend is integrated into the hardware, so that whenever a carbon bowl image is input, the system can immediately output the position of the mask through the segmentation model PointRend for the subsequent steps of carbon block polishing.
[0165] To apply the embodiments of this application, please refer to Figure 4 , Figure 4 is a semantic segmentation model data annotation diagram provided in an embodiment of the present application, Figure 4 In the figure, the first module represents the original image of the charcoal bowl, the second module represents the labeling process, and the third module represents the charcoal bowl circle label image after the labeling is completed.
[0166] To apply the embodiments of this application, please refer to Figure 5 , Figure 5 is a segmentation diagram provided in an embodiment of the present application, Figure 5 In the figure, the first module represents the original image of the charcoal bowl; the second module represents the mask superimposed on the original image of the charcoal bowl.
[0167] To apply the embodiments of this application, please refer to Figure 6 , Figure 6 It is a structural diagram of the deep learning model Pointrend provided in an embodiment of the present application, which represents the network structure of the segmentation model Pointrend.
[0168] The fitting module 20 of the embodiment of the present application marks the carbon bowl depth map with a carbon bowl circle, which can provide data information for subsequent accurate distinction and positioning of the carbon bowl area. By segmenting the carbon bowl circle label map, the background and other unnecessary information are removed. By fitting the boundary points of the carbon bowl mask to a standard circle, a best-fitting circle can be found to represent the shape of the carbon bowl, which facilitates the determination of the center of the circle.
[0169] In one embodiment, the detection module 30 includes a labeling unit and a detection unit;
[0170] Among them, the labeling unit is used to generate a regular hexagon according to the center of the carbon bowl in the carbon bowl circular label diagram, and can scale and rotate the regular hexagon; align the 6 vertices of the regular hexagon with the center of the carbon bowl keyway to obtain a hexagonal key point annotation diagram; moreover, the labels of the hexagonal key point annotation diagram are the coordinates of the carbon bowl center and the coordinates of the six vertices of the regular hexagon;
[0171] The detection unit is used to perform key point detection on the hexagonal key point annotation diagram through a preset key point detection model RTMPose to obtain the center key point C2 of the circle and the set P6 of the positions of the key points of the keyway; among them, the key point of the keyway refers to the center of the keyway;
[0172] Among them, the construction process of the key point detection model RTMPose is as follows:
[0173] Collect a large number of carbon bowl pictures for manual annotation, and then use the annotated carbon bowl pictures to train the key point detection model RTMPose;
[0174] Finally, integrate the trained key point detection model RTMPose onto the hardware;
[0175] So that whenever a carbon bowl picture is input, the system can immediately output the center key point of the carbon bowl picture and the position of the key point of the keyway through the key point detection model RTMPose for subsequent steps of carbon block grinding.
[0176] For applying the embodiment of the present application, please refer to Figure 7 , Figure 7 is the hexagonal key point annotation diagram provided by the embodiment of the present application, indicating the result of hexagonal key point annotation of the carbon bowl.
[0177] For applying the embodiment of the present application, please refer to Figure 8 , Figure 8 is a schematic diagram of the center of the carbon bowl and the center of the keyway provided by the embodiment of the present application, indicating the center of the carbon bowl and the center of the keyway obtained based on the key point detection model RTMPose, Figure 8 The six points approximately evenly distributed on the circle in it represent the six keyway centers, and the point at the center of the circle represents the center of the carbon bowl.
[0178] For applying the embodiment of the present application, please refer to Figure 9 , Figure 9 is a schematic structural diagram of the deep learning model RTMPose provided by the embodiment of the present application, indicating the network structure of the key point detection model RTMPose.
[0179] The detection module 30 of the embodiment of the present application is generated based on a regular hexagon centered on the carbon bowl center, which can provide a preliminary and relatively accurate estimation of the keyway center position. This geometric constraint helps the key point detection model to more accurately locate the keyway center in the case of low image quality or unclear keyway features. Moreover, compared with directly performing unconstrained key point detection on the entire image, since the key point detection model only needs to search for key points within the range of the vertices of the hexagon without traversing the entire image, detecting based on the hexagon key point annotation map can significantly reduce the computational complexity and time.
[0180] In one embodiment, the coordinate module 40 includes a distance unit, a grinding unit, and a coordinate unit;
[0181] Among them, the distance unit is used to calculate the Euclidean distance between the center C1 of the fitted circle and the center key point C2 of the circle to obtain the first distance D1;
[0182] The grinding unit is used to, if the first distance D1 is greater than or equal to a preset threshold, flow the carbon block to the manual re-inspection area, and record the position of the carbon bowl at the same time, and the system alarms to notify manual processing: manually review whether the carbon bowl is normal and whether the carbon block is available. If available, perform grinding processing manually;
[0183] The coordinate unit is used to, if the first distance D1 is less than the preset threshold, take the average value of the center C1 of the fitted circle and the center key point C2 of the circle as the carbon bowl center coordinate C;
[0184] Among them, the preset threshold can be 5 pixels.
[0185] It should be noted that if the first distance D1 is greater than or equal to the preset threshold, it means that the irregularity of the carbon bowl is relatively large and the center of the carbon bowl cannot be accurately calculated. Since the purpose of positioning the carbon bowl is to let the robotic arm grind and clean the carbon block, in the case where the center cannot be accurately located (indicating that the shape of the carbon bowl may be damaged or deformed), the background system will not issue an instruction for the robotic arm to grind, so the carbon block is directly flowed to the manual re-inspection area for inspection; if the first distance D1 is less than the preset threshold, it means that the center positions obtained by the two methods are similar, and an accurate carbon bowl center position can be obtained.
[0186] In the coordinate module 40 of the embodiment of the present application, by calculating the Euclidean distance between the center of the fitted circle and the center key point obtained through key point detection, the deviation between the two can be quantified. When the distance between the center of the fitted circle and the center key point is greater than or equal to the preset threshold, it means that there are large deviations or irregularities in the shape or position of the carbon bowl. At this time, the problems can be timely detected and corrected through re-inspection and polishing to ensure the quality and consistency of the final product. Moreover, when the first distance is less than the preset threshold, by averaging the center coordinates obtained by using two different methods, the error that may be brought by a single method can be reduced.
[0187] In one embodiment, the angle module 50 includes a rotation unit, a conversion unit, a synthesis unit, a calculation unit, and an optimization unit, specifically as follows:
[0188] Among them, the rotation unit is used to calculate the clockwise rotation angle of the first keyway key point position P[1] in the keyway key point position set P6 based on the vertical 12 o'clock direction of the center coordinate C of the carbon bowl, and obtain the first angle value;
[0189] The conversion unit is used to convert the first angle value into the range of [0°, 60°) to obtain the initial carbon bowl angle A[1];
[0190] The synthesis unit is used to traverse the keyway key point position set to obtain a number of initial carbon bowl angles A[6];
[0191] The calculation unit is used to take the average value of a number of initial carbon bowl angles A[6] as the carbon bowl angle A.
[0192] It should be noted that each carbon bowl has 6 keyways, and the 6 keyways are evenly distributed on the edge of the carbon bowl. That is to say, the included angle between any two adjacent keyways is 60 degrees. It should be noted that although the included angle between any two adjacent keyways is equal, the distribution of the 6 keyways on the edge of the carbon bowl is different, so it can be considered that the value range of the carbon bowl angle is: 0° can be taken but 60° cannot be taken.
[0193] To apply the embodiment of the present application, please refer to Figure 10 , Figure 10 is a schematic diagram of calculating the key point angle provided by the embodiment of the present application, which represents the preset range when performing angle conversion to obtain the initial carbon bowl angle. Figure 10 In it, C is the center coordinate of the carbon bowl, T represents the vertical 12 o'clock direction of the center coordinate C of the carbon bowl, P represents the keyway key point position. After the angle value is converted, the initial carbon bowl angle (that is, the included angle marked clockwise between TC and PC) needs to be less than 60°;
[0194] For example, assuming the calculated angle value is 119°, the converted initial carbon bowl angle is 59°; assuming the calculated angle value is 120°, the converted initial carbon bowl angle is 0°; assuming the calculated angle value is 121°, the converted initial carbon bowl angle is 1°.
[0195] In the embodiments of the present application, the rotation unit, the conversion unit, the synthesis unit, and the calculation unit measure the angle based on the vertical direction of the center coordinates of the carbon bowl, ensuring the consistency and stability of the measurement reference, which helps to reduce the errors caused by the change of the reference. In practical applications, images or data may be affected by factors such as noise and interference. By performing multi-point measurements and taking the average value, these factors' interference with the measurement results can be better resisted, and the impact of the measurement error of a single point on the final result can be significantly reduced, thereby improving the accuracy and robustness of the measurement.
[0196] The optimization unit is used to calculate the absolute values of the differences between a number of initial carbon bowl angles A[6] and the carbon bowl angle A respectively, obtaining an absolute value set;
[0197] The optimization unit is further used to, if all the absolute values in the absolute value set are less than 2°, indicating that the detected key points are evenly distributed, take the average angle A as the final carbon bowl angle;
[0198] The optimization unit is further used to, if any absolute value in the absolute value set is greater than or equal to 2°, indicating that there is an abnormality in the detected key points, control the background system to prohibit issuing instructions for the robotic arm to polish, directly flow the carbon block to the manual re-inspection area, and record the position of the carbon bowl at the same time. The system alarms to notify manual processing: manually review whether the carbon bowl is normal and whether the carbon block is usable. If it is usable, then perform polishing manually.
[0199] In the optimization unit of the embodiments of the present application, verifying the accuracy of the key point position of the keyway can ensure the effectiveness of the carbon bowl angle; since the 6 keyways of the carbon bowl are equally spaced, the 6 keyway angle values A[6] calculated based on the 6 keyway key points should not vary much, and the calculated average angle A also does not vary much from the 6 keyway angle values A[6]. Therefore, by calculating the absolute values of the differences between the 6 keyway angle values A[6] and the average angle A respectively, the effectiveness of the average angle can be judged.
[0200] In one embodiment, the positioning module 60 is specifically:
[0201] Locate the carbon bowl in the carbon bowl depth map A according to the center coordinates C of the carbon bowl and the average angle A 1 in it;
[0202] Traverse the remaining carbon bowl depth maps in the four carbon bowl depth maps, respectively obtain the corresponding center coordinates of the carbon bowl and the carbon bowl angle to locate the carbon bowls in the remaining carbon bowl depth maps, and obtain the positioning result;
[0203] Polish the inner wall of the charcoal bowl of the charcoal block according to the positioning results.
[0204] To apply the embodiments of this application, please refer to Figure 11 , Figure 11 It is an overall flow chart provided in the embodiment of the present application, which shows the general process of positioning the charcoal bowl by calculating the center coordinates C and the average angle A of the charcoal bowl in the second embodiment.
[0205] Overall, this embodiment has the following beneficial effects:
[0206] The present invention can more accurately represent the shape and outline of the carbon block in three-dimensional space by acquiring the point cloud data of the carbon block and mapping it into a depth map. By fitting a circle on the carbon bowl depth map, an optimal circular boundary can be found through mathematical methods based on the pixel points or depth data of the edge of the carbon bowl, thereby determining the center position of the carbon bowl, effectively reducing the errors caused by factors such as the irregular shape of the carbon bowl, blurred edges or noise interference, and ensuring the accuracy of the center of the fitting circle. Using key point detection technology, the center of the circle and the key groove center point in the carbon bowl depth map can be accurately identified. The coordinates of the center of the carbon bowl are calculated based on the center of the fitting circle and the key points of the center, which can reduce the errors that may be caused by a single center calculation method and ensure the validity of the coordinates of the center of the carbon bowl. In practical applications, the depth map of the carbon bowl may be interfered by multiple factors such as noise, illumination changes, and surface defects. The angle of the carbon bowl is calculated based on the specific feature of the key groove key point position, which can resist these interference factors to a certain extent and ensure the accuracy of the angle of the carbon bowl. Therefore, according to the coordinates of the center of the carbon bowl and the angle of the carbon bowl, the carbon bowl in the depth map of the carbon bowl can be effectively positioned;
[0207] In addition, the key point detection model is used to directly detect the six key points of the carbon bowl, which can obtain the accurate angle of the carbon bowl even when the carbon bowl image quality is not high. At the same time, regular hexagonal annotation is used when annotating data, and the distribution of label coordinate points is strictly controlled to provide a high-quality data set for the training model. In addition, sophisticated logical judgment is designed to make the key slot angle judgment very accurate, with an error of about 0.2 degrees.
[0208] Embodiment three:
[0209] The embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the carbon bowl positioning method based on key point detection;
[0210] Among them, for the method for positioning a carbon bowl based on key point detection, when implemented in the form of software functional units and used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-mentioned embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0211] The above is the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements are also regarded as the protection scope of the present invention.
Claims
1. A charcoal bowl positioning method based on key point detection, characterized in that: include: Acquire point cloud data of the carbon block, and map the point cloud data into a carbon bowl depth map; Performing circle fitting on the carbon bowl depth map to obtain the center of the fitting circle; Performing key point detection on the carbon bowl depth map to obtain a center key point and a key slot key point position set; The coordinates of the center of the charcoal bowl are calculated according to the center of the fitting circle and the key point of the center, specifically: the Euclidean distance between the center of the fitting circle and the key point of the center is calculated to obtain a first distance; if the first distance is greater than or equal to a preset threshold, the charcoal block is polished by re-inspection; if the first distance is less than the preset threshold, the average of the center of the fitting circle and the key point of the center is used as the coordinates of the center of the charcoal bowl; Calculate the carbon bowl angle according to the angle value between the key slot key point position set and the carbon bowl center coordinate; The charcoal bowl in the charcoal bowl depth map is positioned according to the charcoal bowl center coordinates and the charcoal bowl angle.
2. A charcoal bowl positioning method based on key point detection as claimed in claim 1, characterized in that: The carbon bowl depth map is subjected to circle fitting to obtain the center of the fitting circle, specifically: Performing carbon bowl circle labeling on the carbon bowl depth map to obtain a carbon bowl circle label map; Segmenting the charcoal bowl circle label image to obtain a segmented image; Generating a mask having the same size as the carbon bowl depth map for the segmented pattern to obtain a carbon bowl mask; The boundary points of the carbon bowl mask are fitted into a standard circle, and the center of the standard circle is used as the center of the fitting circle; wherein the standard circle refers to a circle with a fixed radius and center.
3. A method for positioning a charcoal bowl based on key point detection as claimed in claim 2, characterized in that: The key point detection is performed on the carbon bowl depth map to obtain the center key point and key slot key point position set, specifically: Generate a regular hexagon according to the center of the charcoal bowl circle of the charcoal bowl circle label diagram, align the six vertices of the regular hexagon with the center of the charcoal bowl keyway, and obtain a hexagon key point labeling diagram; The key point detection is performed on the hexagonal key point annotation diagram using a preset key point detection model to obtain the center key point and the keyway key point position set.
4. The method for positioning a charcoal bowl based on key point detection according to claim 1, characterized in that: The carbon bowl angle is calculated based on the angle value between the key slot key point position set and the carbon bowl center coordinates, specifically: Taking the vertical direction of the center coordinate of the carbon bowl as a reference, calculating the clockwise rotation angle of the first key groove key point position in the key groove key point position set to obtain a first angle value; Converting the first angle value into a preset angle range to obtain an initial carbon bowl angle; Traversing the key slot key point position set to obtain a number of initial carbon bowl angles; The average of the several initial charcoal bowl angles is used as the charcoal bowl angle.
5. A charcoal bowl positioning device based on key point detection, characterized in that: Including depth module, fitting module, detection module, coordinate module, angle module and positioning module; Wherein, the depth module is used to obtain point cloud data of the carbon block and map the point cloud data into a carbon bowl depth map; The fitting module is used to perform circle fitting on the carbon bowl depth map to obtain the center of the fitting circle; The detection module is used to perform key point detection on the carbon bowl depth map to obtain a center key point and a key slot key point position set; The coordinate module is used to calculate the coordinates of the center of the charcoal bowl according to the center of the fitting circle and the key point of the center, specifically: calculate the Euclidean distance between the center of the fitting circle and the key point of the center to obtain a first distance; if the first distance is greater than or equal to a preset threshold, the charcoal block is polished by re-inspection; if the first distance is less than the preset threshold, the average of the center of the fitting circle and the key point of the center is used as the coordinates of the center of the charcoal bowl; The angle module is used to calculate the carbon bowl angle according to the angle value between the key slot key point position set and the carbon bowl center coordinate; The positioning module is used to position the charcoal bowl in the charcoal bowl depth map according to the charcoal bowl center coordinates and the charcoal bowl angle.
6. The charcoal bowl positioning device based on key point detection as claimed in claim 5, characterized in that: The fitting module includes a labeling unit, a segmentation unit, a mask unit and a circle center unit; The labeling unit is used to label the carbon bowl depth map with a carbon bowl circle to obtain a carbon bowl circle label map; The segmentation unit is used to segment the charcoal bowl circle label image to obtain a segmentation graph; The mask unit is used to generate a mask with the same size as the carbon bowl depth map for the segmented pattern to obtain a carbon bowl mask; The center unit is used to fit the boundary points of the carbon bowl mask into a standard circle, and use the center of the standard circle as the center of the fitting circle; wherein the standard circle refers to a circle with a fixed radius and center.
7. The charcoal bowl positioning device based on key point detection as claimed in claim 6, characterized in that: The detection module includes a label unit and a detection unit; The label unit is used to generate a regular hexagon according to the center of the charcoal bowl circle of the charcoal bowl circle label diagram, so that the six vertices of the regular hexagon are aligned with the center of the charcoal bowl keyway to obtain a hexagon key point labeling diagram; The detection unit is used to perform key point detection on the hexagonal key point annotation diagram through a preset key point detection model to obtain the center key point and the keyway key point position set.
8. The charcoal bowl positioning device based on key point detection as claimed in claim 5, characterized in that: The angle module includes a rotation unit, a conversion unit, a synthesis unit and a calculation unit; The rotation unit is used to calculate the clockwise rotation angle of the first key slot key point position in the key slot key point position set based on the vertical direction of the center coordinate of the carbon bowl to obtain a first angle value; The conversion unit is used to convert the first angle value into a preset angle range to obtain an initial carbon bowl angle; The synthesis unit is used to traverse the key slot key point position set to obtain a number of initial carbon bowl angles; The calculation unit is used to take the average of the several initial carbon bowl angles as the carbon bowl angle.
9. A storage medium, characterized in that: The storage medium stores a computer program, which is called and executed by a computer to implement any one of the key point detection-based charcoal bowl positioning methods of claims 1 to 4 above.
Citation Information
Patent Citations
Carbon block polishing method and device
CN115578447A