Detection method and apparatus for battery housing, device, medium, and product

By conducting curve fitting detection of the corner images of the battery case, the problem of corner burrs detection of the battery case is solved, accurate identification of burrs is achieved, and the safety of the battery is improved.

WO2025123649A1PCT designated stage expired Publication Date: 2025-06-19CONTEMPORARY AMPEREX TECHNOLOGY CO LTD

Patent Information

Application Number
PCT/CN2024/102259
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-14
Filing Date
2024-06-28
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

The edges of the battery case are prone to burrs during the stamping process, resulting in poor sealing of the battery and safety hazards. It is difficult for the prior art to effectively detect whether there are burrs in the edges.

Method used

By obtaining the edge corner image of the battery case, the edge profile of the curved part is extracted, and curve fitting is performed based on feature points to determine whether there are glitches on the edge corners.

Benefits of technology

Accurate detection of the corner burrs of the battery case is achieved, improving the safety of the battery and reducing the risk of liquid leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024102259_19062025_PF_FP_ABST
    Figure CN2024102259_19062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a detection method and apparatus for a battery housing, a device, a medium, and a product. The method comprises: acquiring a first image of a first corner of a battery housing, the first corner being a rounded corner; extracting a target edge contour of a curved portion of the first corner in the first image; performing curve fitting on the basis of feature points of the target edge contour to obtain a target curve; and on the basis of the target curve, determining whether burrs are present on the first corner. In this way, by means of curve fitting, whether burrs are present on corners of a battery housing can be detected more accurately.
Need to check novelty before this filing date? Find Prior Art

Description

Battery shell detection method, device, equipment, medium and product

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application 202311728928.7, filed on December 14, 2023, entitled “Battery shell detection method, device, equipment, medium and product,” and the entire contents of that application are incorporated herein by reference. Technical Field

[0003] The present application relates to the field of visual inspection technology, and in particular to a method, device, equipment, medium and product for inspecting a battery casing. Background Art

[0004] The corners of the battery shell are prone to burrs during the stamping process. The presence of burrs at the corners of the battery shell will lead to poor sealing of the battery, which may cause battery leakage and pose a safety hazard.

[0005] In order to improve the safety of the battery, it is necessary to detect whether there are burrs at the corners of the battery housing. Therefore, a method for detecting whether there are burrs at the corners of the battery housing is needed.

[0006] Summary of the Invention

[0007] The present application provides a battery casing detection method, device, equipment, medium and product, which can more accurately detect whether there are burrs at the corners of the battery casing through curve fitting.

[0008] In a first aspect, the present application provides a method for detecting a battery shell, comprising: obtaining a first image of a first corner of the battery shell, wherein the first corner is a rounded corner; extracting a target edge contour of the curved portion of the first corner in the first image; performing curve fitting based on feature points of the target edge contour to obtain a target curve; and determining whether there are burrs on the first corner based on the target curve.

[0009] In this way, a first image of a first corner of the battery case can be acquired, and then a target edge profile of the curved portion of the first corner in the first image can be extracted. Curve fitting is then performed based on the characteristic points of the target edge profile to obtain a target curve. Based on the target curve, the presence of burrs at the first corner can be determined. This curve fitting method can more accurately detect the presence of burrs at the corners of the battery case.

[0010] In some embodiments, curve fitting is performed based on the characteristic points of the target edge contour to obtain a target curve, including: performing circle fitting based on the two end points of the target edge contour to obtain a target circle; determining whether there are burrs on the first corner based on the target curve, including: calculating the difference between the distance between the point on the target edge contour and the center of the target circle and the radius of the target circle; determining whether there are burrs on the first corner based on the difference corresponding to the point on the target edge contour.

[0011] In this way, by performing circular fitting based on the two end points of the target edge contour, it is possible to accurately determine whether there is a burr on the first corner based on the difference between the distance between each point on the target edge contour and the center of the target circle and the radius of the target circle.

[0012] In some embodiments, determining whether there is a burr on the first corner based on the difference corresponding to the points on the target edge contour includes: if the difference corresponding to the first point on the target edge contour is greater than a first threshold, determining that there is a burr at the first point.

[0013] In this way, by judging whether the difference between the distance between each point on the target edge contour and the center of the target circle and the radius of the target circle exceeds the first threshold, it can be accurately determined whether there is a burr on the first corner.

[0014] In some embodiments, after calculating the difference between the distance between a point on the target edge contour and the center of the target circle and the radius of the target circle, the battery shell detection method also includes: when the difference corresponding to each point on the target edge contour is not greater than a first threshold, performing a quadratic curve fitting based on the target points on the target edge contour to obtain a target quadratic curve, the target points include at least three points; calculating the curvature of the target quadratic curve; and determining whether there are burrs on the first corner based on the curvature.

[0015] In this way, since the curvature change can reflect the smoothness of the curve, determining whether there is a burr on the first corner based on the curvature of the target quadratic curve can further detect whether there is a small, discontinuous burr on the first corner.

[0016] In some embodiments, determining whether a burr exists on the first corner based on the curvature includes: if the curvature is greater than a second threshold, determining that a burr exists on the edge contour segment corresponding to the target point.

[0017] In this way, by judging whether the curvature of the target quadratic curve exceeds the second threshold, it is possible to accurately judge whether there are small, discontinuous burrs on the edge contour segment.

[0018] In some embodiments, before performing circular fitting based on the two endpoints of the target edge contour to obtain the target circle, the battery shell detection method also includes: performing quadratic curve fitting based on the target points on the target edge contour to obtain the target quadratic curve, the target points include at least three points; calculating the curvature of the target quadratic curve; performing circular fitting based on the two endpoints of the target edge contour to obtain the target circle, including: when the curvature is not greater than the second threshold, performing circular fitting based on the two endpoints of the target edge contour to obtain the target circle.

[0019] In this way, the curvature of the target quadratic curve is not greater than the second threshold value, which can indicate that there are no small, continuous burrs on the first corner. Therefore, the target quadratic curve can be fitted first. If no burrs are detected based on the target quadratic curve, circular fitting can be performed to further detect whether there are burrs on the first corner.

[0020] In some embodiments, the battery casing detection method further includes: when the curvature is greater than a second threshold, determining that a burr exists on the edge contour segment corresponding to the target point.

[0021] In this way, the curvature of the target quadratic curve greater than the second threshold can indicate the presence of small, continuous burrs on the first corner. Therefore, if the curvature of the target quadratic curve is greater than the second threshold, it can be determined that there are burrs on the edge contour segment corresponding to the target point, without the need for subsequent detection, saving time and improving detection efficiency.

[0022] In some embodiments, obtaining a first image of a first corner of a battery shell includes: obtaining a color image of the first corner of the battery shell; grayscale processing the color image to obtain a second image; and binarizing the second image to obtain the first image.

[0023] In this way, by performing preprocessing such as grayscale and binarization on the directly acquired color image of the first corner, the first corner in the image can be highlighted, thereby facilitating more accurate burr detection on the first corner of the battery housing.

[0024] In some embodiments, extracting the edge contour of the curved portion of the first corner in the first image includes: performing edge detection on the first image to obtain a first edge contour of the first corner; removing edge contour segments of straight portions from the first edge contour to obtain a third image containing a second edge contour, where the second edge contour is the edge contour of the curved portion of the first corner; and determining a target edge contour based on connected components of different regions in the third image, where the target edge contour is the outer edge contour of the curved portion of the first corner.

[0025] In this way, the outer edge contour of the curved portion of the first corner can be accurately extracted through the above process, so that burr detection can be performed on the first corner more accurately based on the outer edge contour of the curved portion of the first corner.

[0026] In some embodiments, performing edge detection on the first image to obtain a first edge contour of the first corner includes: performing edge detection on the first image based on a Kenny edge detection algorithm to obtain the first edge contour of the first corner.

[0027] In this way, the Kenny edge detection algorithm can be used to more accurately perform edge detection on the first image, thereby accurately determining the first edge contour of the first corner.

[0028] In some embodiments, removing edge contour segments of straight portions from a first edge contour to obtain a third image containing a second edge contour comprises: determining edge contour segments of straight portions from the first edge contour; and removing edge contour segments of straight portions from the first edge contour to obtain a third image containing the second edge contour.

[0029] In this way, by removing the straight edge contour segments from the first edge contour, the edge contour of the rounded corner area can be accurately obtained, which facilitates subsequent curve fitting.

[0030] In some embodiments, determining edge contour segments of a straight part from a first edge contour includes: cutting the first edge contour to obtain multiple straight line segments; determining multiple first straight line segments whose lengths are greater than a third threshold value from the multiple straight line segments; determining vertical straight line segments and horizontal line segments from the multiple first straight line segments; determining a segmentation point based on each of the vertical straight line segments and the horizontal line segments to obtain two segmentation points; and determining the other edge contour segments in the first edge contour except the edge contour segment between the two segmentation points as edge contour segments of the straight part.

[0031] In this way, the edge contour segment of the straight portion in the first edge contour can be accurately determined through the above process.

[0032] In some embodiments, determining vertical line segments and horizontal line segments from multiple first straight line segments includes: determining vertical line segments and horizontal line segments from multiple first straight line segments based on the horizontal coordinate difference and the vertical coordinate difference between two endpoints corresponding to each first straight line segment.

[0033] In this way, based on the abscissa difference and ordinate difference of each first straight line segment, the vertical line segment and the horizontal line segment therein can be accurately determined.

[0034] In some embodiments, cutting the first edge contour to obtain multiple straight line segments includes: performing a Hough transform on the image where the first edge contour is located to obtain endpoint coordinates corresponding to the multiple straight line segments; and determining the multiple straight line segments based on the endpoint coordinates corresponding to the multiple straight line segments.

[0035] In this way, the first edge contour can be accurately cut into multiple straight line segments through Hough transform.

[0036] In some embodiments, a segmentation point is determined based on each vertical line segment and a horizontal line segment to obtain two segmentation points, including: determining the first segmentation point based on the longitudinal coordinate of the part where the vertical line segment is located and the first edge contour overlaps; determining the second segmentation point based on the transverse coordinate of the part where the horizontal line segment is located and the first edge contour overlaps; determining the first segmentation point and the second segmentation point as two segmentation points.

[0037] In this way, the two segmentation points can be determined more accurately through the above process, thereby more accurately segmenting the edge contour of the curved portion of the first corner.

[0038] In some embodiments, the target edge contour is determined based on the connected components of different areas in the third image, including: sorting the connected components corresponding to different areas in the third image from large to small to obtain a connected component sequence; and determining that the area corresponding to the second connected component in the connected component sequence is the target edge contour.

[0039] In this way, the outer edge contour of the curved portion of the first corner can be accurately determined by sorting the connected components corresponding to different areas in the third image from large to small.

[0040] In second aspect, the present application provides a battery shell detection device, including: an acquisition module for acquiring a first image of a first corner of the battery shell, where the first corner is a rounded corner; an extraction module for extracting a target edge contour of the curved part of the first corner in the first image; a fitting module for performing curve fitting based on feature points of the target edge contour to obtain a target curve; and a determination module for determining whether there are burrs on the first corner based on the target curve.

[0041] In this way, a first image of a first corner of the battery case can be acquired, and then a target edge profile of the curved portion of the first corner in the first image can be extracted. Curve fitting is then performed based on the characteristic points of the target edge profile to obtain a target curve. Based on the target curve, the presence of burrs at the first corner can be determined. This curve fitting method can more accurately detect the presence of burrs at the corners of the battery case.

[0042] In a third aspect, the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;

[0043] When the processor executes the computer program instructions, the method for detecting the battery casing as shown in any one of the embodiments of the first aspect is implemented.

[0044] In a fourth aspect, the present application provides a computer storage medium having computer program instructions stored thereon, which, when executed by a processor, implements the battery case detection method shown in any one of the embodiments of the first aspect.

[0045] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the battery case detection method shown in any one of the embodiments of the first aspect.

[0046] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference numerals are used throughout the drawings to represent the same components. In the drawings:

[0048] FIG1 is a schematic diagram of a flow chart of a battery casing detection method according to some embodiments of the present application;

[0049] FIG2 is a schematic diagram of a first image provided in some embodiments of the present application;

[0050] FIG3 is a second schematic diagram of a first image provided in some embodiments of the present application;

[0051] FIG4 is a second flow chart of a battery casing detection method provided in some embodiments of the present application;

[0052] FIG5 is a schematic diagram of a burr provided by some embodiments of the present application;

[0053] FIG6 is a second flow chart of a battery casing detection method provided in some embodiments of the present application;

[0054] FIG7 is a third flow chart of a battery casing detection method provided in some embodiments of the present application;

[0055] FIG8 is a schematic structural diagram of a battery casing detection device provided in some embodiments of the present application;

[0056] FIG9 is a schematic structural diagram of an electronic device provided in some embodiments of the present application. DETAILED DESCRIPTION

[0057] The following embodiments of the technical solution of the present application will be described in detail with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present application and are therefore only examples and are not intended to limit the scope of protection of the present application.

[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned figure descriptions are intended to cover non-exclusive inclusions.

[0059] In the description of the embodiments of this application, the technical terms "first" and "second" are used only to distinguish different objects and should not be understood to indicate or imply relative importance or implicitly specify the quantity, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, the meaning of "plurality" is more than two, unless otherwise clearly and specifically defined.

[0060] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0061] In the description of the embodiments of this application, the term "and / or" is simply a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent the following three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.

[0062] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).

[0063] As mentioned in the background art, in order to improve the safety of the battery, it is necessary to detect whether there are burrs at the corners of the battery housing.

[0064] In related technologies, deep learning models are commonly used for electrode burr detection. However, this approach relies on training with labeled image burr data. When the data volume is insufficient, the resulting model is less robust and cannot generalize to new data. Furthermore, in practice, there are not many images with labeled burrs on the corners of battery casings available. Therefore, this approach is suitable for electrode burrs but not for the corners of battery casings.

[0065] Therefore, a method for detecting whether there are burrs at the corners of a battery housing is needed.

[0066] To address the above technical issues, in an embodiment of the present application, a first image of a first corner of a battery case is acquired, and then a target edge profile of the curved portion of the first corner in the first image is extracted. Curve fitting is then performed based on the characteristic points of the target edge profile to obtain a target curve, and the presence of burrs at the first corner is determined based on the target curve. This curve fitting allows for more accurate detection of burrs at the corners of the battery case.

[0067] First, the battery case detection method provided in the embodiment of the present application is described in detail with reference to FIG1 .

[0068] FIG1 shows a schematic flow chart of a battery casing detection method provided in one embodiment of the present application. It should be noted that the battery casing detection method can be applied to a battery casing detection device.

[0069] As shown in FIG1 , the battery shell detection method may include the following steps:

[0070] S110, acquiring a first image of a first corner of the battery housing;

[0071] S120, extracting a target edge contour of a curved portion of a first corner in the first image;

[0072] S130 , performing curve fitting based on the feature points of the target edge contour to obtain a target curve.

[0073] S140: Determine whether there is a burr on the first corner based on the target curve.

[0074] In this way, a first image of a first corner of the battery case can be acquired, and then a target edge profile of the curved portion of the first corner in the first image can be extracted. Curve fitting is then performed based on the characteristic points of the target edge profile to obtain a target curve. Based on the target curve, the presence of burrs at the first corner can be determined. This curve fitting method can more accurately detect the presence of burrs at the corners of the battery case.

[0075] Regarding S110 , the first corner may be a rounded corner. For example, the first corner may be an R corner.

[0076] The battery case includes a plurality of side plates and a connecting plate between two adjacent side plates. The plurality of side plates are arranged circumferentially along the opening of the case. The connecting plate is used to connect two adjacent side plates. At least part of the outer surface of the connecting plate includes a curved surface. The outer surface of the connecting plate mentioned here refers to the surface of the connecting plate facing away from the electrode assembly. The outer surface of the connecting plate may be a curved surface as a whole, or only partially curved. The inner surface of the connecting plate may also include a curved surface, or may not include a curved surface. The curved surface of the connecting plate can be used to achieve a smooth transition between two adjacent side plates. The presence of the curved surface helps to improve the flatness of the outer surface of the battery case and improve the appearance of the battery case. The angle formed by this curved surface is the R angle. The R angle of the battery case is prone to burrs during the stamping process.

[0077] For example, the first image may be as shown in FIG. 2 or FIG. 3 , where FIG. 2 includes the first corner 210 , and FIG. 3 includes the first corner 310 .

[0078] In some embodiments, to more accurately detect burrs on the first corner of the battery housing, S110 may include:

[0079] Acquire a color image of a first corner of the battery housing;

[0080] Performing grayscale processing on the color image to obtain a second image;

[0081] The second image is binarized to obtain the first image.

[0082] Here, the color image may be an RGB image, and the second image may be a grayscale image.

[0083] Specifically, the color image is converted into a grayscale image, and then the grayscale image is binarized, so that the first corner portion can be highlighted.

[0084] For example, the pixel value at the R corner in the first image may be 1, and the pixel value at the background may be 0.

[0085] In this way, by performing preprocessing such as grayscale and binarization on the directly acquired color image of the first corner, the first corner in the image can be highlighted, thereby facilitating more accurate burr detection on the first corner of the battery housing.

[0086] Involving S120, it is necessary to perform burr detection on the curved portion, so it is necessary to extract the target edge contour of the curved portion.

[0087] In some embodiments, to more accurately detect burrs on the first corner of the battery housing, S120 may include:

[0088] Performing edge detection on the first image to obtain a first edge contour of a first corner;

[0089] Eliminating the straight edge contour segments from the first edge contour to obtain a third image including the second edge contour;

[0090] The target edge contour is determined according to the connected components of different regions in the third image.

[0091] Here, the second edge contour may be an edge contour of the curved portion of the first corner, and the target edge contour may be an outer edge contour of the curved portion of the first corner.

[0092] Specifically, edge detection may be performed on the first image to obtain a first edge contour of the first corner, and then the edge contour segments of the straight portion may be removed from the first edge contour to obtain a second edge contour.

[0093] The edge contour of the first corner has a certain width, so it can include an inner edge contour and an outer edge contour. However, burrs on the first corner typically only appear on the outer edge contour. Therefore, the outer edge contour can be further extracted from the second edge contour and burr detection can be performed based on the outer edge contour. Therefore, the outer edge contour of the curved portion of the first corner, i.e., the target edge contour, can be determined based on the connected components of different regions in the third image containing the second edge contour.

[0094] In this way, the outer edge contour of the curved portion of the first corner can be accurately extracted through the above process, so that burr detection can be performed on the first corner more accurately based on the outer edge contour of the curved portion of the first corner.

[0095] In some embodiments, to accurately determine the first edge contour of the first corner, performing edge detection on the first image to obtain the first edge contour of the first corner may include:

[0096] Edge detection is performed on the first image based on a Canny edge detection algorithm to obtain a first edge contour of a first corner.

[0097] In this way, the Canny edge detection algorithm can be used to more accurately perform edge detection on the first image, thereby accurately determining the first edge contour of the first corner.

[0098] In some embodiments, to more accurately extract the outer edge contour of the curved portion of the first corner, determining the target edge contour based on connected components of different regions in the third image may include:

[0099] sorting the connected components corresponding to different regions in the third image from large to small to obtain a connected component sequence;

[0100] Determine the area corresponding to the second connected component in the connected component sequence as the target edge contour.

[0101] Here, the different regions in the third image may include the outer edge contour of the curved portion, the inner edge contour of the curved portion, and a background region, and may also include some noise.

[0102] The background area usually has the most pixels, so the connected component is the largest. The noise area usually has the fewest pixels, so the connected component is the smallest. Since the outer edge of the curved part is longer than the inner edge, the outer edge has more pixels than the inner edge, and the connected component of the outer edge is also larger than the inner edge.

[0103] Based on this, it can be known that the connected components corresponding to different areas in the third image are ranked from large to small as follows: connected components of the background area > connected components of the outer edge contour > connected components of the inner edge contour > connected components of the noise part.

[0104] Therefore, after sorting the connected components corresponding to different areas in the third image from large to small and obtaining a connected component sequence, it can be determined that the area corresponding to the second connected component in the connected component sequence is the outer edge contour of the curved part, that is, the target edge contour.

[0105] In this way, the outer edge contour of the curved portion of the first corner can be accurately determined by sorting the connected components corresponding to different areas in the third image from large to small.

[0106] In some embodiments, to accurately obtain the edge contour of the rounded corner area, removing the straight edge contour segments from the first edge contour to obtain a third image containing the second edge contour may include:

[0107] determining an edge contour segment of a straight portion from the first edge contour;

[0108] The straight edge contour segments are removed from the first edge contour to obtain a third image including the second edge contour.

[0109] In this way, by removing the straight edge contour segments from the first edge contour, the edge contour of the rounded corner area can be accurately obtained, which facilitates subsequent curve fitting.

[0110] In some embodiments, in order to accurately determine the edge contour of the straight portion, the step of determining the edge contour segment of the straight portion from the first edge contour may include:

[0111] Cutting the first edge contour to obtain a plurality of straight line segments;

[0112] determining, from the plurality of straight line segments, a plurality of first straight line segments having lengths greater than a third threshold;

[0113] determining a vertical line segment and a horizontal line segment from the plurality of first line segments;

[0114] Determine a segmentation point based on the vertical line segment and the horizontal line segment, and obtain two segmentation points;

[0115] The other edge contour segments in the first edge contour except the edge contour segment between the two segmentation points are determined to be edge contour segments of the straight portion.

[0116] Here, the third threshold can be set according to actual needs.

[0117] Since the straight line segment obtained by cutting the curved part is very short, while the straight line segment obtained by cutting the straight part is relatively long, it can be determined that the first straight line segments with a length greater than the third threshold among the multiple straight line segments are the straight parts of the first corner.

[0118] The straight portion of the first corner may include a horizontal portion and a vertical portion. Therefore, the plurality of first straight line segments may include a horizontal line segment and a vertical line segment.

[0119] Since the vertical part and the horizontal part in the first corner are usually located at both ends, and the curved part is sandwiched between the vertical part and the horizontal part, the dividing point between the vertical part and the curved part, as well as the dividing point between the horizontal part and the curved part, can be determined first. The edge contour segment between the two dividing points is the edge contour segment of the curved part, that is, the second edge contour.

[0120] In this way, the edge contour segment of the straight portion in the first edge contour can be accurately determined through the above process.

[0121] In some embodiments, in order to accurately cut the first edge contour into a plurality of straight line segments, the above-mentioned cutting of the first edge contour to obtain the plurality of straight line segments may include:

[0122] Performing a Hough transform on the image where the first edge contour is located to obtain the endpoint coordinates corresponding to the plurality of straight line segments;

[0123] Determine multiple straight line segments based on the endpoint coordinates corresponding to the multiple straight line segments.

[0124] In this way, the first edge contour can be accurately cut into multiple straight line segments through Hough transform.

[0125] In some embodiments, in order to accurately determine the vertical line segments and the horizontal line segments from the plurality of first line segments, the above-mentioned determining the vertical line segments and the horizontal line segments from the plurality of first line segments may include:

[0126] A vertical line segment and a horizontal line segment are determined from the plurality of first line segments according to a difference in abscissas and a difference in ordinates between two endpoints corresponding to each first line segment.

[0127] Here, for each first straight line segment, if the horizontal coordinate difference between the two endpoints of the first straight line segment is less than the first preset difference and / or the vertical coordinate difference is greater than the second preset difference, for example, the horizontal coordinate difference is 0 and / or the vertical coordinate difference is greater than 0, then the first straight line segment can be determined to be a vertical straight line segment; if the vertical coordinate difference between the two endpoints of the first straight line segment is less than the first preset difference and / or the horizontal coordinate difference is greater than the second preset difference, for example, the vertical coordinate difference is 0 and / or the horizontal coordinate difference is greater than 0, then the first straight line segment can be determined to be a horizontal line segment.

[0128] The first preset difference and the second preset difference can be set according to actual needs.

[0129] In this way, based on the abscissa difference and ordinate difference of each first straight line segment, the vertical line segment and the horizontal line segment therein can be accurately determined.

[0130] In some embodiments, to more accurately determine the two segmentation points, determining one segmentation point based on each of the vertical line segment and the horizontal line segment to obtain the two segmentation points may include:

[0131] Determine a first segmentation point according to the ordinate of the portion where the vertical line segment overlaps with the first edge contour;

[0132] Determine a second segmentation point according to the horizontal coordinate of the portion where the straight line on which the horizontal line segment is located overlaps with the first edge contour;

[0133] A first segmentation point and a second segmentation point are determined as two segmentation points.

[0134] Here, if the vertical line segment is in the first direction of the curved portion and the positive direction of the y-axis is the first direction, the point where the vertical line segment overlaps with the first edge contour and the ordinate has the minimum value can be determined as the first segmentation point. If the vertical line segment is in the first direction of the curved portion and the positive direction of the y-axis is the second direction, the point where the vertical line segment overlaps with the first edge contour and the ordinate has the maximum value can be determined as the first segmentation point. The first direction is opposite to the second direction. For example, the first direction is up or down.

[0135] If the horizontal line segment is in the third direction of the curved portion and the positive direction of the x-axis is the third direction, the point where the horizontal coordinate of the portion where the straight line of the horizontal line segment overlaps with the first edge contour is determined as the second segmentation point. If the horizontal line segment is in the third direction of the curved portion and the positive direction of the x-axis is the fourth direction, the point where the horizontal coordinate of the portion where the straight line of the horizontal line segment overlaps with the first edge contour is determined as the second segmentation point. The third direction is opposite to the fourth direction. For example, the third direction is left or right.

[0136] In this way, the two segmentation points can be determined more accurately through the above process, thereby more accurately segmenting the edge contour of the curved portion of the first corner.

[0137] Regarding S130 , the curve fitting may include circular fitting and may also include quadratic curve fitting. The target curve may include a target circular curve and may also include a target quadratic curve.

[0138] In related technologies, the shape of the corners of the battery shell is usually approximated as a straight line with an angle of 45°. Then, for each point on the outer edge of the corner, the sample is gradually sampled in the direction of 45° to the lower left at a distance of 1, until the inner edge is sampled. The distance sampled is calculated and used as the standard for judging whether there are burrs. If the distance sampled at a certain point on the outer edge is greater than the preset threshold, it is judged to have burrs. If the distance sampled at each point on the outer edge is not greater than the preset threshold, it is judged to be free of burrs. However, the processing speed of this method is very slow, and the processing time for each image is usually greater than 1s. Moreover, using a straight line to fit the corners of the battery shell will produce large errors and inaccurate detection. In addition, since the thickness of the corners of different battery shells is different, the above-mentioned preset threshold is difficult to set.

[0139] It can be found through observation that the burrs on the corners of the battery shell usually only appear on the outer edge. Therefore, when detecting burrs on the corners of the battery shell, to determine whether there are burrs on the corners of the battery shell, only the shape of the outer edge of the corner can be considered, and the shape of the curved part of the corner of the battery shell is approximately a 1 / 4 arc. Therefore, in the embodiment of the present application, curve fitting is performed on the feature points of the target edge contour of the first corner, which significantly improves the accuracy of burr detection and reduces the miss rate. At the same time, because the battery shell detection method provided in the embodiment of the present application does not involve analog sampling but direct calculation, the detection efficiency is also significantly improved, and does not involve setting a preset threshold based on the thickness of the corner of the battery shell itself, so there is no problem of difficulty in setting the preset threshold.

[0140] In S140, whether a burr exists on the first corner can be determined based on the target circle, and whether a burr exists on the first corner can also be determined based on the target quadratic curve. If it is determined based on either the target circle or the target quadratic curve that a burr exists on the first corner, it can be determined that a burr exists on the first corner; if it is determined based on both the target circle and the target quadratic curve that no burr exists on the first corner, it can be determined that no burr exists on the first corner.

[0141] In some embodiments, to accurately determine whether there is a burr on the first corner, as shown in FIG4 , S130 may include:

[0142] S410, performing circle fitting based on two end points of the target edge contour to obtain a target circle;

[0143] S140 may include:

[0144] S420, calculating the difference between the distance between the point on the target edge contour and the center of the target circle and the radius of the target circle;

[0145] S430: Determine whether there is a burr on the first corner based on the difference values ​​corresponding to the points on the target edge contour.

[0146] In related technologies, when performing circle fitting, three points are usually taken on the curve, and two adjacent points among the three points are used as endpoints to form two line segments. After determining the perpendicular bisectors corresponding to the two line segments, the intersection of the two perpendicular bisectors is the center of the circle.

[0147] In actual situations, however, it is very difficult to select three points. After selecting the two endpoints of the target edge contour, it is difficult to determine the third point because it is unknown where the center of the circle is located in the target edge contour. It is not possible to arbitrarily select a point in the middle of the target edge contour. At the same time, if the distance between the third point and the two endpoints is too close, the fitting circle calculation will fail, and the calculation method will be very unstable. Therefore, in order to be able to stably calculate the approximate fitting circle of the first corner, the following assumptions can be made based on the actual distribution of the data: assuming that the first endpoint of the target edge contour is the top point of the fitting circle, and assuming that burrs will not appear at the two endpoints of the target edge contour. Based on these assumptions, only the two endpoints of the target edge contour need to be taken to determine the position of the center of the circle, thereby obtaining the target circle. This can provide stability in the fitting circle calculation.

[0148] Specifically, when fitting a circle, you can assume that the uppermost endpoint of the target edge contour is the topmost point in the target circle. Based on this, you can draw a vertical line through the first endpoint. Then, determine the point on this vertical line that is equidistant from the first and second endpoints as the center of the target circle. Determine the distance from the first endpoint to the center or the distance from the second endpoint to the center as the radius of the target circle. This will yield the target circle. The second endpoint is the endpoint of the target edge contour other than the first endpoint.

[0149] Then, the difference between the distance between each point on the target edge contour and the center of the target circle and the radius of the target circle can be traversed, and whether there is a burr on the first corner can be determined based on the difference corresponding to each point on the target edge contour.

[0150] In this way, by performing circular fitting based on the two end points of the target edge contour, it is possible to accurately determine whether there is a burr on the first corner based on the difference between the distance between each point on the target edge contour and the center of the target circle and the radius of the target circle.

[0151] In some embodiments, to accurately determine whether there is a burr on the first corner, determining whether there is a burr on the first corner based on the difference corresponding to the points on the target edge profile may include:

[0152] When there is a first point on the target edge contour and the difference value corresponding to the first point is greater than the first threshold, it is determined that there is a burr at the first point.

[0153] Here, the first threshold value can be set according to actual needs. For example, the first threshold value can be equal to 0.

[0154] Specifically, the coordinates of each point on the target edge contour can be traversed to see whether they satisfy the following formula:

[0155] Where (x, y) is the coordinate of any point on the target edge contour, (x0, y0) is the center of the target circle, r is the radius of the target circle, and thresh1 is the first threshold.

[0156] If there is a first point on the target edge contour whose coordinates satisfy the above formula, it can be determined that there is a burr at the first point; if there is no point on the target edge contour whose coordinates satisfy the above formula, it can be determined that there is no burr on the first corner.

[0157] For example, the burr may be as shown in the dashed box 510 in FIG. 5 .

[0158] In this way, by judging whether the difference between the distance between each point on the target edge contour and the center of the target circle and the radius of the target circle exceeds the first threshold, it can be accurately determined whether there is a burr on the first corner.

[0159] In some embodiments, to further determine whether there is a burr on the first corner, after calculating the difference between the distance between the point on the target edge contour and the center of the target circle and the radius of the target circle, as shown in FIG6 , the method may further include:

[0160] S610, performing quadratic curve fitting based on target points on the target edge contour to obtain a target quadratic curve when the difference corresponding to each point on the target edge contour is not greater than a first threshold;

[0161] S620, calculating the curvature of the target quadratic curve;

[0162] S630: Determine whether there is a burr on the first corner based on the curvature.

[0163] Here, the difference corresponding to each point on the target edge contour is not greater than the first threshold, which may indicate that no burrs are detected on the target edge contour based on the circular fitting.

[0164] The target point may include at least three points. Specifically, the target point may include at least three consecutive points.

[0165] Specifically, every three consecutive points on the target edge contour can be traversed, and for any three consecutive points, a quadratic curve fitting can be performed based on the following parametric equation:

[0166] Specifically, the coordinates of the three consecutive points can be substituted into the (x, y) of the parametric equation and the coefficients a1, a2, a3, b1, b2, b3, and the time parameter t can be solved to obtain the target quadratic curve. The fitting calculation can be completed by matrix inversion.

[0167] Then, the curvature of the target quadratic curve can be calculated by the following formula:

[0168] Where k is the curvature of the target quadratic curve.

[0169] In this way, since the curvature change can reflect the smoothness of the curve, determining whether there is a burr on the first corner based on the curvature of the target quadratic curve can further detect whether there is a small, discontinuous burr on the first corner.

[0170] In some embodiments, to further determine whether there is a burr on the first corner, the determining whether there is a burr on the first corner based on the curvature may include:

[0171] When the curvature is greater than the second threshold, it is determined that a burr exists on the edge contour segment corresponding to the target point.

[0172] Here, the second threshold can be set according to actual needs.

[0173] In addition, when the curvature is not greater than the second threshold, it can be determined that no burrs exist on the edge contour segment corresponding to the target point.

[0174] Specifically, whether the curvature of the target quadratic curve is greater than the second threshold can be determined by the following formula:

[0175] Wherein, k is the curvature of the target quadratic curve, and thresh2 is the second threshold.

[0176] If κ>thresh2, it can be determined that there are burrs on the edge contour segment corresponding to the above three consecutive points; if κ≥thresh2, it can be determined that there are no burrs on the edge contour segment corresponding to the above three consecutive points.

[0177] After traversing every three consecutive points on the target edge contour, it can be determined whether there is a burr on the target edge contour.

[0178] Here, we can first determine whether there are burrs on the first corner based on circular fitting. If it is determined that there are burrs on the first corner based on circular fitting, there is no need to perform quadratic curve fitting. If it is determined that there are no burrs on the first corner based on circular fitting, we can further perform quadratic curve fitting and determine whether there are burrs on the first corner based on quadratic curve fitting.

[0179] In this way, by judging whether the curvature of the target quadratic curve exceeds the second threshold, it is possible to accurately judge whether there are small, discontinuous burrs on the edge contour segment.

[0180] In some embodiments, before performing circle fitting based on the two endpoints of the target edge contour to obtain the target circle, the method may further include:

[0181] Performing quadratic curve fitting based on target points on the target edge contour to obtain a target quadratic curve, where the target points include at least three points;

[0182] Calculate the curvature of the target quadratic curve;

[0183] The above-mentioned circular fitting based on the two end points of the target edge contour to obtain the target circle may include:

[0184] When the curvature is not greater than the second threshold, a circle is fitted based on the two end points of the target edge contour to obtain a target circle.

[0185] Here, a quadratic curve can be fitted first. If it is determined based on the fitting of the quadratic curve that there are burrs on the first corner, there is no need to perform circular fitting. If it is determined based on the fitting of the quadratic curve that there are no burrs on the first corner, circular fitting can be further performed to determine whether there are burrs on the first corner based on the circular fitting.

[0186] The specific process can be found in the above embodiment and will not be described again here.

[0187] In this way, the curvature of the target quadratic curve is not greater than the second threshold value, which can indicate that there are no small, continuous burrs on the first corner. Therefore, the target quadratic curve can be fitted first. If no burrs are detected based on the target quadratic curve, circular fitting can be performed to further detect whether there are burrs on the first corner.

[0188] In some embodiments, after calculating the curvature of the target quadratic curve, the method may further include:

[0189] When the curvature is greater than the second threshold, it is determined that a burr exists on the edge contour segment corresponding to the target point.

[0190] The specific process can be found in the above embodiment and will not be described again here.

[0191] In this way, the curvature of the target quadratic curve greater than the second threshold can indicate the presence of small, continuous burrs on the first corner. Therefore, if the curvature of the target quadratic curve is greater than the second threshold, it can be determined that there are burrs on the edge contour segment corresponding to the target point, without the need for subsequent detection, saving time and improving detection efficiency.

[0192] To better describe the entire solution, based on the above embodiments, a specific example is given, as shown in FIG7 , where the battery shell detection method may include S701 to S720 .

[0193] S701: Acquire a color image of a first corner of a battery casing.

[0194] S702: Perform grayscale processing on the color image to obtain a second image.

[0195] S703: Binarize the second image to obtain the first image.

[0196] S704: Perform edge detection on the first image to obtain a first edge contour of a first corner.

[0197] S705: Cut the first edge contour to obtain multiple straight line segments.

[0198] S706 : Determine, from the plurality of straight line segments, a plurality of first straight line segments whose lengths are greater than a third threshold.

[0199] S707 : Determine a vertical line segment and a horizontal line segment from the plurality of first line segments according to the abscissa difference and the ordinate difference between two endpoints corresponding to each first line segment.

[0200] S708, determining a first segmentation point based on the ordinate of the portion where the vertical line segment overlaps with the first edge contour, and determining a second segmentation point based on the abscissa of the portion where the horizontal line segment overlaps with the first edge contour, thereby obtaining two segmentation points.

[0201] S709 : Determine that the other edge contour segments in the first edge contour, except for the edge contour segment between the two segmentation points, are edge contour segments of the straight portion.

[0202] S710 , removing straight edge contour segments from the first edge contour to obtain a third image including the second edge contour.

[0203] S711, sort the connected components corresponding to different regions in the third image from large to small to obtain a connected component sequence.

[0204] S712: Determine that the area corresponding to the second connected component in the connected component sequence is the target edge contour.

[0205] S713 , performing circle fitting based on the two end points of the target edge contour to obtain a target circle.

[0206] S714 , calculating the difference between the distance between the point on the target edge contour and the center of the target circle and the radius of the target circle.

[0207] S715 , determining whether there is a first point on the target edge contour whose corresponding difference value is greater than a first threshold.

[0208] If yes, execute S719; if no, execute S716.

[0209] S716 , performing quadratic curve fitting based on every three consecutive points on the target edge contour to obtain multiple target quadratic curves.

[0210] S717: Calculate the curvature of each target quadratic curve respectively.

[0211] S718: Determine whether there is a curvature greater than a second threshold.

[0212] If yes, execute S719; if no, execute S720.

[0213] S719: Determine whether a burr exists on the first corner.

[0214] S720: Determine whether there is no burr on the first corner.

[0215] The specific process and meaning of each step can be found in the above embodiments and will not be described in detail here.

[0216] The battery case detection method provided in the embodiments of the present application can effectively improve the accuracy of burr detection, reduce the missed detection rate, and reduce the algorithm runtime. Specifically, the battery case detection method provided in the embodiments of the present application can perform a two-round judgment, first using a circular fitting method to accurately detect larger, obvious burrs, and then detecting less obvious small burrs through curvature calculation. This significantly improves the accuracy and applicability of burr detection and also enhances stability.

[0217] Based on the same inventive concept, the present embodiment further provides a battery housing detection device. The battery housing detection device provided in the present embodiment is described in detail below with reference to FIG8 .

[0218] FIG8 shows a schematic structural diagram of a battery casing detection device provided in one embodiment of the present application.

[0219] As shown in FIG8 , the battery housing detection device may include:

[0220] An acquisition module 801 is configured to acquire a first image of a first corner of a battery housing, where the first corner is a rounded corner;

[0221] An extraction module 802 is configured to extract a target edge contour of a curved portion of a first corner in a first image;

[0222] A fitting module 803 is used to perform curve fitting based on the feature points of the target edge contour to obtain a target curve;

[0223] The determination module 804 is configured to determine whether there is a burr on the first corner based on the target curve.

[0224] In this way, a first image of a first corner of the battery case can be acquired, and then a target edge profile of the curved portion of the first corner in the first image can be extracted. Curve fitting is then performed based on the characteristic points of the target edge profile to obtain a target curve. Based on the target curve, the presence of burrs at the first corner can be determined. This curve fitting method can more accurately detect the presence of burrs at the corners of the battery case.

[0225] In some embodiments, in order to accurately determine whether there is a burr on the first corner, the fitting module 803 may include:

[0226] The first fitting submodule is used to perform circle fitting based on the two end points of the target edge contour to obtain a target circle;

[0227] The determination module 804 may include:

[0228] A first calculation submodule is used to calculate the difference between the distance between a point on the target edge contour and the center of the target circle and the radius of the target circle;

[0229] The first determining submodule is configured to determine whether there is a burr on the first corner based on the difference values ​​corresponding to the points on the target edge contour.

[0230] In some embodiments, in order to accurately determine whether there is a burr on the first corner, the first determination submodule may include:

[0231] The first determining unit is configured to determine that a burr exists at a first point on the target edge contour when a difference value corresponding to the first point is greater than a first threshold.

[0232] In some embodiments, in order to further determine whether there is a burr on the first corner, the battery housing detection device may further include:

[0233] a second fitting submodule, configured to, after calculating the difference between the distance between the point on the target edge contour and the center of the target circle and the radius of the target circle, perform quadratic curve fitting based on the target points on the target edge contour if the difference corresponding to each point on the target edge contour is not greater than a first threshold, to obtain a target quadratic curve, where the target points include at least three points;

[0234] A second calculation submodule is used to calculate the curvature of the target quadratic curve;

[0235] The second determining submodule is configured to determine whether there is a burr on the first corner based on the curvature.

[0236] In some embodiments, to further determine whether there is a burr on the first corner, the second determining submodule may include:

[0237] The second determining unit is configured to determine whether a burr exists on the edge contour segment corresponding to the target point when the curvature is greater than a second threshold.

[0238] In some embodiments, the battery housing detection device may further include:

[0239] A third fitting submodule is configured to perform quadratic curve fitting based on target points on the target edge contour to obtain a target quadratic curve before performing circle fitting based on the two end points of the target edge contour to obtain a target circle, wherein the target points include at least three points;

[0240] A third calculation submodule is used to calculate the curvature of the target quadratic curve;

[0241] The first fitting submodule may include:

[0242] The fitting unit is used to perform circle fitting based on two end points of the target edge contour to obtain a target circle when the curvature is not greater than a second threshold.

[0243] In some embodiments, the battery housing detection device may further include:

[0244] The third determining submodule is configured to determine whether a burr exists on the edge contour segment corresponding to the target point when the curvature is greater than a second threshold.

[0245] In some embodiments, in order to more accurately detect burrs on the first corner of the battery housing, the acquisition module 801 may include:

[0246] an acquisition submodule, configured to acquire a color image of a first corner of the battery housing;

[0247] A grayscale submodule, used to perform grayscale processing on the color image to obtain a second image;

[0248] The binarization submodule is used to perform binarization processing on the second image to obtain the first image.

[0249] In some embodiments, in order to more accurately detect burrs on the first corner of the battery housing, the extraction module 802 may include:

[0250] an edge detection submodule, configured to perform edge detection on the first image to obtain a first edge contour of a first corner;

[0251] a removal submodule, configured to remove the straight edge contour segment from the first edge contour to obtain a third image including a second edge contour, where the second edge contour is the edge contour of the curved portion of the first corner;

[0252] The fourth determining submodule is configured to determine a target edge contour according to connected components of different regions in the third image, where the target edge contour is an outer edge contour of the curved portion of the first corner.

[0253] In some embodiments, to accurately determine the first edge contour of the first corner, the edge detection submodule may include:

[0254] The edge detection unit is configured to perform edge detection on the first image based on a Kenny edge detection algorithm to obtain a first edge contour of a first corner.

[0255] In some embodiments, in order to accurately obtain the edge contour of the rounded corner area, the culling submodule may include:

[0256] a third determining unit, configured to determine an edge contour segment of a straight portion from the first edge contour;

[0257] The elimination unit is used to eliminate the straight edge contour segment from the first edge contour to obtain a third image containing the second edge contour.

[0258] In some embodiments, in order to accurately determine the edge contour of the straight portion, the culling unit may include:

[0259] a cutting subunit, configured to cut the first edge contour to obtain a plurality of straight line segments;

[0260] a first determining subunit, configured to determine, from the plurality of straight line segments, a plurality of first straight line segments whose lengths are greater than a third threshold;

[0261] a second determining subunit, configured to determine a vertical line segment and a horizontal line segment from the plurality of first line segments;

[0262] A third determining subunit is configured to determine a segmentation point according to the vertical line segment and the horizontal line segment, thereby obtaining two segmentation points;

[0263] The fourth determining subunit is configured to determine that other edge contour segments in the first edge contour, except for the edge contour segment between the two segmentation points, are edge contour segments of a straight portion.

[0264] In some embodiments, in order to accurately determine the vertical line segments and the horizontal line segments in the plurality of first line segments, the second determining subunit may be specifically configured to:

[0265] A vertical line segment and a horizontal line segment are determined from the plurality of first line segments according to a difference in abscissas and a difference in ordinates between two endpoints corresponding to each first line segment.

[0266] In some embodiments, in order to accurately cut the first edge contour into a plurality of straight line segments, the cutting subunit may be specifically configured to:

[0267] Performing Hough transform on the image where the first edge contour is located to obtain the endpoint coordinates corresponding to the multiple straight line segments;

[0268] Determine multiple straight line segments based on the endpoint coordinates corresponding to the multiple straight line segments.

[0269] In some embodiments, in order to more accurately determine the two segmentation points, the third determining subunit may include:

[0270] A fifth determining subunit, configured to determine a first segmentation point according to a longitudinal coordinate of a portion where the vertical line segment is located and the first edge contour overlaps;

[0271] A sixth determining subunit, configured to determine a second segmentation point according to a horizontal coordinate of a portion where the straight line on which the horizontal line segment is located overlaps with the first edge contour;

[0272] The seventh determining subunit is configured to determine the first segmentation point and the second segmentation point as two segmentation points.

[0273] In some embodiments, in order to more accurately extract the outer edge contour of the curved portion of the first corner, the fourth determining submodule may include:

[0274] a sorting unit, configured to sort the connected components corresponding to different regions in the third image from large to small to obtain a connected component sequence;

[0275] The fourth determining unit is used to determine that the area corresponding to the second connected component in the connected component sequence is the target edge contour.

[0276] FIG9 shows a schematic structural diagram of an electronic device provided by an embodiment of the present application.

[0277] As shown in Figure 9, the electronic device 9 is a block diagram of an exemplary hardware architecture of an electronic device capable of implementing the battery shell detection method and battery shell detection device according to the embodiments of the present application. The electronic device may refer to the electronic device in the embodiments of the present application.

[0278] The electronic device 9 may include a processor 901 and a memory 902 storing computer program instructions.

[0279] Specifically, the processor 901 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0280] The memory 902 may include a large-capacity memory for data or instructions. By way of example and not limitation, the memory 902 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 902 may include removable or non-removable (or fixed) media. Where appropriate, the memory 902 may be internal or external to the integrated gateway disaster recovery device. In certain embodiments, the memory 902 is a non-volatile solid-state memory. In certain embodiments, the memory 902 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Therefore, generally, the memory 902 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present application.

[0281] The processor 901 reads and executes computer program instructions stored in the memory 902 to implement any one of the battery casing detection methods in the above embodiments.

[0282] In one example, the electronic device may further include a communication interface 903 and a bus 904. As shown in FIG9, the processor 901, the memory 902, and the communication interface 903 are connected via the bus 904 and communicate with each other.

[0283] The communication interface 903 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0284] Bus 904 comprises hardware, software or both, couples the parts of electronic equipment to each other.For example, and not limitation, bus can comprise accelerated graphics port (AGP) or other graphics buses, enhanced industry standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industry standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations.In suitable cases, bus 904 can comprise one or more buses.Although the present application embodiment describes and shows specific bus, the application considers any suitable bus or interconnection.

[0285] The electronic device can execute the battery casing detection method in the embodiment of the present application, thereby realizing the battery casing detection method and device described in conjunction with Figures 1 to 8.

[0286] In addition, in conjunction with the battery case detection method in the above embodiments, embodiments of the present application may provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the battery case detection methods in the above embodiments is implemented.

[0287] It should be understood that the present application is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, a detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present application is not limited to the specific steps described and illustrated. Those skilled in the art can make various changes, modifications, and additions, or change the order of the steps after understanding the spirit of the present application.

[0288] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0289] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps. In other words, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0290] Aspects of the present application have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed via the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. This processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or the flowchart and the combination of the boxes in the block diagram and / or the flowchart can also be implemented by the dedicated hardware that performs the specified function or action, or can be implemented by the combination of dedicated hardware and computer instructions.

[0291] Although the present application has been described with reference to preferred embodiments, various modifications may be made thereto and components may be replaced with equivalents without departing from the scope of the present application. In particular, the various technical features described in the various embodiments may be combined in any manner as long as there are no structural conflicts. The present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions within the scope of the claims.

Claims

1. A method for detecting a battery casing, comprising: Acquire a first image of a first corner of a battery housing, where the first corner is a rounded corner; Extracting a target edge contour of a curved portion of a first corner in the first image; Performing curve fitting based on the feature points of the target edge contour to obtain a target curve; It is determined whether there is a burr on the first corner based on the target curve.

2. The method according to claim 1, wherein: The step of performing curve fitting based on the feature points of the target edge contour to obtain a target curve includes: Performing circular fitting based on two end points of the target edge contour to obtain a target circle; The determining whether there is a burr on the first corner based on the target curve includes: Calculate the difference between the distance between the point on the target edge contour and the center of the target circle and the radius of the target circle; Based on the difference corresponding to the point on the target edge contour, it is determined whether there is a burr on the first corner.

3. The method according to claim 2, wherein: The determining whether there is a burr on the first corner based on the difference corresponding to the point on the target edge contour includes: When there is a first point on the target edge contour and the difference corresponding to the first point is greater than a first threshold, it is determined that a burr exists at the first point.

4. The method according to claim 3, after calculating the difference between the distance between the point on the target edge contour and the center of the target circle and the radius of the target circle, the method further comprises: When the difference corresponding to each point on the target edge contour is not greater than the first threshold, performing quadratic curve fitting based on the target points on the target edge contour to obtain a target quadratic curve, wherein the target points include at least three points; Calculating the curvature of the target quadratic curve; It is determined whether there is a burr on the first corner based on the curvature.

5. The method according to claim 4, wherein: The determining whether there is a burr on the first corner based on the curvature includes: When the curvature is greater than the second threshold, it is determined that a burr exists on the edge contour segment corresponding to the target point.

6. The method according to claim 2, before performing circle fitting based on two end points of the target edge contour to obtain a target circle, the method further comprises: Performing quadratic curve fitting based on target points on the target edge contour to obtain a target quadratic curve, wherein the target points include at least three points; Calculating the curvature of the target quadratic curve; The step of performing circular fitting based on two end points of the target edge contour to obtain a target circle includes: When the curvature is not greater than the second threshold, a circle is formed based on the two end points of the target edge contour. Shape fitting is performed to obtain the target circle.

7. The method according to claim 6, further comprising: When the curvature is greater than the second threshold, it is determined that a burr exists on the edge contour segment corresponding to the target point.

8. The method according to any one of claims 1 to 7, wherein: The step of acquiring a first image of a first corner of a battery housing includes: Acquire a color image of a first corner of the battery housing; Performing grayscale processing on the color image to obtain a second image; Binarization is performed on the second image to obtain the first image.

9. The method according to any one of claims 1 to 8, wherein: The step of extracting the edge contour of the curved portion of the first corner in the first image comprises: Performing edge detection on the first image to obtain a first edge contour of the first corner; Eliminate the straight edge contour segment from the first edge contour to obtain a third image including the second edge contour, where the second edge contour is the edge contour of the curved portion of the first edge corner; The target edge contour is determined according to connected components of different regions in the third image, where the target edge contour is an outer edge contour of a curved portion of the first corner.

10. The method according to claim 9, wherein: The performing edge detection on the first image to obtain a first edge contour of the first corner includes: Perform edge detection on the first image based on Kenny edge detection algorithm to obtain a first edge contour of the first corner.

11. The method according to claim 9 or 10, wherein: The step of removing the straight edge contour segments from the first edge contour to obtain a third image including the second edge contour comprises: determining an edge contour segment of a straight portion from said first edge contour; The edge contour segment of the straight portion is removed from the first edge contour to obtain a third image including the second edge contour.

12. The method according to claim 11, wherein: The step of determining an edge contour segment of a straight portion from the first edge contour comprises: Cutting the first edge contour to obtain a plurality of straight line segments; Determine, from the plurality of straight line segments, a plurality of first straight line segments whose lengths are greater than a third threshold; determining a vertical line segment and a horizontal line segment from the plurality of first line segments; Determine a segmentation point according to the vertical line segment and the horizontal line segment respectively, to obtain two segmentation points; It is determined that other edge contour segments in the first edge contour except the edge contour segment between two segmentation points are edge contour segments of the straight portion.

13. The method according to claim 12, wherein: Determining a vertical line segment and a horizontal line segment from the plurality of first line segments comprises: A vertical line segment and a horizontal line segment are determined from the plurality of first straight line segments according to a difference in abscissas and a difference in ordinates between two endpoints respectively corresponding to each of the first straight line segments.

14. The method according to claim 12 or 13, wherein: The first edge contour is cut to obtain a plurality of straight line segments, including: Performing Hough transformation on the image where the first edge contour is located to obtain the endpoint coordinates corresponding to the plurality of straight line segments; The plurality of straight line segments are determined based on the endpoint coordinates respectively corresponding to the plurality of straight line segments.

15. The method according to any one of claims 12 to 14, wherein: The step of determining a segmentation point according to each of the vertical line segment and the horizontal line segment to obtain two segmentation points comprises: Determine a first segmentation point according to the ordinate of the portion where the line where the vertical line segment is located overlaps with the first edge contour; Determine a second segmentation point according to the horizontal coordinate of the portion where the straight line on which the horizontal line segment is located overlaps with the first edge contour; The first segmentation point and the second segmentation point are determined as the two segmentation points.

16. The method according to any one of claims 9 to 15, wherein: The step of determining the target edge contour according to connected components of different regions in the third image comprises: sorting the connected components corresponding to different regions in the third image from large to small to obtain a connected component sequence; Determine that the area corresponding to the second connected component in the connected component sequence is the target edge contour.

17. A battery housing detection device, the device comprising: An acquisition module, configured to acquire a first image of a first corner of a battery housing, wherein the first corner is a rounded corner; An extraction module, used to extract a target edge contour of a curved portion of a first corner in the first image; A fitting module, used for performing curve fitting based on the feature points of the target edge contour to obtain a target curve; A determination module is used to determine whether there is a burr on the first corner based on the target curve.

18. An electronic device, comprising: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for detecting a battery casing according to any one of claims 1 to 16 is implemented.

19. A computer storage medium, wherein computer program instructions are stored on the computer storage medium, and when the computer program instructions are executed by a processor, the battery casing detection method according to any one of claims 1 to 16 is implemented.

20. A computer program product, wherein when instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the battery casing detection method according to any one of claims 1 to 16.

Citation Information

Patent Citations

  • A workpiece burr detection method based on image processing

    CN109166098A

  • Defective circle fitting method and device for drilling blasting and medium

    CN112991307A

  • Stamping part circular hole positioning and deformation detection method based on sub-pixel edge extraction

    CN116542910A

  • Workpiece contour fitting positioning method and device and storage medium

    CN116958515A

  • Measurement of corner roundness

    US20050069192A1

Cited By

  • Industrial part circular hole burr detection method and device based on image vision algorithm

    CN120953232A

  • Connection bar bending quality detection method and system based on machine vision

    CN122066647A