A battery pack housing detection method and system

The battery pack casing detection method, which utilizes full-domain scanning and feature optimization processing, solves the problem of false detection caused by reliance on image sharpness in existing technologies, and achieves efficient and accurate battery pack casing detection.

CN121236069BActive Publication Date: 2026-03-10JAINGXI ISUZU AUTOMOBILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-01
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing battery pack casing inspection methods rely on the clarity of surface images, resulting in a high false detection rate and low inspection efficiency.

Method used

The spatial coordinate parameters of the battery pack shell are obtained by the visual positioning module. The laser is controlled to perform full-domain scanning to generate an initial three-dimensional contour point cloud. Feature optimization processing is performed to generate a target three-dimensional contour point cloud. Features are extracted and secondary verification is performed to determine the defect area.

Benefits of technology

This improves the accuracy and efficiency of battery pack casing inspection, reduces false positives, and ensures the objectivity and accuracy of inspection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121236069B_ABST
    Figure CN121236069B_ABST
Patent Text Reader

Abstract

The application provides a battery pack shell detection method and system, the method comprises the following steps: obtaining the spatial coordinate parameters of the battery pack shell through a visual positioning module to determine the reference area of laser scanning, and controlling the laser to perform global scanning on the surface of the battery pack shell according to a preset path to generate the corresponding initial three-dimensional contour point cloud; performing feature optimization processing on the initial three-dimensional contour point cloud based on a preset rule to generate the corresponding target three-dimensional contour point cloud, and creating the corresponding three-dimensional point cloud model of the battery pack shell according to the target three-dimensional contour point cloud; performing feature extraction processing on the three-dimensional point cloud model of the battery pack shell to determine whether there is a suspected defect area; if it is determined that there is a suspected defect area, immediately performing secondary verification on the suspected defect area, and determining whether there is a defect on the surface of the battery pack shell according to the verification result. The application can objectively and accurately detect whether the surface of the battery pack shell has defects, and improves the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of new energy vehicle technology, and in particular to a method and system for testing the outer casing of a battery pack. Background Technology

[0002] With the advancement of science and technology and the rapid development of productivity, the production technology of new energy vehicles has become increasingly mature and has been recognized by people. At the same time, it has become popular in people's daily lives, greatly facilitating people's lives.

[0003] Among them, the battery pack is one of the core components of new energy electric vehicles. Based on this, existing battery packs need to undergo comprehensive testing of the internal electrical components and the external battery pack casing before leaving the factory, so that the battery pack can meet the usage requirements.

[0004] Furthermore, in the current actual inspection process of battery pack casings, most existing technologies involve acquiring surface images of the battery pack casing using industrial cameras and performing image analysis on the acquired surface images to determine whether the surface of the battery pack casing has defects. However, this inspection method is entirely dependent on the clarity and accuracy of the acquired surface images. When the acquired surface images have defects, it will directly determine that the surface of the battery pack casing has defects, which can easily lead to false detections and reduce the inspection efficiency of battery pack casings. Summary of the Invention

[0005] Therefore, the purpose of this invention is to provide a battery pack casing detection method and system to solve the problem that the detection in the prior art relies entirely on the clarity and accuracy of the acquired surface image, which easily leads to false detection.

[0006] The first aspect of the present invention proposes:

[0007] A method for testing the casing of a battery pack specifically includes the following steps:

[0008] The spatial coordinate parameters of the battery pack shell are obtained by the visual positioning module to determine the reference area for laser scanning, and the laser is controlled to perform a full-area scan on the surface of the battery pack shell according to a preset path to generate the corresponding initial three-dimensional contour point cloud.

[0009] The initial three-dimensional contour point cloud is subjected to feature optimization processing based on preset rules to generate the corresponding target three-dimensional contour point cloud, and a corresponding battery pack shell three-dimensional point cloud model is created based on the target three-dimensional contour point cloud.

[0010] The three-dimensional point cloud model of the battery pack casing is subjected to feature extraction processing to determine whether there are any suspected defective areas.

[0011] If a suspected defect area is identified, the suspected defect area is immediately subjected to secondary verification, and the surface of the battery pack casing is determined to be defective based on the verification results.

[0012] The beneficial effects of this invention are as follows: by performing full-area laser scanning on the surface of the battery pack casing, a corresponding initial three-dimensional contour point cloud can be created. Based on this, in order to facilitate subsequent objective and accurate analysis, feature optimization processing of the current initial three-dimensional contour point cloud is required, and the required target three-dimensional contour point cloud can be generated. Based on this, the required three-dimensional point cloud model of the battery pack casing is finally created, and defects can be accurately identified and verified, thereby accurately analyzing whether the surface of the battery pack casing has defects, thus improving the detection efficiency.

[0013] Furthermore, the step of controlling the laser to perform a full-area scan on the surface of the battery pack casing according to a preset path to generate a corresponding initial three-dimensional contour point cloud includes:

[0014] Based on the spatial coordinate parameters, the reference area is decomposed into a planar main area, an arc-shaped transition area, and a weld connection area, and the corresponding regional features inside the planar main area, the arc-shaped transition area, and the weld connection area are detected.

[0015] Based on the regional characteristics, corresponding scanning points are set, and the three-dimensional spatial coordinates corresponding to the scanning points are collected;

[0016] All three-dimensional spatial coordinates are written into the point cloud buffer according to the preset path sequence to form the initial three-dimensional contour point cloud.

[0017] Furthermore, the step of writing all the three-dimensional spatial coordinates into the point cloud buffer according to the preset path sequence to form the initial three-dimensional contour point cloud includes:

[0018] All the collected three-dimensional spatial coordinates are classified according to their region affiliation, and corresponding region identification information is added to each type of coordinate.

[0019] According to the region identification information, each of the three-dimensional spatial coordinates is written into the interior of the point cloud buffer. After writing is completed, the first boundary point sequence between the planar main area and the arc transition area and the second boundary point sequence between the arc transition area and the weld connection area are extracted from the point cloud buffer.

[0020] Calculate the spatial distance between the first boundary point sequence and the second boundary point sequence, and after determining that the spatial distance meets the preset requirements, generate the initial three-dimensional contour point cloud accordingly.

[0021] Furthermore, the step of performing feature optimization processing on the initial 3D contour point cloud based on preset rules to generate the corresponding target 3D contour point cloud includes:

[0022] A preset density threshold is calculated based on the sampling frequency of the laser scan, and all point cloud clusters in the initial three-dimensional contour point cloud are traversed. Isolated point cloud clusters with a density lower than the preset density threshold are removed to retain the target point cloud cluster.

[0023] The three-dimensional space containing the initial three-dimensional contour point cloud is divided into several cubic grids according to a preset side length, and the average coordinates of all point clouds are calculated in each cubic grid.

[0024] The initial 3D contour point cloud is optimized based on the mean coordinates and the target point cloud cluster to generate the target 3D contour point cloud.

[0025] Furthermore, the step of optimizing the initial 3D contour point cloud based on the coordinate mean and the target point cloud cluster to generate the target 3D contour point cloud includes:

[0026] All point clouds in the target point cloud cluster are assigned to corresponding cubic grids to obtain an effective point cloud set within each cubic grid.

[0027] Calculate the Euclidean distance between each point in the effective point cloud set within each cubic grid and its corresponding mean coordinate, and retain point clouds with Euclidean distances less than a preset distance threshold and remove point clouds with Euclidean distances greater than or equal to the preset distance threshold to obtain a filtered point cloud set for each cubic grid.

[0028] The selected point cloud sets of all cubic grids are merged, and the merged point cloud is smoothed to generate the target 3D contour point cloud.

[0029] Furthermore, the step of performing feature extraction processing on the three-dimensional point cloud model of the battery pack casing to determine whether there are suspected defective areas includes:

[0030] The three-dimensional point cloud model of the battery pack shell is divided into several detection sub-regions according to the preset structural features, and the local curvature change rate, normal vector deviation and point cloud density distribution gradient corresponding to the point cloud in each detection sub-region are calculated respectively.

[0031] The local curvature change rate, normal vector deviation, and point cloud density distribution gradient of each detection sub-region are compared with their corresponding preset standard thresholds.

[0032] When any parameter exceeds the corresponding threshold, the current detection sub-region is marked as the suspected defect region.

[0033] Furthermore, the step of dividing the three-dimensional point cloud model of the battery pack casing into several detection sub-regions according to preset structural features includes:

[0034] Identify preset structural feature points appearing in the three-dimensional point cloud model of the battery pack shell, and connect each of the structural feature points with spatial straight lines to form a reference framework for region division;

[0035] Based on the aforementioned benchmark framework, the 3D point cloud model of the battery pack is decomposed into several sub-models, and each sub-model is unique.

[0036] The surface region of each of the sub-models is set as the detection sub-region.

[0037] The second aspect of the present invention proposes:

[0038] A battery pack casing inspection system, wherein the system comprises:

[0039] The control module is used to obtain the spatial coordinate parameters of the battery pack shell through the vision positioning module, so as to determine the reference area for laser scanning, and control the laser to perform full-area scanning on the surface of the battery pack shell according to the preset path to generate the corresponding initial three-dimensional contour point cloud.

[0040] The optimization module is used to perform feature optimization processing on the initial three-dimensional contour point cloud based on preset rules to generate the corresponding target three-dimensional contour point cloud, and to create the corresponding battery pack shell three-dimensional point cloud model based on the target three-dimensional contour point cloud.

[0041] The extraction module is used to perform feature extraction processing on the three-dimensional point cloud model of the battery pack shell to determine whether there are any suspected defect areas.

[0042] The verification module is used to immediately perform secondary verification on the suspected defect area if a suspected defect area is detected, and to determine whether there is a defect on the surface of the battery pack casing based on the verification result.

[0043] Furthermore, the control module is specifically used for:

[0044] Based on the spatial coordinate parameters, the reference area is decomposed into a planar main area, an arc-shaped transition area, and a weld connection area, and the corresponding regional features inside the planar main area, the arc-shaped transition area, and the weld connection area are detected.

[0045] Based on the regional characteristics, corresponding scanning points are set, and the three-dimensional spatial coordinates corresponding to the scanning points are collected;

[0046] All three-dimensional spatial coordinates are written into the point cloud buffer according to the preset path sequence to form the initial three-dimensional contour point cloud.

[0047] Furthermore, the control module is specifically used for:

[0048] All the collected three-dimensional spatial coordinates are classified according to their region affiliation, and corresponding region identification information is added to each type of coordinate.

[0049] According to the region identification information, each of the three-dimensional spatial coordinates is written into the interior of the point cloud buffer. After writing is completed, the first boundary point sequence between the planar main area and the arc transition area and the second boundary point sequence between the arc transition area and the weld connection area are extracted from the point cloud buffer.

[0050] Calculate the spatial distance between the first boundary point sequence and the second boundary point sequence, and after determining that the spatial distance meets the preset requirements, generate the initial three-dimensional contour point cloud accordingly.

[0051] Furthermore, the optimization module is specifically used for:

[0052] A preset density threshold is calculated based on the sampling frequency of the laser scan, and all point cloud clusters in the initial three-dimensional contour point cloud are traversed. Isolated point cloud clusters with a density lower than the preset density threshold are removed to retain the target point cloud cluster.

[0053] The three-dimensional space containing the initial three-dimensional contour point cloud is divided into several cubic grids according to a preset side length, and the average coordinates of all point clouds are calculated in each cubic grid.

[0054] The initial 3D contour point cloud is optimized based on the mean coordinates and the target point cloud cluster to generate the target 3D contour point cloud.

[0055] Furthermore, the optimization module is specifically used for:

[0056] All point clouds in the target point cloud cluster are assigned to corresponding cubic grids to obtain an effective point cloud set within each cubic grid.

[0057] Calculate the Euclidean distance between each point in the effective point cloud set within each cubic grid and its corresponding mean coordinate, and retain point clouds with Euclidean distances less than a preset distance threshold and remove point clouds with Euclidean distances greater than or equal to the preset distance threshold to obtain a filtered point cloud set for each cubic grid.

[0058] The selected point cloud sets of all cubic grids are merged, and the merged point cloud is smoothed to generate the target 3D contour point cloud.

[0059] Furthermore, the extraction module is specifically used for:

[0060] The three-dimensional point cloud model of the battery pack shell is divided into several detection sub-regions according to the preset structural features, and the local curvature change rate, normal vector deviation and point cloud density distribution gradient corresponding to the point cloud in each detection sub-region are calculated respectively.

[0061] The local curvature change rate, normal vector deviation, and point cloud density distribution gradient of each detection sub-region are compared with their corresponding preset standard thresholds.

[0062] When any parameter exceeds the corresponding threshold, the current detection sub-region is marked as the suspected defect region.

[0063] Furthermore, the extraction module is specifically used for:

[0064] Identify preset structural feature points appearing in the three-dimensional point cloud model of the battery pack shell, and connect each of the structural feature points with spatial straight lines to form a reference framework for region division;

[0065] Based on the aforementioned benchmark framework, the 3D point cloud model of the battery pack is decomposed into several sub-models, and each sub-model is unique.

[0066] The surface region of each of the sub-models is set as the detection sub-region.

[0067] The third aspect of the present invention proposes:

[0068] A computer includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the battery pack casing detection method as described above.

[0069] The fourth aspect of the present invention proposes:

[0070] A readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the battery pack casing detection method as described above.

[0071] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0072] Figure 1This is a flowchart of the battery pack casing detection method provided in the first embodiment of the present invention;

[0073] Figure 2 This is a structural block diagram of the battery pack casing detection system provided in the third embodiment of the present invention.

[0074] The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0075] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0076] It should be noted that when a component is said to be "fixed to" another component, it can be directly on the other component or there may be an intervening component. When a component is said to be "connected to" another component, it can be directly connected to the other component or there may be an intervening component. The terms "vertical," "horizontal," "left," "right," and similar expressions used in this document are for illustrative purposes only.

[0077] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0078] Please see Figure 1 The image shows a battery pack casing inspection method provided in the first embodiment of the present invention. The battery pack casing inspection method provided in this embodiment can objectively and accurately determine whether there are defects on the surface of the battery pack casing, thereby improving the inspection efficiency.

[0079] Specifically, this embodiment provides:

[0080] A method for testing the casing of a battery pack specifically includes the following steps:

[0081] Step S10: Obtain the spatial coordinate parameters of the battery pack shell through the visual positioning module to determine the reference area for laser scanning, and control the laser to perform full-area scanning on the surface of the battery pack shell according to the preset path to generate the corresponding initial three-dimensional contour point cloud.

[0082] It's important to note that, firstly, a visual positioning module (such as an industrial camera + lens calibration system) acquires the spatial coordinate parameters of the battery pack casing (e.g., the 3D coordinates of the casing's vertices and corners). This determines the reference area for laser scanning. Specifically, determining the reference area ensures that the laser scan covers all critical parts of the casing, avoiding any missed areas. Subsequently, the laser (e.g., line laser, point laser) is controlled to scan the entire surface of the casing along a preset path (e.g., spiral, grid pattern). The obtained 3D coordinate data is integrated into an initial 3D contour point cloud, which serves as the raw data foundation for subsequent modeling and inspection, facilitating effective processing.

[0083] Step S20: Perform feature optimization processing on the initial three-dimensional contour point cloud based on preset rules to generate the corresponding target three-dimensional contour point cloud, and create the corresponding battery pack shell three-dimensional point cloud model based on the target three-dimensional contour point cloud.

[0084] It should be noted that the initial 3D contour point cloud is optimized based on preset rules (such as denoising, smoothing, and completion). Specifically, the initial point cloud may contain scanning noise (such as isolated points) and uneven data. After optimization, a more accurate target 3D contour point cloud is generated. Then, a 3D point cloud model consistent with the actual shell shape is created based on the target point cloud. The model can intuitively present the geometric structure of the shell, providing a digital carrier for defect detection, thus facilitating subsequent processing.

[0085] Step S30: Perform feature extraction processing on the three-dimensional point cloud model of the battery pack shell to determine whether there are any suspected defective areas.

[0086] It should be noted that feature extraction processing is performed on the 3D point cloud model. Specifically, key features such as the curvature, normal vector, and point cloud density of the shell surface are extracted. These features are used to determine whether there are suspected defect areas (such as protrusions, depressions, cracks, weld defects, etc.) to facilitate subsequent processing.

[0087] Step S40: If a suspected defect area is detected, the suspected defect area is immediately verified a second time, and the surface of the battery pack casing is determined to be defective based on the verification result.

[0088] It should be noted that if a suspected defect is identified, a secondary verification must be performed immediately (such as rescanning the area with increased scanning precision or comparing with visual images) to avoid misjudgment due to point cloud errors. Finally, the verification results are used to determine whether a defect actually exists on the outer shell surface, ensuring the accuracy of the detection results for subsequent processing.

[0089] Second Embodiment

[0090] Furthermore, the step of controlling the laser to perform a full-area scan on the surface of the battery pack casing according to a preset path to generate a corresponding initial three-dimensional contour point cloud includes:

[0091] Based on the spatial coordinate parameters, the reference area is decomposed into a planar main area, an arc-shaped transition area, and a weld connection area, and the corresponding regional features inside the planar main area, the arc-shaped transition area, and the weld connection area are detected.

[0092] Based on the regional characteristics, corresponding scanning points are set, and the three-dimensional spatial coordinates corresponding to the scanning points are collected;

[0093] All three-dimensional spatial coordinates are written into the point cloud buffer according to the preset path sequence to form the initial three-dimensional contour point cloud.

[0094] It should be noted that, firstly, based on the spatial coordinate parameters obtained from visual positioning, the reference area is divided into three core regions: the planar main body area (such as the flat areas of the front and back of the shell), the arc transition area (such as the arc connection parts of the shell's corners), and the weld connection area (such as the welds where the various components of the shell are joined). The geometric features of these different regions differ significantly (the planar area has a flat surface, the arc area has a fixed curvature, and the weld area has the risk of protrusions / depressions). Therefore, it is necessary to detect the internal features of each region accordingly. Specifically, for example, the flatness of the planar area, the radius of curvature of the arc area, and the width and height of the weld area. These regional features directly determine the logic for setting the subsequent scanning points.

[0095] Secondly, appropriate scanning points are set according to the regional characteristics: the planar main area does not require overly dense points and can be set at preset intervals (e.g., 5mm / point); the curved transition area requires denser points (e.g., 2mm / point) due to curvature changes to ensure accurate reproduction of the arc shape; the weld connection area is a high-defect area and requires the densest points (e.g., 1mm / point) to cover every detail of the weld. Subsequently, the three-dimensional spatial coordinates (X, Y, Z values) of each scanning point are collected by laser scanning. The coordinate data must accurately match the point position to ensure that it reflects the true geometric shape of the area.

[0096] Finally, following the preset path sequence (e.g., first the planar area, then the curved area, and finally the weld area to avoid scanner head collisions), all 3D spatial coordinates are written to the point cloud buffer. Specifically, the buffer is a temporary storage medium for coordinate data, ensuring that the data is stored in an orderly manner according to the scanning order and avoiding confusion. After all coordinates are written, the data in the buffer naturally forms a complete initial 3D contour point cloud. This point cloud has been differentially sampled according to regional features, laying the foundation for subsequent processing.

[0097] Furthermore, the step of writing all the three-dimensional spatial coordinates into the point cloud buffer according to the preset path sequence to form the initial three-dimensional contour point cloud includes:

[0098] All the collected three-dimensional spatial coordinates are classified according to their region affiliation, and corresponding region identification information is added to each type of coordinate.

[0099] According to the region identification information, each of the three-dimensional spatial coordinates is written into the interior of the point cloud buffer. After writing is completed, the first boundary point sequence between the planar main area and the arc transition area and the second boundary point sequence between the arc transition area and the weld connection area are extracted from the point cloud buffer.

[0100] Calculate the spatial distance between the first boundary point sequence and the second boundary point sequence, and after determining that the spatial distance meets the preset requirements, generate the initial three-dimensional contour point cloud accordingly.

[0101] It's important to note that, firstly, all collected 3D spatial coordinates are categorized according to "region affiliation." Specifically, based on the location of the scanned point—whether it belongs to the planar main area, the arc transition area, or the weld connection area—the coordinates are grouped into three data sets, and corresponding region identifiers are added to each category (e.g., "P" for planar areas, "A" for arc areas, and "W" for weld areas). Adding these identifiers aims to quickly distinguish point clouds from different regions during subsequent processing, avoiding modeling errors caused by region confusion.

[0102] Secondly, based on the region identification information, the coordinates of each type of 3D space are written into the designated partition of the point cloud buffer (e.g., the buffer is divided into P region, A region, and W region) to ensure that the coordinates of different regions are stored in an orderly manner. After writing, the first boundary point sequence of "planar main area and arc transition area" (e.g., the set of edge points of the planar area and the starting point of the arc area) and the second boundary point sequence of "arc transition area and weld connection area" (e.g., the set of edge points of the arc area and the starting point of the weld area) are extracted from the buffer. Specifically, the boundary point sequence directly reflects the connection state of different regions. If there are discontinuities or overlaps in the connection, it will cause the point cloud model to be distorted.

[0103] Finally, the spatial distance between the first and second boundary point sequences is calculated. Specifically, this distance verifies the rationality of the region connection. For example, the boundary point between the planar area and the arc-shaped area should maintain a preset spatial relationship with the boundary point between the arc-shaped area and the weld area (such as a continuous path along the shell contour). If the calculated spatial distance meets the preset requirements (such as a deviation of less than 0.1mm), it indicates that the connection between the regions is smooth and the coordinate data is complete. At this point, the initial 3D contour point cloud is generated. If it does not meet the requirements, the boundary areas need to be rescanned to ensure the continuity of the point cloud data for subsequent processing.

[0104] Furthermore, the step of performing feature optimization processing on the initial 3D contour point cloud based on preset rules to generate the corresponding target 3D contour point cloud includes:

[0105] A preset density threshold is calculated based on the sampling frequency of the laser scan, and all point cloud clusters in the initial three-dimensional contour point cloud are traversed. Isolated point cloud clusters with a density lower than the preset density threshold are removed to retain the target point cloud cluster.

[0106] The three-dimensional space containing the initial three-dimensional contour point cloud is divided into several cubic grids according to a preset side length, and the average coordinates of all point clouds are calculated in each cubic grid.

[0107] The initial 3D contour point cloud is optimized based on the mean coordinates and the target point cloud cluster to generate the target 3D contour point cloud.

[0108] It should be noted that, firstly, a preset density threshold is calculated based on the sampling frequency of the laser scan. Specifically, the sampling frequency determines the density of the normal point cloud (e.g., a sampling frequency of 1000Hz corresponds to 10 points per square millimeter), and the density threshold is usually set to 50% of the normal density (e.g., 5 points per square millimeter). Then, all point cloud clusters (sets of adjacent points) in the initial 3D contour point cloud are traversed, and isolated point cloud clusters with densities below the threshold are removed. These isolated points are mostly due to environmental interference (e.g., dust reflection) or equipment noise during laser scanning; removing them and retaining the target point cloud clusters reduces subsequent modeling errors.

[0109] Secondly, the 3D space containing the initial point cloud is divided into several cubic grids with a preset side length (e.g., 2mm). Specifically, rasterization can group discrete point clouds according to their spatial location, with each grid corresponding to a local spatial region. Within each cubic grid, the mean values ​​(X mean, Y mean, Z mean) of all point cloud coordinates are calculated. This mean value represents the "center position" of the point cloud within the grid, which can mitigate the error of individual points and achieve smoothing of the local point cloud.

[0110] Finally, the initial point cloud is optimized based on the coordinate mean and the target point cloud cluster: Using the target point cloud cluster as a base, the coordinate mean of each point cloud is compared with the mean of its corresponding grid cell, eliminating outliers that deviate too much from the mean (e.g., points exceeding ±0.2 mm of the mean). Simultaneously, areas with insufficient density (e.g., fewer than 3 point clouds within a grid cell) are filled in (based on interpolation of the mean of adjacent grid cells). Through this series of optimizations, the generated target 3D contour points not only have less noise but also accurately reproduce the geometry of the battery pack casing, providing high-quality data for subsequent modeling and processing.

[0111] Furthermore, the step of optimizing the initial 3D contour point cloud based on the coordinate mean and the target point cloud cluster to generate the target 3D contour point cloud includes:

[0112] All point clouds in the target point cloud cluster are assigned to corresponding cubic grids to obtain an effective point cloud set within each cubic grid.

[0113] Calculate the Euclidean distance between each point in the effective point cloud set within each cubic grid and its corresponding mean coordinate, and retain point clouds with Euclidean distances less than a preset distance threshold and remove point clouds with Euclidean distances greater than or equal to the preset distance threshold to obtain a filtered point cloud set for each cubic grid.

[0114] The selected point cloud sets of all cubic grids are merged, and the merged point cloud is smoothed to generate the target 3D contour point cloud.

[0115] It should be noted that, firstly, the retained target point cloud clusters are assigned to corresponding cubic grids according to their spatial location. Specifically, each point cloud is assigned to a grid containing its X, Y, and Z coordinates, forming a valid point cloud set within each grid. This step ensures that all target point clouds can correspond to specific local spatial regions, providing a basis for subsequent local optimization.

[0116] Secondly, the Euclidean distance between each point and the mean coordinate in the effective point cloud set within each cubic grid is calculated. Specifically, the Euclidean distance quantifies the deviation of a single point from the grid center (the greater the deviation, the greater the distance). A preset distance threshold is set (e.g., 0.15mm, determined according to the shell detection accuracy requirements). Point clouds with Euclidean distances less than the threshold (these points conform to the normal shape of the local space) are retained, while point clouds with distances greater than or equal to the threshold are removed (these points are mostly abnormal points due to scanning errors or local protrusions / depressions). This filtering step further removes abnormal data from the point cloud, ensuring that the point cloud within each grid conforms to the normal geometric characteristics of the shell.

[0117] Finally, the selected point clouds from all rasters are merged to form a preliminary optimized point cloud. Since there may be seams between the point clouds of different rasters (such as differences in point cloud density between adjacent rasters), the merged point cloud needs to undergo a smooth transition process. Specifically, the moving least squares method is used to interpolate the point clouds at the boundaries of adjacent rasters, ensuring a natural transition at the junctions and avoiding "step-like" discontinuities. After smoothing, the final target 3D contour point cloud is generated, whose accuracy and completeness fully meet the requirements of subsequent 3D modeling, facilitating subsequent processing.

[0118] Furthermore, the step of performing feature extraction processing on the three-dimensional point cloud model of the battery pack casing to determine whether there are suspected defective areas includes:

[0119] The three-dimensional point cloud model of the battery pack shell is divided into several detection sub-regions according to the preset structural features, and the local curvature change rate, normal vector deviation and point cloud density distribution gradient corresponding to the point cloud in each detection sub-region are calculated respectively.

[0120] The local curvature change rate, normal vector deviation, and point cloud density distribution gradient of each detection sub-region are compared with their corresponding preset standard thresholds.

[0121] When any parameter exceeds the corresponding threshold, the current detection sub-region is marked as the suspected defect region.

[0122] It should be noted that, firstly, based on the preset structural features of the battery pack casing (such as corners, welds, and boundaries of planar areas), the 3D point cloud model is divided into several detection sub-regions, such as "front planar area", "left arc transition area", and "top weld area". Each detection sub-region corresponds to an independent part of the casing, ensuring that the detection can cover all key areas of the casing and avoid missed detections.

[0123] Secondly, three core feature parameters are extracted and calculated for each detection sub-region: First, the local curvature change rate. Specifically, this is calculated by fitting the surface of the point cloud within the sub-region to determine the magnitude of curvature change (the curvature change rate in a normal planar area is close to 0; if a protrusion / depression occurs, the change rate will increase significantly). Second, the normal vector deviation. Specifically, this is calculated by determining the angle between the normal vector of each point within the sub-region and the "normal shell surface normal vector" (the angle in a normal area is close to 0; if the surface is uneven, the angle will exceed the threshold). Third, the point cloud density distribution gradient. Specifically, this is calculated by determining the rate of change of point cloud density within the sub-region (the density is uniform in a normal area, resulting in a small gradient; if cracks or defects exist, the density will drop sharply, resulting in a large gradient). These three parameters reflect the surface state of the sub-region from different dimensions, comprehensively covering common defect types (protrusions, depressions, cracks, and defects).

[0124] Finally, the three parameters of each detection sub-region are compared with the corresponding preset standard thresholds (determined based on the shell design drawings and detection accuracy requirements, such as a curvature change rate threshold of 0.05 mm, a normal vector deviation threshold of 5 degrees, and a density gradient threshold of 0.2 particles / cubic meter). If any parameter exceeds the corresponding threshold, it indicates that the surface condition of the sub-region does not meet the normal standard and is marked as a suspected defect area. Specifically, for example, if "the local curvature change rate of the top weld area exceeds the threshold," then the area is marked as a "suspected weld protrusion defect area," providing a clear target for subsequent secondary verification and facilitating subsequent processing.

[0125] Furthermore, the step of dividing the three-dimensional point cloud model of the battery pack casing into several detection sub-regions according to preset structural features includes:

[0126] Identify preset structural feature points appearing in the three-dimensional point cloud model of the battery pack shell, and connect each of the structural feature points with spatial straight lines to form a reference framework for region division;

[0127] Based on the aforementioned benchmark framework, the 3D point cloud model of the battery pack is decomposed into several sub-models, and each sub-model is unique.

[0128] The surface region of each of the sub-models is set as the detection sub-region.

[0129] It's important to note that, firstly, pre-defined structural feature points in the 3D point cloud model are identified. Specifically, these feature points are key identifiers of the shell structure, including the "four corner vertices of the shell," the "start and end points of the weld," the "start boundary point of the arc transition zone," and the "center point of the planar region," etc. Using edge detection algorithms on the point cloud model (such as edge extraction based on normal vector changes), the 3D coordinates of these feature points can be accurately located. Then, adjacent feature points are connected with spatial straight lines (such as connecting corner vertices to the start point of the arc transition zone), forming a baseline framework for region division. Specifically, this framework acts as the "boundary line" for detecting sub-regions, ensuring that region division is non-overlapping and comprehensive.

[0130] Secondly, based on the baseline framework, the 3D point cloud model of the battery pack casing is decomposed into several sub-models. Specifically, each sub-model corresponds to an independent structural part. For example, "the 'front planar area' within the baseline framework corresponds to the front sub-model," and "the 'left arc-shaped transition area' corresponds to the left arc-shaped sub-model." Each sub-model is unique (i.e., different sub-models have no overlapping areas, and all sub-models cover the entire casing). The decomposition of sub-models ensures that subsequent inspection can focus on specific structural parts, avoiding defect omissions due to excessively large areas.

[0131] Finally, the surface area of ​​each sub-model is directly set as the detection sub-region. Specifically, for example, the surface area of ​​the "front sub-model" is the "front plane detection sub-region," and the surface area of ​​the "left curved sub-model" is the "left curved detection sub-region." The range of each detection sub-region is completely consistent with the sub-model, which means it can cover all surfaces of the shell and correspond to the actual structure of the shell. This provides clear and reasonable detection units for subsequent special diagnosis extraction and defect detection, ensuring that the detection process is orderly and accurate, so as to facilitate effective subsequent processing.

[0132] Please see Figure 2 The third embodiment of the present invention provides:

[0133] A battery pack casing inspection system, wherein the system comprises:

[0134] The control module is used to obtain the spatial coordinate parameters of the battery pack shell through the vision positioning module, so as to determine the reference area for laser scanning, and control the laser to perform full-area scanning on the surface of the battery pack shell according to the preset path to generate the corresponding initial three-dimensional contour point cloud.

[0135] The optimization module is used to perform feature optimization processing on the initial three-dimensional contour point cloud based on preset rules to generate the corresponding target three-dimensional contour point cloud, and to create the corresponding battery pack shell three-dimensional point cloud model based on the target three-dimensional contour point cloud.

[0136] The extraction module is used to perform feature extraction processing on the three-dimensional point cloud model of the battery pack shell to determine whether there are any suspected defect areas.

[0137] The verification module is used to immediately perform secondary verification on the suspected defect area if a suspected defect area is detected, and to determine whether there is a defect on the surface of the battery pack casing based on the verification result.

[0138] Furthermore, the control module is specifically used for:

[0139] Based on the spatial coordinate parameters, the reference area is decomposed into a planar main area, an arc-shaped transition area, and a weld connection area, and the corresponding regional features inside the planar main area, the arc-shaped transition area, and the weld connection area are detected.

[0140] Based on the regional characteristics, corresponding scanning points are set, and the three-dimensional spatial coordinates corresponding to the scanning points are collected;

[0141] All three-dimensional spatial coordinates are written into the point cloud buffer according to the preset path sequence to form the initial three-dimensional contour point cloud.

[0142] Furthermore, the control module is specifically used for:

[0143] All the collected three-dimensional spatial coordinates are classified according to their region affiliation, and corresponding region identification information is added to each type of coordinate.

[0144] According to the region identification information, each of the three-dimensional spatial coordinates is written into the interior of the point cloud buffer. After writing is completed, the first boundary point sequence between the planar main area and the arc transition area and the second boundary point sequence between the arc transition area and the weld connection area are extracted from the point cloud buffer.

[0145] Calculate the spatial distance between the first boundary point sequence and the second boundary point sequence, and after determining that the spatial distance meets the preset requirements, generate the initial three-dimensional contour point cloud accordingly.

[0146] Furthermore, the optimization module is specifically used for:

[0147] A preset density threshold is calculated based on the sampling frequency of the laser scan, and all point cloud clusters in the initial three-dimensional contour point cloud are traversed. Isolated point cloud clusters with a density lower than the preset density threshold are removed to retain the target point cloud cluster.

[0148] The three-dimensional space containing the initial three-dimensional contour point cloud is divided into several cubic grids according to a preset side length, and the average coordinates of all point clouds are calculated in each cubic grid.

[0149] The initial 3D contour point cloud is optimized based on the mean coordinates and the target point cloud cluster to generate the target 3D contour point cloud.

[0150] Furthermore, the optimization module is specifically used for:

[0151] All point clouds in the target point cloud cluster are assigned to corresponding cubic grids to obtain an effective point cloud set within each cubic grid.

[0152] Calculate the Euclidean distance between each point in the effective point cloud set within each cubic grid and its corresponding mean coordinate, and retain point clouds with Euclidean distances less than a preset distance threshold and remove point clouds with Euclidean distances greater than or equal to the preset distance threshold to obtain a filtered point cloud set for each cubic grid.

[0153] The selected point cloud sets of all cubic grids are merged, and the merged point cloud is smoothed to generate the target 3D contour point cloud.

[0154] Furthermore, the extraction module is specifically used for:

[0155] The three-dimensional point cloud model of the battery pack shell is divided into several detection sub-regions according to the preset structural features, and the local curvature change rate, normal vector deviation and point cloud density distribution gradient corresponding to the point cloud in each detection sub-region are calculated respectively.

[0156] The local curvature change rate, normal vector deviation, and point cloud density distribution gradient of each detection sub-region are compared with their corresponding preset standard thresholds.

[0157] When any parameter exceeds the corresponding threshold, the current detection sub-region is marked as the suspected defect region.

[0158] Furthermore, the extraction module is specifically used for:

[0159] Identify preset structural feature points appearing in the three-dimensional point cloud model of the battery pack shell, and connect each of the structural feature points with spatial straight lines to form a reference framework for region division;

[0160] Based on the aforementioned benchmark framework, the 3D point cloud model of the battery pack is decomposed into several sub-models, and each sub-model is unique.

[0161] The surface region of each of the sub-models is set as the detection sub-region.

[0162] The fourth embodiment of the present invention provides a computer, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the battery pack casing detection method as described above.

[0163] The fifth embodiment of the present invention provides a readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the battery pack casing detection method as described above.

[0164] In summary, the battery pack casing detection method and system provided in the above embodiments of the present invention can objectively and accurately determine whether the surface of the battery pack casing has defects, thereby improving the detection efficiency.

[0165] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.

[0166] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-including system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0167] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0168] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0169] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0170] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

Claims

1. A battery pack case detection method characterized by, The method comprises: acquiring spatial coordinate parameters of the battery pack shell through a visual positioning module to determine a reference area for laser scanning and control the laser to perform global scanning on the surface of the battery pack shell according to a preset path to generate a corresponding initial three-dimensional contour point cloud; performing feature optimization processing on the initial three-dimensional contour point cloud based on a preset rule to generate a corresponding target three-dimensional contour point cloud and create a corresponding three-dimensional point cloud model of the battery pack shell according to the target three-dimensional contour point cloud; performing feature extraction processing on the three-dimensional point cloud model of the battery pack shell to determine whether there is a suspected defect area; if it is determined that there is a suspected defect area, immediately performing secondary verification on the suspected defect area and determining whether there is a defect on the surface of the battery pack shell according to the verification result; the step of controlling the laser to perform global scanning on the surface of the battery pack shell according to a preset path to generate a corresponding initial three-dimensional contour point cloud comprises: according to the spatial coordinate parameters, the reference area is correspondingly decomposed into a planar main area, an arc-shaped transition area and a weld joint area, and the region features existing in the planar main area, the arc-shaped transition area and the weld joint area are correspondingly detected; according to the region features, corresponding scanning points are set and three-dimensional spatial coordinates corresponding to the scanning points are collected; all the three-dimensional spatial coordinates are written into a point cloud buffer according to the sequence of the preset path to correspondingly form the initial three-dimensional contour point cloud; the step of writing all the three-dimensional spatial coordinates into the point cloud buffer according to the sequence of the preset path to correspondingly form the initial three-dimensional contour point cloud comprises: all the collected three-dimensional spatial coordinates are classified according to region attribution, and corresponding region identification information is added to each type of coordinates; each three-dimensional spatial coordinate is correspondingly written into the point cloud buffer according to the region identification information, and after the writing is completed, a first boundary point sequence between the planar main area and the arc-shaped transition area in the point cloud buffer and a second boundary point sequence between the arc-shaped transition area and the weld joint area are extracted; the spatial distance between the first boundary point sequence and the second boundary point sequence is calculated, and the initial three-dimensional contour point cloud is correspondingly generated after it is determined that the spatial distance meets a preset requirement; the step of performing feature optimization processing on the initial three-dimensional contour point cloud based on a preset rule to generate a corresponding target three-dimensional contour point cloud comprises: a preset density threshold is calculated according to the sampling frequency of laser scanning, all point cloud clusters in the initial three-dimensional contour point cloud are traversed, and isolated point cloud clusters with a density lower than the preset density threshold are removed to retain target point cloud clusters; the three-dimensional space where the initial three-dimensional contour point cloud is located is divided into a plurality of cubic grids according to a preset edge length, and the coordinate mean value of all point clouds in each cubic grid is calculated; the initial three-dimensional contour point cloud is optimized according to the coordinate mean value and the target point cloud cluster to generate the target three-dimensional contour point cloud.

2. The battery pack case detection method according to claim 1, characterized by, The step of optimizing the initial three-dimensional contour point cloud according to the coordinate mean value and the target point cloud cluster to generate the target three-dimensional contour point cloud comprises: allocating all point clouds in the target point cloud cluster to corresponding cubic grids respectively to obtain effective point cloud sets in each cubic grid; calculating the Euclidean distance between each point in the effective point cloud set in each cubic grid and the corresponding coordinate mean value, and retaining point clouds with a Euclidean distance less than a preset distance threshold and eliminating point clouds with a Euclidean distance greater than or equal to the preset distance threshold to obtain a screened point cloud set of each cubic grid; merging the screened point cloud sets of all cubic grids and performing smooth transition processing on the merged point cloud to correspondingly generate the target three-dimensional contour point cloud.

3. The battery pack case detection method according to claim 1, characterized by, The step of performing feature extraction processing on the battery pack shell three-dimensional point cloud model to determine whether there is a suspected defect area comprises: dividing the battery pack shell three-dimensional point cloud model into a plurality of detection sub-regions according to preset structural features, and calculating the local curvature change rate, normal vector deviation degree and point cloud density distribution gradient of the point cloud in each detection sub-region; comparing the local curvature change rate, normal vector deviation degree and point cloud density distribution gradient of each detection sub-region with the corresponding preset standard threshold; when any parameter exceeds the corresponding threshold, marking the current detection sub-region as the suspected defect area.

4. The battery pack case detection method according to claim 3, characterized by, The step of dividing the battery pack shell three-dimensional point cloud model into a plurality of detection sub-regions according to preset structural features comprises: identifying preset structural feature points in the battery pack shell three-dimensional point cloud model, and connecting each structural feature point through a spatial straight line to form a reference framework for region division; correspondingly disassembling the battery pack three-dimensional point cloud model into a plurality of sub-models according to the reference framework, each sub-model being unique; correspondingly setting the surface area of each sub-model as the detection sub-region.

5. A battery pack housing detection system, characterized by, The system for implementing the battery pack shell detection method according to any one of claims 1 to 4 comprises: a control module configured to obtain spatial coordinate parameters of a battery pack shell through a visual positioning module to determine a reference region for laser scanning, and control the laser to perform global scanning on the surface of the battery pack shell according to a preset path to generate a corresponding initial three-dimensional contour point cloud; an optimization module configured to perform feature optimization processing on the initial three-dimensional contour point cloud based on a preset rule to generate a corresponding target three-dimensional contour point cloud, and create a corresponding battery pack shell three-dimensional point cloud model according to the target three-dimensional contour point cloud; an extraction module configured to perform feature extraction processing on the battery pack shell three-dimensional point cloud model to determine whether there is a suspected defect area; a verification module configured to immediately perform secondary verification on the suspected defect area if it is determined that there is a suspected defect area, and determine whether there is a defect on the surface of the battery pack shell according to the verification result.

6. A computer comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the battery pack shell detection method according to any one of claims 1 to 4. The processor executes the computer program to implement the battery pack shell detection method according to any one of claims 1 to 4.

7. A readable storage medium, having stored thereon a computer program, characterized in that, The program, when executed by the processor, implements the battery pack case detection method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Workpiece spraying defect detection method and system based on machine vision and readable storage medium

    CN114998328A

  • Lithium battery weld defect detection method and system and storage medium

    CN116309576A