A method and device for determining a carbon bowl keyway angle based on a carbon bowl image

By using classification, regression, and segmentation models to identify the keyway angle of carbon bowls in carbon block and carbon bowl images, the problem of low detection accuracy of carbon bowl keyway angle is solved, achieving high-precision determination of carbon bowl keyway angle, improving grinding efficiency and reducing costs.

CN116958667BActive Publication Date: 2026-06-02HENAN ZHONGYUAN POWER INTELLIGENT MFG CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HENAN ZHONGYUAN POWER INTELLIGENT MFG CO LTD
Filing Date
2023-07-12
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies have low detection accuracy when detecting the keyway angle of carbon blocks and carbon bowls due to the different placement angles of the carbon bowls, which affects the accuracy of subsequent polishing.

Method used

By acquiring images of the carbon bowl, classification, regression and segmentation models are used to identify the angle values ​​of the carbon bowl's bond grooves. Logical judgment or calculation is performed by combining multiple angle values ​​to determine the angle of the carbon bowl's bond grooves.

Benefits of technology

It improves the accuracy of carbon cup keyway angle detection, reduces detection costs, and increases grinding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116958667B_ABST
    Figure CN116958667B_ABST
Patent Text Reader

Abstract

The application discloses a carbon bowl key groove angle determination method and device based on a carbon bowl image, and the method comprises the following steps: acquiring a carbon bowl image, recognizing the angle of the carbon bowl image by using different models to obtain angle parameters, wherein the angle parameters comprise a classification angle value obtained by using a classification model, a regression angle value obtained by using a regression model, and an estimated angle value obtained by using a segmentation model; and determining a carbon bowl key groove angle value based on the numerical size of the classification angle value, the regression angle value and the estimated angle value. After the image of the carbon bowl is acquired, the key groove angle in the image is recognized by using different models, logical judgment or calculation is performed based on a plurality of regional angle values, the key groove angle is determined, and the detection precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of carbon bowl keyway angle detection, and in particular to a method and apparatus for determining the carbon bowl keyway angle based on carbon bowl images. Background Technology

[0002] Grinding charcoal blocks is an indispensable part of the charcoal block production process. The outer surface of the charcoal blocks produced in the initial processing is usually very rough, full of cracks, defects, and charcoal residue. They need to be ground to make the surface smooth before they can be shipped out for sale.

[0003] A typical carbon block contains four carbon bowls, each with several keyways distributed along its edge. Any two adjacent keyways are spaced 60 degrees apart, but the orientation of the keyways varies from bowl to bowl. Therefore, positioning is required before polishing to determine the angles of each keyway. Current methods primarily utilize template matching from the field of machine learning to locate the keyways along the edge of the carbon bowls, then estimate the orientation of the center of the bowl relative to the keyways to determine their angles.

[0004] However, the commonly used methods have the following technical problems: because the carbon bowls are placed at different angles and are located at different positions on the carbon block, the estimated center of the carbon bowl deviates significantly from the actual center, which in turn leads to lower accuracy in the subsequent detection of the keyway angle. Summary of the Invention

[0005] This invention proposes a method and apparatus for determining the keyway angle of a carbon bowl based on carbon bowl images. The method can identify the keyway angle in the image by different models after acquiring the carbon bowl image, and determine the keyway angle based on the angle of several regions to improve detection accuracy.

[0006] A first aspect of this invention provides a method for determining the keyway angle of a carbon bowl based on a carbon bowl image, the method comprising:

[0007] A carbon bowl image is acquired, and angle recognition is performed on the carbon bowl image using different models to obtain angle parameters. The angle parameters include: a classification angle value obtained by a classification model, a regression angle value obtained by a regression model, and an estimated angle value obtained by a segmentation model.

[0008] The carbon bowl bond groove angle value is determined based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value.

[0009] In one possible implementation of the first aspect, determining the carbon bowl bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value includes:

[0010] If the absolute value of the difference between the classification angle value and the regression angle value is less than or equal to a first preset value, then the average value of the classification angle value and the regression angle value is calculated to obtain the first angle average value.

[0011] When the absolute value of the first average angle value minus the estimated angle value is less than or equal to the second preset value, the matching angle value and the average angle value are obtained respectively. The matching angle value is the angle value obtained by image matching of the keyway of the carbon bowl image, and the average angle value is the angle value obtained by averaging several matching angle values.

[0012] If the first angle average value is not equal to the third preset value, then the carbon cup keyway angle value is determined based on the first angle average value, the matching angle value, and the angle average value.

[0013] In one possible implementation of the first aspect, determining the carbon cup keyway angle value based on the first angle average value, the matching angle value, and the angle average value includes:

[0014] Calculate the absolute value of the difference between the first angle average value and the matching angle value, and calculate the absolute value of the difference between the first angle average value and the angle mean value to obtain the first angle difference and the second angle difference, respectively;

[0015] If the first angle difference is greater than the second angle difference, then the average value of the first angle is taken as the carbon cup keyway angle value;

[0016] If the first angle difference is less than the second angle difference, then the matching angle value is used as the carbon cup keyway angle value.

[0017] In one possible implementation of the first aspect, calculating the carbon bowl bond groove angle value based on the classification angle value, the regression angle value, and the estimated angle value further includes:

[0018] If the average value of the first angle is equal to the third preset value, then calculate the absolute value of the difference between the classification angle value and the matching angle value and calculate the absolute value of the difference between the regression angle value and the matching angle value to obtain the third angle difference and the fourth angle difference respectively.

[0019] If the third angle difference is less than the fourth preset value and the fourth angle difference is greater than the fourth preset value, then the classification angle value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value.

[0020] If the third angle difference is greater than the fourth preset value and the fourth angle difference is less than the fourth preset value, then the regression angle value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value.

[0021] In one possible implementation of the first aspect, determining the carbon bowl bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value further includes:

[0022] If the absolute value of the difference between the classification angle value and the regression angle value is greater than the first preset value, then the absolute value of the difference between the classification angle value and the estimated angle value and the absolute value of the difference between the regression angle value and the estimated angle value are calculated to obtain the fifth angle difference and the sixth angle difference, respectively.

[0023] If the fifth angle difference is less than or equal to the fifth preset value or the sixth angle difference is less than or equal to the sixth preset value, then the carbon cup keyway angle value is determined based on the first angle average value, the matching angle value, and the angle average value.

[0024] In one possible implementation of the first aspect, determining the carbon bowl bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value further includes:

[0025] If the absolute value of the difference between the classification angle value and the regression angle value is greater than the first preset value, then the seventh preset value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value, and the angle average value.

[0026] In one possible implementation of the first aspect, determining the carbon bowl bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value further includes:

[0027] If the absolute value of the difference between the first average angle and the estimated angle is greater than the second preset value, or if the fifth angle difference is greater than the fifth preset value, or if the sixth angle difference is greater than the sixth preset value, then an error is triggered.

[0028] In one possible implementation of the first aspect, the operation of obtaining the matching angle value includes:

[0029] The carbon bowl image is segmented using a preset image segmentation model to obtain several keyway region images;

[0030] Calculate the image matching degree between each keyway region image and a preset keyway image, and select the keyway region image with the highest image matching degree as the target image;

[0031] Extract the center point of the keyway in the target image, and calculate the matching angle value based on the center point of the keyway.

[0032] A second aspect of the present invention provides a device for determining the keyway angle of a carbon bowl based on a carbon bowl image, the device comprising:

[0033] An image acquisition module is used to acquire an image of a carbon bowl, and to perform angle recognition on the image of the carbon bowl using different models to obtain angle parameters. The angle parameters include: a classification angle value obtained by a classification model, a regression angle value obtained by a regression model, and an estimated angle value obtained by a segmentation model.

[0034] The angle determination module determines the carbon bowl bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value.

[0035] Compared with the prior art, the present invention provides a method and apparatus for determining the keyway angle of a carbon bowl based on a carbon bowl image. The advantages of this invention are: after acquiring an image of a carbon bowl, the present invention can identify the keyway angle in the image through different models, and determine the keyway angle based on logical judgment or calculation of several region angle values, so as to improve the detection accuracy. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating a method for determining the keyway angle of a carbon bowl based on a carbon bowl image, according to an embodiment of the present invention.

[0037] Figure 2 This is a schematic diagram of angle parameters provided in an embodiment of the present invention;

[0038] Figure 3 This is a schematic diagram of the carbon bowl and keyway segmentation provided in an embodiment of the present invention;

[0039] Figure 4 This is a schematic diagram of three carbon bowls contained in a carbon block provided in an embodiment of the present invention;

[0040] Figure 5 This is a schematic diagram of the keyway segmentation region provided in an embodiment of the present invention;

[0041] Figure 6 This is a flowchart illustrating the operation of a method for determining the keyway angle of a carbon bowl based on a carbon bowl image, according to an embodiment of the present invention.

[0042] Figure 7This is a schematic diagram of a carbon bowl keyway angle determination device based on a carbon bowl image provided in an embodiment of the present invention. Detailed Implementation

[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0044] To address the aforementioned issues, the following specific embodiments will provide a detailed description and explanation of a method for determining the keyway angle of a carbon bowl based on a carbon bowl image, as provided in this application.

[0045] Reference Figure 1 The diagram shows a flowchart of a method for determining the keyway angle of a carbon bowl based on a carbon bowl image, according to an embodiment of the present invention.

[0046] In one embodiment, the method can be applied to a detection system, which can be a computer or a smart terminal, and can determine the carbon cup keyway angle through the system.

[0047] Traditional methods rely on manual labor to locate the center of the carbon bowl and move a grinding device to grind the inner wall of the bowl. However, manual grinding of the carbon bowl's center is inefficient and costly. Automated detection using a detection system can effectively improve positioning accuracy, thereby increasing grinding efficiency and reducing detection costs.

[0048] As an example, the method for determining the carbon bowl keyway angle based on the carbon bowl image may include:

[0049] S11. Obtain an image of a carbon bowl, and use different models to perform angle recognition on the image of the carbon bowl to obtain angle parameters. The angle parameters include: the classification angle value obtained by the classification model, the regression angle value obtained by the regression model, and the estimated angle value obtained by the segmentation model.

[0050] In one embodiment, the carbon bowl image can be a color image or a black and white image of a single carbon bowl. The carbon bowl image can be input into different image processing models, allowing the different image processing models to perform angle recognition operations on the carbon bowl image to identify the angle of the carbon bowl keyway in the carbon bowl image, thereby obtaining several different angle values, which are used as angle parameters.

[0051] In one embodiment, the angle parameters include: classification angle value, regression angle value, and estimated angle value.

[0052] Reference Figure 2 The diagram shows an embodiment of the angle parameters provided by the present invention.

[0053] In one embodiment, the classification angle value, regression angle value, and estimated angle value can be as follows: Figure 2 As shown, specifically, each carbon bowl has six keyways evenly distributed along its edge, and the lines connecting these keyways form a hexagon. The aforementioned angle value can be obtained by identifying the angle between the line connecting the keyway and the center point.

[0054] Reference Figure 2 It is known that the hexagons formed by connecting different carbon bowls have different angles. By accurately obtaining the classification angle value, regression angle value and estimated angle value, this invention can reduce errors and improve the subsequent determination of the carbon bowl keyway angle.

[0055] Among them, the classification angle value is the angle value identified using the classification model; the regression angle value is the angle value identified using the regression model; and the estimated angle value is the angle value identified using the segmentation model.

[0056] In one embodiment, a keyway angle classification model can be used to identify the classification angle value. Specifically, a color image of a single carbon bowl can be input into the keyway angle classification model, which can output the classification angle value A of the keyway on the edge of the carbon bowl.

[0057] In one embodiment, the keyway angle classification model can be EfficientNet, a widely used deep convolutional neural network architecture that offers better accuracy and efficiency than any previous convolutional network. This invention uses EfficientNet as the keyway angle classification model. During model training, each sample in the training set includes: one color image and the corresponding keyway angle (0-59 degrees). During model inference, given a color image of a carbon bowl, the model outputs the classification angle value A of the carbon bowl's keyway in that color image.

[0058] In one embodiment, a keyway angle regression model can be used to identify the regression angle value. A color image of a single carbon bowl is input into the keyway angle regression model, and the model outputs the regression angle value B of the keyway at the edge of the carbon bowl.

[0059] In one implementation, similar to the steps described above, the present invention can also use EfficientNet as the keyway angle regression model. During the model training phase, each sample in the training set includes: one color image of a carbon bowl and the corresponding keyway angle (0-59 degrees). During the model inference phase, inputting one color image of a carbon bowl, the keyway angle regression model will output the regression angle value B of the carbon bowl keyway in this color image.

[0060] It should be noted that the classification operation of the keyway angle classification model can be pre-defined with a total of 60 angles, and the keyway angle classification model needs to classify the input color image into a certain category among the 60 angles; the regression operation of the keyway angle regression model can be pre-defined with no total number of angles, and the regression model needs to predict the angle of the carbon cup keyway based on the input image.

[0061] In one embodiment, the estimated angle value can be obtained using a segmentation model.

[0062] Reference Figure 3 The diagram shows a schematic representation of the carbon bowl and keyway segmentation provided in an embodiment of the present invention.

[0063] In one implementation, multiple keyway regions in the carbon bowl can be identified through an identification operation, and then the estimated angle value G of the keyway can be determined based on the multiple keyway regions.

[0064] In one implementation, the segmentation model can be Pointrend. First, a large number of keyway images are collected and manually labeled. Then, the model is trained and finally integrated into the hardware. Whenever a carbon bowl image is input, the segmentation model can immediately output the location of the keyway regions.

[0065] A typical carbon bowl has 6 keyways, which are equidistantly distributed along the edge of the carbon bowl, with an angle of 60 degrees between any two adjacent keyways.

[0066] Reference Figure 4 The image shows a schematic diagram of three carbon bowls contained in a carbon block provided in an embodiment of the present invention.

[0067] It should be noted that although the included angle between any two adjacent keyways is equal, the distribution of the six keyways along the edge of the carbon cup is different, such as... Figure 4 As shown, a deep learning model can be used to segment the keyway region. Then, the angle is estimated using the segmented keyway region to obtain the estimated angle value G.

[0068] Reference Figure 4 The bond groove distribution of the three carbon bowls is different. The six bond grooves in each carbon bowl are equidistantly distributed along its edge. Once the positions of these six bond groove regions are obtained, the estimated angle value G can be roughly calculated. It should be noted that the estimated angle value G is relatively coarse. The estimated angle value G can be used as a reference value to determine the bond groove angle of the carbon bowl.

[0069] S12. Determine the carbon bowl bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value.

[0070] In one embodiment, the classification angle value A and the regression angle value B can be compared with the estimated angle value G, and the carbon cup bond groove angle value F can be determined based on the comparison results.

[0071] In an optional embodiment, in order to make the classification angle value, regression angle value, and estimated angle value corroborate each other, step S12 may include the following sub-steps as an example:

[0072] S21. If the absolute value of the difference between the classification angle value and the regression angle value is less than or equal to a first preset value, then calculate the average value of the classification angle value and the regression angle value to obtain the first angle average value.

[0073] In one embodiment, the absolute value of the subtraction between the classification angle value and the regression angle value can be calculated. If the absolute value of the subtraction between the classification angle value and the regression angle value is less than or equal to a first preset value, the average value of the classification angle value A and the regression angle value B can be calculated to obtain the first angle average value C.

[0074] S22. When the absolute value of the first average angle value minus the estimated angle value is less than or equal to the second preset value, the matching angle value and the average angle value are obtained respectively. The matching angle value is the angle value obtained by image matching of the keyway of the carbon bowl image, and the average angle value is the angle value obtained by averaging several matching angle values.

[0075] In one embodiment, the absolute value of the difference between the first average angle C and the estimated angle C can be calculated. If the absolute value of the difference between the first average angle C and the estimated angle C is less than or equal to a second preset value, the carbon bowl image can also be identified by the model to obtain the matching angle value and the average angle value respectively.

[0076] Specifically, the keyway in the carbon bowl image can be segmented using a segmentation model, and then the segmented image can be used for image matching to obtain the angle value about the keyway, thus obtaining the matching angle value D.

[0077] Similarly, the mean angle E can be obtained by averaging several matching angle values.

[0078] As an example, the operation of obtaining the matching angle value may include the following sub-steps:

[0079] S31. The carbon bowl image is segmented using a preset image segmentation model to obtain several keyway region images.

[0080] S32. Calculate the image matching degree between each keyway region image and the preset keyway image, and select the keyway region image with the highest image matching degree as the target image.

[0081] S33. Extract the center point of the keyway in the target image and calculate the matching angle value based on the center point of the keyway.

[0082] In one embodiment, the above-described segmentation model can be used to segment the carbon bowl image to obtain 6 keyways. Then, the center points of the 6 keyways can be obtained, and the matching angle value D and the mean angle value E of the keyways can be determined based on the center points of the keyways.

[0083] Reference Figure 5 A schematic diagram of the keyway segmentation region provided in an embodiment of the present invention.

[0084] In the specific operation, the operation of matching angle value D is as follows: After the six keyways of each carbon bowl are divided, the center point of the keyway can be obtained by template matching, and then the orientation angle of the keyway can be calculated based on the center point of the keyway.

[0085] Because the shape of the keyways on different carbon blanks varies slightly, these differences lead to variations in the center point of the keyways. To accurately obtain the center point of the keyways and calculate their azimuth angle, tens of thousands of keyway images were acquired. These images were then clustered to obtain 500 templates representing typical keyway shapes. Next, the segmented keyway regions were matched with these templates, and the image matching degree was calculated. The image with the highest matching degree was selected as the best-matching template, thus obtaining the center point of the segmented keyway. The azimuth angle of the keyway, D, was then obtained using this center point.

[0086] Similarly, we can obtain the angle value corresponding to each keyway of the carbon cup, and then calculate the average value of these 6 angle values, which can be denoted as the angle mean E.

[0087] Preferably, the matching angle value D corresponding to the keyway can be calculated according to the above method of obtaining the matching angle value D, and then the average angle of the corresponding matching angle values ​​D of the 6 keyways can be used to obtain the average angle value E.

[0088] S23. If the first average angle is not equal to the third preset value, then the carbon cup keyway angle value is determined based on the first average angle, the matching angle value, and the average angle.

[0089] In one embodiment, if the average value of the first angle C is not equal to the third preset value, it means that the classification angle value A and the regression angle value B obtained by the model are similar and the error is small. At this time, the carbon cup keyway angle value F can be determined directly by the average value of the first angle C, the matching angle value D and the average angle value E.

[0090] In this embodiment, by cross-validating the classification angle value A, the regression angle value B, and the estimated angle value G, the angle error can be greatly reduced and the algorithm accuracy can be improved.

[0091] In an optional embodiment, step S23 may include the following sub-steps:

[0092] S231. Calculate the absolute value of the difference between the first angle average value and the matching angle value, and calculate the absolute value of the difference between the first angle average value and the angle mean value to obtain the first angle difference and the second angle difference respectively.

[0093] S232. If the first angle difference is greater than the second angle difference, then the average value of the first angle shall be taken as the angle value of the carbon cup keyway.

[0094] S233. If the first angle difference is less than the second angle difference, then the matching angle value is used as the carbon cup keyway angle value.

[0095] Specifically, the first angle difference can be obtained by subtracting the first angle average value C from the matching angle value D, and the second angle difference can be obtained by subtracting the first angle average value C from the angle mean value E.

[0096] If the first angle difference is greater than the second angle difference, then the average value C of the first angle can be used as the carbon cup bond groove angle value F.

[0097] If the first angle difference is less than the second angle difference, then the matching angle value D can be used as the carbon cup bond groove angle value F.

[0098] S24. If the average value of the first angle is equal to the third preset value, then calculate the absolute value of the difference between the classification angle value and the matching angle value, and calculate the absolute value of the difference between the regression angle value and the matching angle value, to obtain the third angle difference and the fourth angle difference respectively.

[0099] S25. If the third angle difference is less than the fourth preset value and the fourth angle difference is greater than the fourth preset value, then the classification angle value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value.

[0100] S26. If the third angle difference is greater than the fourth preset value and the fourth angle difference is less than the fourth preset value, then the regression angle value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value.

[0101] In one embodiment, if the average value of the first angle C is equal to the third preset value, it means that the classification angle value A and the regression angle value B obtained by the model are not similar and the error is large. It is necessary to recalculate the average value of the first angle C, and then determine the carbon cup bond groove angle value F based on the average value of the first angle C, the matching angle value D and the average angle value E.

[0102] Specifically, the absolute value of the difference between the classification angle value A and the matching angle value D is calculated to obtain the third angle difference, and the absolute value of the difference between the regression angle value B and the matching angle value D is calculated to obtain the fourth angle difference.

[0103] If the third angle difference is less than the fourth preset value and the fourth angle difference is greater than the fourth preset value, then the classification angle value A is assigned to the first angle average value C, and the carbon cup keyway angle value F is determined based on the assigned first angle average value C, the matching angle value D and the angle average value E.

[0104] If the third angle difference is greater than the fourth preset value and the fourth angle difference is less than the fourth preset value, then the regression angle value B is assigned to the first angle average value C, and the carbon cup keyway angle value F is determined based on the assigned first angle average value C, the matching angle value D and the angle average value E.

[0105] In one embodiment, the operation method for determining the carbon bowl keyway angle value F based on the assigned first angle average value C, the matching angle value D, and the angle average value E can be as described in step S23. For specific operation, please refer to the above description. To avoid repetition, it will not be repeated here.

[0106] In an optional embodiment, after step S21, step S12 may further include the following sub-steps:

[0107] S41. If the absolute value of the subtraction between the classification angle value and the regression angle value is greater than the first preset value, then calculate the absolute value of the subtraction between the classification angle value and the estimated angle value and calculate the absolute value of the subtraction between the regression angle value and the estimated angle value to obtain the fifth angle difference and the sixth angle difference, respectively.

[0108] S42. If the fifth angle difference is less than or equal to the fifth preset value or the sixth angle difference is less than or equal to the sixth preset value, then the carbon cup keyway angle value is determined based on the first angle average value, the matching angle value and the angle average value.

[0109] In one embodiment, if the absolute value of the difference between the classification angle value A and the regression angle value B is greater than a first preset value, it is possible that both the classification angle value A and the regression angle value B have errors, and it is necessary to compare the classification angle value A and the regression angle value B with the estimated angle value G respectively to make a judgment.

[0110] Specifically, the fifth angle difference can be obtained by subtracting the estimated angle value G from the absolute value of the classification angle value A, and the sixth angle difference can be obtained by subtracting the estimated angle value G from the absolute value of the regression angle value B.

[0111] If the fifth angle difference is less than or equal to the fifth preset value, or if the sixth angle difference is less than or equal to the sixth preset value, then the carbon cup keyway angle value is determined based on the first angle average value C, the matching angle value D, and the angle average value E.

[0112] Specifically, the operation of determining the carbon bowl keyway angle value F based on the first angle average value C, the matching angle value D, and the angle average value E can be referred to in the description of step S23. To avoid repetition, it will not be repeated here.

[0113] In an optional embodiment, after step S21, step S12 may further include the following sub-steps:

[0114] S51. If the absolute value of the difference between the classification angle value and the regression angle value is greater than the first preset value, then the seventh preset value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value.

[0115] To further simplify the calculation, if the absolute value of the difference between the classification angle value and the regression angle value is greater than the first preset value, the seventh preset value can be directly assigned to the first angle average value. Then, the carbon cup bond groove angle value F is determined based on the assigned first angle average value, the matching angle value, and the angle average value. This determination method can also refer to the content of step S23 above. To avoid repetition, it will not be described again here.

[0116] In an optional embodiment, in order to promptly notify of calculation anomalies, the method may optionally include the following sub-steps:

[0117] S51. If the absolute value of the difference between the first average angle and the estimated angle is greater than the second preset value, or if the fifth angle difference is greater than the fifth preset value, or if the sixth angle difference is greater than the sixth preset value, then an error is triggered.

[0118] Specifically, if the absolute value of the difference between the average value of the first angle C and the estimated angle value G is greater than the second preset value, or if the difference of the fifth angle is greater than the fifth preset value, or if the difference of the sixth angle is greater than the sixth preset value, an error is triggered. An alarm message can be sent to the user to notify them of the calculation error.

[0119] It should be noted that the first, second, third, fourth, fifth, and sixth preset values ​​mentioned above can be adjusted according to actual needs. The preset values ​​can be the same or different.

[0120] Reference Figure 6 The diagram shows an operation flowchart of a method for determining the keyway angle of a carbon bowl based on a carbon bowl image, according to an embodiment of the present invention.

[0121] Specifically, the method for determining the carbon bowl keyway angle based on the carbon bowl image may include the following steps:

[0122] The first step is to input a single carbon bowl image into the keyway angle classification model and output the classification angle value A.

[0123] The second step is to input a single carbon bowl image into the keyway angle regression model. The output is the regression angle value B.

[0124] The third step involves inputting a single carbon bowl image into a segmentation model to segment it into six keyway regions, and then obtaining the estimated angle value G based on these six keyway regions.

[0125] The fourth step is to take the absolute value of the difference between the classification angle value A and the regression angle value B, and then perform the following logical judgment:

[0126] 1) If the absolute value of the difference between the classification angle value A and the regression angle value B is less than or equal to 2 degrees, then calculate the first angle average value C of the classification angle value A and the regression angle value B, and determine the absolute value of the difference between the first angle average value C and the estimated angle value G.

[0127] If the absolute value of the difference between the average first angle C and the estimated angle G is less than or equal to 2 degrees, proceed with the next steps; if the absolute value of the difference between the average first angle C and the estimated angle G is greater than 2 degrees, an error will be reported.

[0128] 2) If the absolute value of the difference between the classification angle value A and the regression angle value B is greater than or equal to 2 degrees, then determine the absolute value of the difference between the classification angle value A and the estimated angle value G. If the absolute value of the difference between the classification angle value A and the estimated angle value G is less than or equal to 2 degrees, proceed to the next step; if the absolute value of the difference between the classification angle value A and the estimated angle value G is greater than 2 degrees, then calculate the absolute value of the difference between the regression angle value B and the estimated angle value G. If the absolute value of the difference between the regression angle value B and the estimated angle value G is less than or equal to 2 degrees, proceed to the next step. If the absolute value of the difference between the regression angle value B and the estimated angle value G is greater than 2 degrees, an error is reported.

[0129] It should be noted that if the absolute value of the difference between the classification angle value A and the regression angle value B is greater than 2, the first angle average value C of the classification angle value A and the regression angle value B will not be calculated. Instead, the first angle average value C will be directly assigned a value of -1. The specific value can be adjusted according to actual needs.

[0130] The fifth step is to use template matching to match keyways within the area segmented in the third step, obtain the center points of the six keyways, and then determine the matching angle value D and the average angle value E based on the center points of the keyways.

[0131] Step six, after obtaining the five angle values ​​A, B, C, D, and E, the following logical judgment is executed to obtain the keyway angle more accurately:

[0132] 1) If C≠-1 and |DC|<|EC|, then the carbon bowl keyway angle value F=matching angle value D.

[0133] 2) If C≠-1 and |DC|>|EC|, then the carbon bowl bond groove angle value F=the average value of the first angle C.

[0134] 3) If C = -1 and |AD| < 2 and |BD| > 2, then assign the classification angle value A to the average value of the first angle C, and then perform the judgments in 1) and 2).

[0135] 4) If C = -1 and |AD| > 2 and |BD| < 2, then assign the regression angle value B to the first angle average value C, and then execute the judgments in 1) and 2).

[0136] In the past, the methods for judging the angle of carbon cup keyway were: first, manual judgment, which was time-consuming, labor-intensive, inefficient, and costly; second, instance segmentation + template matching, which had low accuracy and an error of 1-2 degrees.

[0137] Based on instance segmentation and template matching, this invention adds keyway angle classification and keyway angle regression, and designs a sophisticated logical judgment, which makes the keyway angle judgment very accurate with an error of about 0.2 degrees, greatly improving the detection accuracy.

[0138] In this embodiment, the present invention provides a method for determining the keyway angle of a carbon bowl based on a carbon bowl image. Its beneficial effect is that after acquiring an image of a carbon bowl, the present invention can identify the keyway angle in the image through different models, and determine the keyway angle based on logical judgment or calculation of several region angle values, thereby improving the detection accuracy.

[0139] This invention also provides a device for determining the keyway angle of a carbon bowl based on a carbon bowl image, see [link to relevant documentation]. Figure 7 The diagram shows a schematic diagram of a carbon bowl keyway angle determination device based on a carbon bowl image according to an embodiment of the present invention.

[0140] As an example, the carbon bowl keyway angle determination device based on the carbon bowl image may include:

[0141] The image acquisition module 701 is used to acquire an image of a carbon bowl, and to perform angle recognition on the image of the carbon bowl using different models to obtain angle parameters. The angle parameters include: a classification angle value obtained by a classification model, a regression angle value obtained by a regression model, and an estimated angle value obtained by a segmentation model.

[0142] The angle determination module 702 determines the carbon bowl bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value.

[0143] Optionally, the angle determining module is further configured to:

[0144] If the absolute value of the difference between the classification angle value and the regression angle value is less than or equal to a first preset value, then the average value of the classification angle value and the regression angle value is calculated to obtain the first angle average value.

[0145] When the absolute value of the first average angle value minus the estimated angle value is less than or equal to the second preset value, the matching angle value and the average angle value are obtained respectively. The matching angle value is the angle value obtained by image matching of the keyway of the carbon bowl image, and the average angle value is the angle value obtained by averaging several matching angle values.

[0146] If the first angle average value is not equal to the third preset value, then the carbon cup keyway angle value is determined based on the first angle average value, the matching angle value, and the angle average value.

[0147] Optionally, the angle determining module is further configured to:

[0148] Calculate the absolute value of the difference between the first angle average value and the matching angle value, and calculate the absolute value of the difference between the first angle average value and the angle mean value to obtain the first angle difference and the second angle difference, respectively;

[0149] If the first angle difference is greater than the second angle difference, then the average value of the first angle is taken as the carbon cup keyway angle value;

[0150] If the first angle difference is less than the second angle difference, then the matching angle value is used as the carbon cup keyway angle value.

[0151] Optionally, the angle determining module is further configured to:

[0152] If the average value of the first angle is equal to the third preset value, then calculate the absolute value of the difference between the classification angle value and the matching angle value and calculate the absolute value of the difference between the regression angle value and the matching angle value to obtain the third angle difference and the fourth angle difference respectively.

[0153] If the third angle difference is less than the fourth preset value and the fourth angle difference is greater than the fourth preset value, then the classification angle value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value.

[0154] If the third angle difference is greater than the fourth preset value and the fourth angle difference is less than the fourth preset value, then the regression angle value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value.

[0155] Optionally, the angle determining module is further configured to:

[0156] If the absolute value of the difference between the classification angle value and the regression angle value is greater than the first preset value, then the absolute value of the difference between the classification angle value and the estimated angle value and the absolute value of the difference between the regression angle value and the estimated angle value are calculated to obtain the fifth angle difference and the sixth angle difference, respectively.

[0157] If the fifth angle difference is less than or equal to the fifth preset value or the sixth angle difference is less than or equal to the sixth preset value, then the carbon cup keyway angle value is determined based on the first angle average value, the matching angle value, and the angle average value.

[0158] Optionally, the angle determining module is further configured to:

[0159] If the absolute value of the difference between the classification angle value and the regression angle value is greater than the first preset value, then the seventh preset value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value, and the angle average value.

[0160] Optionally, the angle determining module is further configured to:

[0161] If the absolute value of the difference between the first average angle and the estimated angle is greater than the second preset value, or if the fifth angle difference is greater than the fifth preset value, or if the sixth angle difference is greater than the sixth preset value, then an error is triggered.

[0162] Optionally, the operation of obtaining the matching angle value includes:

[0163] The carbon bowl image is segmented using a preset image segmentation model to obtain several keyway region images;

[0164] Calculate the image matching degree between each keyway region image and a preset keyway image, and select the keyway region image with the highest image matching degree as the target image;

[0165] Extract the center point of the keyway in the target image, and calculate the matching angle value based on the center point of the keyway.

[0166] Those skilled in the art will understand that, for ease of description and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0167] Furthermore, this application also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the carbon bowl keyway angle determination method based on carbon bowl image as described in the above embodiments.

[0168] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer-executable program for causing a computer to execute the carbon bowl keyway angle determination method based on carbon bowl images as described in the above embodiments.

[0169] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for determining the keyway angle of a carbon bowl based on a carbon bowl image, characterized in that, The method includes: A carbon bowl image is acquired, and angle recognition is performed on the carbon bowl image using different models to obtain angle parameters. The angle parameters include: a classification angle value obtained by a classification model, a regression angle value obtained by a regression model, and an estimated angle value obtained by a segmentation model. The carbon cup bond groove angle value is determined based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value. The process of determining the carbon cup bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value includes: If the absolute value of the difference between the classification angle value and the regression angle value is less than or equal to a first preset value, then the average value of the classification angle value and the regression angle value is calculated to obtain the first angle average value. When the absolute value of the first average angle value minus the estimated angle value is less than or equal to the second preset value, the matching angle value and the average angle value are obtained respectively. The matching angle value is the angle value obtained by image matching of the keyway of the carbon bowl image, and the average angle value is the angle value obtained by averaging several matching angle values. If the first average angle is not equal to the third preset value, then the carbon cup keyway angle value is determined based on the first average angle, the matching angle value, and the average angle. The step of determining the carbon cup keyway angle value based on the first angle average value, the matching angle value, and the angle average value includes: Calculate the absolute value of the difference between the first angle average value and the matching angle value, and calculate the absolute value of the difference between the first angle average value and the angle mean value to obtain the first angle difference and the second angle difference, respectively; If the first angle difference is greater than the second angle difference, then the average value of the first angle is taken as the carbon cup keyway angle value; If the first angle difference is less than the second angle difference, then the matching angle value is used as the carbon cup keyway angle value.

2. The method for determining the carbon bowl keyway angle based on a carbon bowl image according to claim 1, characterized in that, The calculation of the carbon bowl bond groove angle value based on the classification angle value, the regression angle value, and the estimated angle value also includes: If the average value of the first angle is equal to the third preset value, then calculate the absolute value of the difference between the classification angle value and the matching angle value and calculate the absolute value of the difference between the regression angle value and the matching angle value to obtain the third angle difference and the fourth angle difference respectively. If the third angle difference is less than the fourth preset value and the fourth angle difference is greater than the fourth preset value, then the classification angle value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value. If the third angle difference is greater than the fourth preset value and the fourth angle difference is less than the fourth preset value, then the regression angle value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value and the angle average value.

3. The method for determining the carbon bowl keyway angle based on a carbon bowl image according to claim 1, characterized in that, The process of determining the carbon cup bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value further includes: If the absolute value of the difference between the classification angle value and the regression angle value is greater than the first preset value, then the absolute value of the difference between the classification angle value and the estimated angle value and the absolute value of the difference between the regression angle value and the estimated angle value are calculated to obtain the fifth angle difference and the sixth angle difference, respectively. If the fifth angle difference is less than or equal to the fifth preset value or the sixth angle difference is less than or equal to the sixth preset value, then the carbon cup keyway angle value is determined based on the first angle average value, the matching angle value, and the angle average value.

4. The method for determining the carbon bowl keyway angle based on a carbon bowl image according to claim 1, characterized in that, The process of determining the carbon cup bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value further includes: If the absolute value of the difference between the classification angle value and the regression angle value is greater than the first preset value, then the seventh preset value is assigned to the first angle average value, and the carbon cup keyway angle value is determined based on the assigned first angle average value, the matching angle value, and the angle average value.

5. The method for determining the carbon bowl keyway angle based on a carbon bowl image according to claim 3, characterized in that, The process of determining the carbon cup bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value further includes: If the absolute value of the difference between the first average angle and the estimated angle is greater than the second preset value, or if the fifth angle difference is greater than the fifth preset value, or if the sixth angle difference is greater than the sixth preset value, then an error is triggered.

6. The method for determining the carbon bowl keyway angle based on a carbon bowl image according to any one of claims 1-5, characterized in that, The operation of obtaining the matching angle value includes: The carbon bowl image is segmented using a preset image segmentation model to obtain several keyway region images; Calculate the image matching degree between each keyway region image and a preset keyway image, and select the keyway region image with the highest image matching degree as the target image; Extract the center point of the keyway in the target image, and calculate the matching angle value based on the center point of the keyway.

7. A device for determining the keyway angle of a carbon bowl based on a carbon bowl image, characterized in that, The device includes: An image acquisition module is used to acquire an image of a carbon bowl, and to perform angle recognition on the image of the carbon bowl using different models to obtain angle parameters. The angle parameters include: a classification angle value obtained by a classification model, a regression angle value obtained by a regression model, and an estimated angle value obtained by a segmentation model. The angle determination module determines the carbon cup bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value. The process of determining the carbon cup bond groove angle value based on the numerical values ​​of the classification angle value, the regression angle value, and the estimated angle value includes: If the absolute value of the difference between the classification angle value and the regression angle value is less than or equal to a first preset value, then the average value of the classification angle value and the regression angle value is calculated to obtain the first angle average value. When the absolute value of the first average angle value minus the estimated angle value is less than or equal to the second preset value, the matching angle value and the average angle value are obtained respectively. The matching angle value is the angle value obtained by image matching of the keyway of the carbon bowl image, and the average angle value is the angle value obtained by averaging several matching angle values. If the first average angle is not equal to the third preset value, then the carbon cup keyway angle value is determined based on the first average angle, the matching angle value, and the average angle. The step of determining the carbon cup keyway angle value based on the first angle average value, the matching angle value, and the angle average value includes: Calculate the absolute value of the difference between the first angle average value and the matching angle value, and calculate the absolute value of the difference between the first angle average value and the angle mean value to obtain the first angle difference and the second angle difference, respectively; If the first angle difference is greater than the second angle difference, then the average value of the first angle is taken as the carbon cup keyway angle value; If the first angle difference is less than the second angle difference, then the matching angle value is used as the carbon cup keyway angle value.

8. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the carbon bowl keyway angle determination method based on a carbon bowl image as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer-executable program for causing a computer to perform the carbon bowl keyway angle determination method based on a carbon bowl image as described in any one of claims 1-6.