Battery detection method, electronic device and storage medium
By acquiring images of the battery scanned and imaged by multiple imaging devices, determining whether it is necessary to re-detection and determine the multi-position of the battery, the problem of unclear detection of the internal structure of the battery in the prior art is solved, and more accurate identification and positioning of internal defects of the battery is achieved.
Patent Information
- Application Number
- CN202411880837.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2044-12-19
AI Technical Summary
In the prior art, when X-ray imaging methods detect the internal structure of the battery, they cannot clearly and completely present the internal structure of the battery, making it difficult to accurately identify and locate defects inside the battery.
By acquiring images obtained by scanning and imaging the battery by the first imaging device and the second imaging device, determining whether re-detection is required based on these images, and a multi-position of the battery is determined, and a multi-type image is acquired to improve the accuracy of battery detection.
It realizes more accurate identification and positioning of tiny defects inside the battery, reduces missed and missed detection, and improves the overall effect of battery detection.
Smart Images

Figure CN119322076B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of new energy industry, and in particular to a battery detection method, electronic equipment and storage medium. Background Art
[0002] In the field of new energy industry technology, batteries shipped out of the factory may have some defects, such as damaged pole pieces, electrode short circuits, or bubbles, etc. In order to ensure the normal performance and safety of the battery, it is generally necessary to test the battery.
[0003] In the prior art, an X-ray imaging method is generally used to detect a battery located at a fixed position on an assembly line. The advantage of this method is that the battery can be detected without disassembling the battery.
[0004] However, using existing X-ray imaging methods, the position of the battery is fixed during the detection process, and the internal structure of the battery is often not clearly and completely presented. Summary of the invention
[0005] In response to the deficiencies in the prior art, the present application provides a battery detection method, an electronic device, and a storage medium, which determine whether the battery needs to be detected again based on a first image and a second image; when it is determined that the battery needs to be detected again, determine the second target posture of the battery based on the first image and the second image; obtain a third image obtained by scanning and imaging the battery in the second target posture with a first imaging device; obtain a fourth image obtained by scanning and imaging the battery in the second target posture with a second imaging device; detect defects in the battery based on the first image, the second image, the third image, and the fourth image, and can detect the battery in multiple postures and multiple types of images, thereby improving the battery detection method's ability to recognize tiny defects inside the battery, thereby more accurately identifying and locating defects inside the battery and reducing missed detections and false detections.
[0006] To solve the above problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present application provides a battery detection method, including: controlling an assembly line device to drive the battery to move so that the battery switches to a first target posture; obtaining a first image obtained by scanning and imaging the battery in the first target posture by a first imaging device; obtaining a second image obtained by scanning and imaging the battery in the first target posture by a second imaging device, the imaging principle of the second imaging device being different from that of the first imaging device; judging whether it is necessary to detect the battery again based on the first image and the second image; when it is judged that the battery needs to be detected again, determining the second target posture of the battery based on the first image and the second image; obtaining a third image obtained by scanning and imaging the battery in the second target posture by the first imaging device; obtaining a fourth image obtained by scanning and imaging the battery in the second target posture by the second imaging device; and detecting defects in the battery based on the first image, the second image, the third image, and the fourth image.
[0008] In some embodiments, the determining whether the battery needs to be inspected again based on the first image and the second image includes: when a first scanning section in which the first imaging device scans and images the battery and a second scanning section in which the second imaging device scans and images the battery are the same, fusing the first image and the second image to obtain a fifth image; identifying feature areas in the fifth image; when at least one feature area is identified, matching each feature area with a preset plurality of types of defect areas to detect target defect areas in the fifth image; when the areas of all the target defect areas are not greater than a preset area, and / or the spatial position of any one of the target defect areas is located at a preset key detection position, determining that the battery needs to be inspected again.
[0009] In some embodiments, the identifying of the feature area in the fifth image includes: obtaining a training image with a marked ROI area; extracting image features of the ROI area of the training image; homogenizing the image features of the ROI area to obtain homogenized image features; locating and extracting the ROI image through a sliding window based on the homogenized image features; rotating the ROI image to a horizontal orientation to obtain a horizontal ROI image; obtaining annotation information for the horizontal ROI image, and annotating the horizontal ROI image according to the annotation information to obtain an annotated horizontal ROI image; training a model to be trained based on the annotated horizontal ROI image to obtain a trained battery detection model; inputting the fifth image into the trained battery detection model for processing to obtain the feature area in the fifth image.
[0010] In some embodiments, when it is determined that the battery needs to be inspected again, the second target position of the battery is determined based on the first image and the second image, including: when it is determined that the battery needs to be inspected again, the second target position of the battery is determined to adjust the plane where the target defect area is located to be perpendicular to the scanning direction of any imaging device.
[0011] In some embodiments, detecting defects in the battery based on the first image, the second image, the third image, and the fourth image includes: determining a target detection method based on a first scanning section in which the first imaging device scans and images the battery and a second scanning section in which the second imaging device scans and images the battery, and using the target detection method to detect defects in the battery based on the first image, the second image, the third image, and the fourth image.
[0012] In some embodiments, when the first scanning section is different from the second scanning section, the first image is a plurality of images, the plurality of first images are images obtained by the first imaging device performing multiple scanning and imaging of the battery in the first target posture along a first direction, the second image is a plurality of images, the plurality of second images are images obtained by the second imaging device performing multiple scanning and imaging of the battery in the first target posture along a second direction, the second direction forms a first preset angle with the first direction, the third image is a plurality of images, the plurality of third images are images obtained by the first imaging device performing multiple scanning and imaging of the battery in the second target posture along the first direction, the fourth image is a plurality of images, the plurality of fourth images are images obtained by the second imaging device performing multiple scanning and imaging of the battery in the second target posture along the second direction, the first scanning section and the second scanning section of the battery scanned and imaged by the first imaging device are scanned and imaged by the second imaging device. A target detection method is determined by a second scanning section for scanning and imaging the battery, and the target detection method is used to detect defects in the battery based on the first image, the second image, the third image and the fourth image, including: when the first scanning section is the same as the second scanning section, the first image and the second image are merged to obtain a fifth image; the third image and the fourth image are merged to obtain a sixth image; characteristic areas in the fifth image and the sixth image are respectively identified; when at least one characteristic area is identified, each characteristic area is matched with a preset plurality of types of defect areas to detect defects in the battery; when the first scanning section is different from the second scanning section, a three-dimensional model of the battery is established based on all of the first image, the second image, the third image and the fourth image; and defect features in the three-dimensional model are identified to detect defects in the battery.
[0013] In some embodiments, the method also includes: acquiring a seventh image obtained by scanning and imaging the battery in the first target posture by a third imaging device and an eighth image obtained by scanning and imaging the battery in the second target posture, the imaging principle of the third imaging device being different from the imaging principles of the first imaging device and the second imaging device, and the third scanning section of the third imaging device being different from the first scanning section of the first imaging device and the second scanning section of the second imaging device; detecting defects in the battery based on the first image, the second image, the third image, and the fourth image, including: detecting whether the battery has defects based on the first image, the second image, the third image, the fourth image, the seventh image, and the eighth image; when a defect in the battery is detected, determining the position of the defect in three-dimensional space based on the first image, the second image, the third image, the fourth image, the seventh image, and the eighth image.
[0014] In some embodiments, the method further includes: acquiring three-dimensional point cloud data obtained by scanning and imaging the battery by a fourth imaging device, the fourth imaging device being a three-dimensional laser scanning device, and the imaging principle of the fourth imaging device being different from the imaging principles of the first imaging device and the second imaging device; detecting defects in the battery based on the first image, the second image, the third image, and the fourth image, including: calculating multiple pole parameters of the battery based on the first image, the second image, the third image, the fourth image, and the three-dimensional point cloud data, the multiple pole parameters including the flatness of the positive pole, the flatness of the negative pole, the height difference between the positive pole and the top cover, and the height difference between the negative pole and the top cover; when the value of any one of the pole parameters is not within the corresponding preset value interval, it is determined that there is a pole defect in the battery.
[0015] In a second aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0016] at least one processor; and,
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the battery detection method as described in the first aspect.
[0019] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the battery detection method as described in the first aspect.
[0020] The present application provides a battery detection method, an electronic device and a storage medium. The present application determines whether it is necessary to detect the battery again based on a first image and a second image; when it is determined that the battery needs to be detected again, determines a second target posture of the battery based on the first image and the second image; obtains a third image obtained by scanning and imaging the battery in the second target posture with a first imaging device; obtains a fourth image obtained by scanning and imaging the battery in the second target posture with a second imaging device; detects defects in the battery based on the first image, the second image, the third image and the fourth image, and can detect the battery in multiple postures and multiple types of images, thereby improving the battery detection method's ability to identify tiny defects inside the battery, thereby more accurately identifying and locating defects inside the battery and reducing missed detections and false detections. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 It is a flowchart of the first implementation of the battery detection method provided in the embodiment of the present application.
[0022] Figure 2 This is an application scenario diagram of the battery detection method provided in an embodiment of the present application.
[0023] Figure 3 yes Figure 1 Detailed flowchart of step S400.
[0024] Figure 4 yes Figure 1 A first detailed flow chart of step S800 in FIG.
[0025] Figure 5 yes Figure 1 A second detailed flow chart of step S800 in FIG.
[0026] Figure 6 It is a flow chart of the second implementation of the battery detection method provided in the embodiment of the present application.
[0027] Figure 7 It is a flowchart of a third implementation of the battery detection method provided in an embodiment of the present application.
[0028] Figure 8 yes Figure 7 Detailed flowchart of step S800 in FIG.
[0029] Fig. 9 It is a structural schematic diagram of a battery detection device provided in an embodiment of the present application.
[0030] Fig.10 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0031] Fig.11 It is a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0033] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0034] The present application provides a battery detection method, an electronic device, and a storage medium. The method determines whether the battery needs to be detected again based on a first image and a second image; when it is determined that the battery needs to be detected again, determines a second target posture of the battery based on the first image and the second image; obtains a third image obtained by scanning and imaging the battery in the second target posture with a first imaging device; obtains a fourth image obtained by scanning and imaging the battery in the second target posture with a second imaging device; detects defects in the battery based on the first image, the second image, the third image, and the fourth image, and can detect the battery in multiple postures and multiple types of images, thereby improving the battery detection method's ability to identify tiny defects inside the battery, thereby more accurately identifying and locating defects inside the battery and reducing missed detections and false detections.
[0035] The battery detection method provided by the present application will be described in detail below with reference to the accompanying drawings.
[0036] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a first implementation of a battery detection method provided in an embodiment of the present application. Figure 1 As shown, the battery detection method includes: step S100 to step S800.
[0037] Step S100: Control the assembly line device to drive the battery to move, so that the battery switches to the first target posture.
[0038] Optionally, the first target pose is an initial target pose of the battery.
[0039] The movement of the battery to the target posture refers to the movement of the battery to the target position coordinates in space, and the posture of the battery is the target posture.
[0040] See also Figure 2 , Figure 2 : is an application scenario diagram of the battery detection method provided in the embodiment of the present application. Figure 2 As shown, in some embodiments, the assembly line device 1 includes a first motion device 10 and a second motion device 20, the first motion device 10 is used to drive the battery 2 to perform linear motion, and the second motion device 20 is used to drive the battery 2 to rotate.
[0041] Optionally, the second motion device 20 is placed or installed on the first motion device 10 , and the second motion device 20 can move linearly with the first motion device 10 and can drive the battery 2 to rotate at the same time.
[0042] Optionally, the second motion device 20 can also be raised and lowered, and the second motion device 20 is also used to drive the battery 2 to rise and fall to a target height.
[0043] Optionally, the second motion device 20 includes a base and a fixing device mounted on the base, the fixing device being used to fix the battery 2. Further, the base of the second motion device 20 can rotate horizontally, and the fixed placement can rotate vertically, so as to adjust the battery 2 to any posture.
[0044] In some embodiments, the first motion device 10 is controlled to drive the battery 2 to perform linear motion to the target position coordinates, and the second motion device 20 is controlled to drive the battery 2 to rotate, so as to adjust the battery 2 to the target posture.
[0045] Step S200: acquiring a first image obtained by scanning and imaging a battery in a first target position by a first imaging device.
[0046] Optionally, the number of the first images is 1 or more.
[0047] like Figure 2 As shown, in some embodiments, a first image is obtained by scanning and imaging the battery 2 in the first target posture once by the first imaging device 3 along the first scanning direction L1.
[0048] Optionally, the first imaging device may be translated along a straight line, or the first moving device may be controlled to drive the battery to move in a straight line when the first imaging device scans the battery, so that the first imaging device scans and images the battery multiple times.
[0049] Optionally, there are multiple first images, and the multiple first images are images obtained by scanning and imaging the battery in the first target posture multiple times by the first imaging device along the first direction.
[0050] like Figure 2 As shown, in some embodiments, a plurality of first images are obtained by scanning and imaging the battery 2 in the first target posture multiple times along the first direction A1 by the first imaging device 3. The scanning direction of each time by the first imaging device 3 is parallel to the first scanning direction L1.
[0051] Step S300: acquiring a second image obtained by scanning and imaging the battery in the first target position by a second imaging device.
[0052] The imaging principle of the second imaging device is different from that of the first imaging device.
[0053] Exemplarily, the first imaging device is any one of a neutron imaging device, an ultrasonic imaging device and an X-ray imaging device, and the second imaging device is an imaging device among the neutron imaging device, the ultrasonic imaging device and the X-ray imaging device, which has an imaging principle different from that of the first imaging device.
[0054] Preferably, the first imaging device is a neutron imaging device, and the second imaging device is an ultrasonic imaging device. Because X-rays are particle streams generated by the transition of electrons in atoms between two energy levels with a large difference in energy, and electrons are charged, elements with high atomic numbers have more electrons and can absorb X-rays more effectively, so the mass attenuation coefficient of X-rays for heavy metals (such as lead) is large, and the mass attenuation coefficient for light elements (such as hydrogen, boron, and lithium) is small. At present, in the field of new energy industry technology, lithium batteries are commonly produced, and the X-ray imaging method often cannot clearly and completely display the internal structure of lithium batteries. Neutrons are not charged and interact directly with atomic nuclei. Unlike X-rays, the mass attenuation coefficient of neutrons for light elements (such as hydrogen, boron, lithium) and some rare earth elements is large, while the mass attenuation coefficient for most metal elements is small. Therefore, for lithium batteries, the contrast of neutron imaging images is often greater than that of X-ray images, and neutron imaging images can more clearly and completely display the internal structure of lithium batteries. In addition, ultrasonic imaging images can also better display the internal structure of lithium batteries.
[0055] Optionally, the number of the second images is 1 or more.
[0056] like Figure 2 As shown, in some embodiments, a second image is obtained by the second imaging device 4 performing one scanning imaging on the battery 2 in the first target posture along the second scanning direction L2.
[0057] Optionally, the second imaging device may be translated along a straight line, or the first motion device may be controlled to drive the battery to move in a straight line when the second imaging device scans the battery, so that the second imaging device scans the battery for multiple times.
[0058] Optionally, there are multiple second images, and the multiple second images are images obtained by scanning and imaging the battery in the first target posture multiple times by the second imaging device along the second direction.
[0059] like Figure 2 As shown, in some embodiments, a plurality of second images are obtained by scanning and imaging the battery 2 in the first target posture multiple times along the second direction A2 by the second imaging device 4. The direction of each scanning by the second imaging device 4 is parallel to the second scanning direction L2. The second direction A2 is at a first preset angle to the first direction A1.
[0060] Step S400: determining whether the battery needs to be inspected again based on the first image and the second image.
[0061] In some embodiments, the first scanning section of the battery scanned and imaged by the first imaging device is the same as the second scanning section of the battery scanned and imaged by the second imaging device. The scanning section refers to the section of the battery determined by the imaging device according to a predetermined scanning direction when scanning the battery. Furthermore, for each target position of the battery, the scanning sections of the battery scanned and imaged by the first imaging device and the second imaging device are the same, and the scanning directions are also the same, so the corresponding first image and second image of each target position have similar image features. In this case, please refer to Figure 3 , Figure 3 yes Figure 1 Detailed flow chart of step S400 in FIG. Figure 3 As shown, in some embodiments, step S400 includes steps S410 to S440.
[0062] Step S410: When a first scanning section in which the first imaging device scans and images the battery and a second scanning section in which the second imaging device scans and images the battery are the same, the first image and the second image are merged to obtain a fifth image.
[0063] In some embodiments, because the imaging principles of the first image and the second image are different, a feature-level fusion algorithm or a decision-level fusion algorithm is used to fuse the first image and the second image to obtain a fifth image. In this way, compared with the method of fusing the first image and the second image using a pixel-level fusion algorithm, the contrast of the fifth image can be improved, which facilitates the subsequent recognition of the fifth image.
[0064] In some embodiments, step S410 includes steps (410.1) to (410.3).
[0065] (410.1) Extract at least one image feature from the first image and the second image respectively to obtain a plurality of feature vectors.
[0066] Among them, image features are the most representative and discriminative features, which can be color features, texture features, color features, and shape features.
[0067] Optionally, multiple image feature vectors are obtained by using feature extraction algorithms such as scale-invariant feature transform, accelerated robust features, oriented gradient histograms, or binary robust independent basis features with directional rapid conversion and rotation.
[0068] (410.2) Fusion of multiple feature vectors based on preset rules.
[0069] In some implementations, multiple feature vectors are weighted and fused using the formula:
[0070] ,
[0071] in, is the fused feature vector, It is The feature vector of the source image, It is The weight of the source image, is the number of source images. For example, the first source image is the first image acquired by the first imaging device, the second source image is the second image acquired by the second imaging device, and so on.
[0072] Optionally, The weights of the source images can be predetermined by feeding the training data into the artificial intelligence model.
[0073] In some embodiments, multiple eigenvectors are combined into a data matrix, the eigenvalues and eigenvectors of the covariance matrix of the data matrix are calculated, the eigenvectors corresponding to the largest preset number of eigenvalues are selected to form a projection matrix, and then the projection matrix is left-multiplied by the data matrix to obtain a matrix of fused eigenvectors.
[0074] (410.3) The fused feature vector is transformed into a fifth image.
[0075] Optionally, each numerical value in the feature vector represents a pixel value of a pixel at a position, and all numerical values therein are arranged according to corresponding positions to obtain a fifth image.
[0076] Optionally, the fused feature vector is transformed into a fifth image based on a preset rule.
[0077] Step S420: identifying a feature region in the fifth image.
[0078] In some implementations, edge detection is performed on the fifth image to obtain a plurality of connected feature regions.
[0079] In some implementations, the fifth image is input into the battery detection model for processing to obtain the characteristic region in the fifth image. In this case, step S420 includes steps (420.1) to (420.8).
[0080] (420.1) Obtain a training image with a marked ROI region.
[0081] ROI (region of interest), region of interest. Various operators and functions are often used in machine vision software such as Halcon, OpenCV, and Matlab to obtain the ROI area and perform the next step of image processing.
[0082] Optionally, the ROI region is a feature region, for example, the ROI region is a region where the battery polarity is located, a pole piece corner region, or a region representing bubbles.
[0083] Optionally, the ROI region in the training image can be automatically marked by an image segmentation algorithm.
[0084] (420.2) Extract image features from the ROI region of the training image.
[0085] Among them, image features include statistical features and morphological features.
[0086] In some embodiments, the statistical characteristics of the ROI region are obtained by calculating the moment characteristics of the ROI region image, and the morphological characteristics of the ROI region are obtained by calculating the statistical data such as the grayscale histogram, image size, grayscale mean and grayscale standard deviation of the ROI region image.
[0087] (420.3) The image features of the ROI region are homogenized to obtain homogenized image features.
[0088] The image feature homogenization processing refers to storing the above image features in a preset database in the form of data-converted character strings.
[0089] (420.4) Based on the homogenized image features, the ROI image is located and extracted through a sliding window.
[0090] In some implementations, based on the coordinates of the ROI region marker, a sliding window is used to slide through the training image based on a preset step size, and the image within the marker frame is extracted to obtain the ROI image.
[0091] Specifically, during the target detection process, a template is set and the entire training image is traversed in the form of a sliding window. Each slide will generate an ROI image of the same size as the template. Based on the characteristics of the grayscale histogram and image moment, the similarity metric between the template and the current ROI image is calculated. After traversing the entire training image, an image will be formed, and the position coordinates of the pixel corresponding to the maximum value of the similarity metric value will be found, which is also the position coordinates of the target.
[0092] Through the above method, the ROI image can be accurately located and extracted based on the image features of the ROI area and the sliding window.
[0093] (420.5) Rotate the ROI image to a horizontal orientation to obtain a horizontal ROI image.
[0094] Since image acquisition and ROI annotation are not performed in a specific orientation, the orientation of the ROI image has a certain degree of randomness. In order to facilitate the processing of the image in subsequent steps and improve the efficiency and effect of image processing, the ROI image needs to be rotated to a uniform orientation. For example, the ROI image is rotated to a horizontal orientation based on the edge image of the ROI to obtain a horizontal ROI image.
[0095] In some embodiments, the ROI image is first subjected to frequency domain filtering to obtain a denoised ROI image, an edge image of the denoised ROI image is extracted using a CANNY edge extraction algorithm, edge points are extracted from the edge image, and then straight line fitting is performed on the edge points. The rotation angle of the ROI image is determined based on the result of the straight line fitting, and the ROI image is rotated based on the rotation angle to obtain a horizontal ROI image.
[0096] Optionally, a straight line fitting is performed on the edge points by a random iterative straight line fitting algorithm.
[0097] Optionally, after the straight line fitting equation is determined, the angle between the edge point straight line and the horizontal X-axis, ie, the rotation angle, can be determined according to the slope of the straight line fitting equation.
[0098] In some embodiments, after the rotation angle is determined, the ROI image is rotated based on the rotation angle so that the ROI image is aligned with the horizontal X-axis, that is, the line connecting the polarity pairs of the cathode and the anode in the image is aligned with the horizontal X-axis. The rotated image is the horizontal ROI image.
[0099] (420.6) Obtaining annotation information of the horizontal ROI image, and annotating the horizontal ROI image according to the annotation information to obtain an annotated horizontal ROI image.
[0100] Optionally, the labeling information may include polarity labeling information, corner point labeling information, and the like.
[0101] (420.7) The model to be trained is trained based on the labeled horizontal ROI image to obtain a trained battery detection model.
[0102] Optionally, the model to be trained includes at least one of a convolutional neural network CNN, a recurrent neural network RNN, and a residual network ResNet.
[0103] (420.8) The fifth image is input into the trained battery detection model for processing to obtain the feature area in the fifth image.
[0104] Optionally, the characteristic regions in the fifth image include characteristic regions representing battery cathodes, characteristic regions representing battery anodes, characteristic regions representing pole piece corners, characteristic regions representing bubbles, and the like.
[0105] Step S430: when at least one characteristic region is identified, each characteristic region is matched with a plurality of preset types of defect regions to detect a target defect region in the fifth image.
[0106] In some embodiments, features such as shape, color, texture, and size of each feature area are extracted and matched with corresponding features of each type of preset defect area. When the degree of match is greater than a preset degree, the feature area is determined as a target defect area representing a defect, and it is determined that a corresponding type of defect exists in the battery.
[0107] In some embodiments, step S430 includes step (430.1) to step (430.2).
[0108] (430.1) Describe the feature region and generate a feature vector.
[0109] In some embodiments, the Hessian matrix is calculated for each pixel in the feature area. If the value of the determinant of the Hessian matrix is a local maximum, the pixel is marked as a candidate feature point. The Taylor expansion of the candidate feature point is then calculated to determine the final feature point. The Haar wavelet response of all pixels in the neighborhood of each final feature point is calculated. The feature vector corresponding to the feature area is calculated based on the Haar wavelet response of all pixels in multiple sub-areas of preset sizes in the neighborhood of each final feature point.
[0110] (430.2) Calculate the distance between the feature point in each feature area and the feature point in each preset type of defect area, and match each feature area with the preset multiple types of defect areas according to the distance to detect the target defect area in the fifth image.
[0111] In some embodiments, the Euclidean distance between the feature points of the two images is calculated. The shorter the Euclidean distance, the better the matching degree of the two feature points. When the distance between a feature point in a feature area and a feature point in a defect area is less than a preset distance, it is determined that the feature area matches the defect area and the feature area is a target defect area.
[0112] In some embodiments, when the Hessian matrix trace of a feature point in a feature region has the same sign as that of a feature point in a defect region, it means that the two feature points have contrast changes in the same direction, and it is determined that the feature region matches the defect region, and the feature region is the target defect region, otherwise it does not match.
[0113] Step S440: When the areas of all target defect regions are not greater than a preset area, and / or the spatial position of any target defect region is located at a preset key detection position, it is determined that the battery needs to be tested again.
[0114] In some embodiments, the area of each target defect region is calculated. When the area of any target defect region is larger than a preset area, it is determined that the battery has obvious defects and no further inspection is required. Otherwise, the target defect region may be caused by image noise and there may be false detection. Therefore, it is necessary to determine the second target posture of the battery and then further inspect the battery.
[0115] In some embodiments, the first imaging device and the second imaging device are both fixed. At this time, the expression of the fifth image in the spatial coordinate system can be determined based on the spatial coordinates of the first target posture of the battery, the first scanning section of the first imaging device and the second scanning section of the second imaging device at this time, and then the spatial position of the target defect area is determined based on the two-dimensional coordinates of all pixels on the edge line of the target defect area in the fifth image and the expression of the fifth image in the spatial coordinate system. Each pixel in the target defect area has coordinates in three-dimensional space.
[0116] In some embodiments, when at least one characteristic region is located at a preset key detection position (e.g., a polarity region of a battery), regardless of whether the characteristic region is identified as a target defect region, it is determined that a second target position of the battery needs to be determined, and then the battery is further detected. The key detection position is an area where defects are prone to occur in the battery, and in this way, missed detection can be reduced.
[0117] In some embodiments, the first scanning section of the first imaging device is different from the second scanning section of the second imaging device. In this case, step S400 includes steps S450 to S470.
[0118] Step S450: identifying a first feature region in the first image.
[0119] The method for identifying the first characteristic region in the first image is described with reference to step S420 .
[0120] Step S460: Identify a second feature region in the second image.
[0121] The method for identifying the second feature region in the second image is described with reference to step S420 .
[0122] Step S470: When at least one first feature region or second feature region is identified, each feature region is matched with a plurality of preset types of defect regions to detect a target defect region in the image.
[0123] Step S460 refers to the description of step S430 .
[0124] Step S480: When the areas of all target defect regions are not greater than a preset area, and / or the spatial position of any target defect region is located at a preset key detection position, it is determined that the battery needs to be tested again.
[0125] Step S480 refers to the description of step S440 .
[0126] Step S500: When it is determined that the battery needs to be inspected again, a second target posture of the battery is determined based on the first image and the second image.
[0127] In some embodiments, when it is determined that the battery needs to be inspected again, a second target posture of the battery is determined to adjust the plane where the target defect area is located to be perpendicular to the scanning direction of any imaging device.
[0128] In some embodiments, when there are multiple target defect regions, a target posture of the battery is determined according to each target defect region, so that the plane where each target defect region is located is adjusted to be perpendicular to the scanning direction.
[0129] In some embodiments, the first motion device is controlled to drive the battery to move to the second target position according to the second target position of the battery, and the second motion device is controlled to drive the battery to rotate to the second target position, so that the battery is moved to the second target position.
[0130] Optionally, while adjusting the plane where the target defect area is located to be perpendicular to the scanning direction, the height of the battery is also adjusted by controlling the second motion device to rise or fall, so that the center point of the target defect area is aligned with the particle beam or ultrasonic beam of the imaging device. The center point of the target defect area is the average coordinate point of all pixel points in the defect area.
[0131] In some embodiments, after each battery moves to a target posture, an image obtained by scanning and imaging the battery at the target posture by the first imaging device and an image obtained by scanning and imaging the battery at the target posture by the second imaging device are obtained, and then it is determined whether the battery needs to be inspected again based on all images corresponding to the current target posture of the battery. When it is determined that the battery needs to be inspected again, the next target posture of the battery is determined based on all images corresponding to the current target posture of the battery, and the image obtained by scanning and imaging the battery at the next target posture by the first imaging device and the image obtained by scanning and imaging the battery at the next target posture by the second imaging device are obtained again, and then it is determined whether the battery needs to be inspected again based on all images corresponding to the next target posture of the battery, and so on, until it is determined that the battery does not need to be inspected again. In this way, the battery can be further inspected in multiple postures and multiple types of images based on the image of the previous target posture, and the recognition ability of the battery detection method for tiny defects inside the battery is further improved, so as to more accurately identify and locate defects inside the battery and reduce missed detection and false detection.
[0132] Step S600: Acquire a third image obtained by scanning and imaging the battery in the second target posture by the first imaging device.
[0133] The content of step S600 refers to the description of step S200 .
[0134] Step S700: Acquire a fourth image obtained by scanning and imaging the battery in the second target position by a second imaging device.
[0135] The content of step S700 refers to the description of step S300 .
[0136] Step S800: Detect defects in the battery based on the first image, the second image, the third image, and the fourth image.
[0137] In some embodiments, a target detection method is determined based on a first scanning section in which a first imaging device scans and images a battery and a second scanning section in which a second imaging device scans and images the battery, and the target detection method is used to detect defects in the battery based on the first image, the second image, the third image, and the fourth image.
[0138] In some embodiments, when the first scanning section is the same as the second scanning section, refer to Figure 4 , Figure 4 yes Figure 1 The first detailed flow chart of step S800 in FIG. Figure 4 As shown, in some embodiments, step S800 includes steps S810 to S840.
[0139] Step S810: Fusing the first image and the second image to obtain a fifth image.
[0140] The content of step S810 refers to the content of step S410.
[0141] Optionally, the fifth image has been obtained in step S410, and in this case, the fifth image obtained in step S410 is directly acquired in step S810.
[0142] Step S820: Fusing the third image with the fourth image to obtain a sixth image.
[0143] The content of step S820 refers to the content of step S410.
[0144] Step S830: identifying feature regions in the fifth image and the sixth image respectively.
[0145] The content of step S830 refers to the content of step S420.
[0146] Step S840: When at least one characteristic region is identified, each characteristic region is matched with a plurality of preset types of defect regions to detect defects in the battery.
[0147] The content of step S840 refers to the content of step S430.
[0148] In some embodiments, step S430 has matched the feature region in the fifth image with the preset multiple types of defect regions, so in step S840, only the feature region in the sixth image is matched with the preset multiple types of defect regions.
[0149] In some embodiments, the expression of the sixth image in the spatial coordinate system is determined based on the spatial coordinates of the second target posture of the battery, the first scanning section of the first imaging device at this time, and the second scanning section of the second imaging device, and then the spatial position of the target defect area in the sixth image is determined based on the two-dimensional coordinates of all pixels on the edge line of the target defect area in the sixth image and the expression of the sixth image in the spatial coordinate system. Each pixel in the target defect area has coordinates in three-dimensional space. When the degree of overlap between the spatial position of a target defect area in the fifth image and the spatial position of a target defect area in the sixth image is greater than a preset degree, the target defect area is determined as the final target defect area. In this way, false detection can be reduced.
[0150] In some embodiments, when the first scanning section is different from the second scanning section, the first image is multiple, and the multiple first images are images obtained by the first imaging device scanning and imaging the battery in the first target posture multiple times along the first direction. The second image is multiple, and the multiple second images are images obtained by the second imaging device scanning and imaging the battery in the first target posture multiple times along the second direction. The second direction is at a first preset angle to the first direction. Figure 2 As shown, the second direction A2 forms a first preset angle with the first direction A1. The third image is multiple, and the multiple third images are images obtained by the first imaging device scanning and imaging the battery in the second target posture multiple times along the first direction. The fourth image is multiple, and the multiple fourth images are images obtained by the second imaging device scanning and imaging the battery in the second target posture multiple times along the second direction. At this time, please refer to Figure 5 , Figure 5 yes Figure 1 A second detailed flow chart of step S800 in FIG. Figure 5 As shown, in some embodiments, step S800 includes steps S850 to S860.
[0151] Step S850: establishing a three-dimensional model of the battery based on all the first images, the second images, the third images and the fourth images.
[0152] Among them, the three-dimensional model of the battery is a three-dimensional point cloud model.
[0153] In some embodiments, step S850 includes step (850.1) to step (850.2).
[0154] (850.1) Use a feature point detection algorithm to find significant feature points in each image corresponding to the target pose of each battery, and use a feature matching algorithm to match feature points between different images.
[0155] Optionally, feature point detection algorithms include SIFT (Scale-Invariant Feature Transform), SURF (Speeded Up Robust Features), MSER (Maximally Stable Extremal Regions), etc. Feature matching algorithms include Cross-Check (bidirectional matching verification), FLANN (Fast Library for Approximate Nearest Neighbors), and LSH (Locality-Sensitive Hashing).
[0156] (850.2) A three-dimensional model of the battery is established based on the matched feature point pairs, each target pose of the battery, and the scanned cross section of the imaging device.
[0157] In some embodiments, step (850.2) includes steps (850.2.1) to step (850.2.2).
[0158] (850.2.1) Determine the spatial coordinates of each feature point based on the spatial coordinates of each target posture of the battery, the first scanning section of the first imaging device and the second scanning section of the second imaging device corresponding to the position.
[0159] In some embodiments, the expression of each first image, second image, third image and fourth image in the spatial coordinate system can be determined based on the spatial coordinates of each target posture of the battery, the first scanning section of the first imaging device and the second scanning section of the second imaging device corresponding to the battery, and then the three-dimensional spatial coordinates of each feature point in the image and the expression of the image where each feature point is located in the spatial coordinate system can be determined. Similarly, the three-dimensional spatial coordinates of each pixel in the image can be determined.
[0160] (850.2.2) A three-dimensional model of the battery is established based on all matched feature point pairs and the three-dimensional spatial coordinates of each feature point.
[0161] In some implementations, the average coordinates of the three-dimensional space coordinates of two feature points in each matched feature point pair are taken as the coordinates of a feature point in the three-dimensional model, thereby obtaining the coordinates of multiple feature points in the three-dimensional model.
[0162] Furthermore, the spatial coordinates of other pixel points are calibrated according to the two-dimensional coordinates of each feature point in each image and the spatial coordinates of other pixel points in the image, and then the coordinates of multiple points other than the feature points in the three-dimensional model are obtained to obtain the three-dimensional model of the battery.
[0163] In some embodiments, the average pixel value of the corresponding points of each point in the three-dimensional model of the battery in multiple images is calculated and used as the pixel value of the point in the three-dimensional model.
[0164] Step S860: Identify defect features in the three-dimensional model to detect defects in the battery.
[0165] In some embodiments, the three-dimensional model is compared with a preset standard model to identify defect features in the three-dimensional model.
[0166] Optionally, a cross-sectional analysis method is used to cut the three-dimensional model and the preset standard model in one of the preset multiple planes each time, and compare the cross-sectional image of the three-dimensional model with the cross-sectional image of the standard model to identify defect features in the three-dimensional model.
[0167] Optionally, a characteristic space region is identified based on the coordinates and pixel values of all points in the three-dimensional model, and then a matching degree between the characteristic space region and each of multiple types of preset defect space regions is calculated; when the matching degree is greater than a preset matching degree, it is determined that the characteristic space region represents a defect of the corresponding type in the battery.
[0168] Optionally, the three-dimensional model and a preset standard model are input into a pre-trained artificial intelligence model, and the defect features in the three-dimensional model are identified by the artificial intelligence model.
[0169] Compared with the method of only recognizing images, the method of identifying defects in batteries based on the three-dimensional model of batteries can more comprehensively and accurately identify and locate defects inside the battery, further reducing missed detections and false detections.
[0170] See also Figure 6 , Figure 6 FIG. 1 is a flow chart of a second embodiment of the battery detection method provided in the embodiment of the present application. Figure 6 As shown, the battery detection method includes: step S100 to step S900.
[0171] Step S900: acquiring a seventh image obtained by scanning and imaging the battery in the first target position by a third imaging device, and an eighth image obtained by scanning and imaging the battery in the second target position by a third imaging device.
[0172] The imaging principle of the third imaging device is different from the imaging principles of the first imaging device and the second imaging device, and the third scanning section of the third imaging device is different from the first scanning section and the second scanning section. By using multiple imaging devices with different imaging principles to detect batteries, the advantages of multiple imaging methods can be combined to comprehensively and accurately detect defects in batteries.
[0173] Exemplarily, the first imaging device is any one of a neutron imaging device, an ultrasonic imaging device, and an X-ray imaging device, the second imaging device is one of the neutron imaging device, the ultrasonic imaging device, and the X-ray imaging device whose imaging principle is different from that of the first imaging device, and the third imaging device is one of the neutron imaging device, the ultrasonic imaging device, and the X-ray imaging device whose imaging principle is different from that of both the first imaging device and the second imaging device.
[0174] Optionally, the scanning cross section of the third imaging device is different from the scanning cross sections of the first imaging device and the second imaging device. In this way, the battery can be scanned from multiple viewing angles, further improving the battery detection method's ability to identify tiny defects inside the battery, thereby more accurately identifying and locating defects inside the battery, and reducing missed detection and false detection. At this time, step S800 includes steps S801 to S802.
[0175] Step S801: Detect whether the battery has defects based on the first image, the second image, the third image, the fourth image, the seventh image and the eighth image.
[0176] In some embodiments, the number of seventh images is multiple, and the multiple seventh images are images obtained by the third imaging device scanning and imaging the battery in the first target posture multiple times along the third direction. The number of eighth images is multiple, and the multiple eighth images are images obtained by the third imaging device scanning and imaging the battery in the second target posture multiple times along the third direction. Optionally, the third direction is at a second preset angle to the first direction. Optionally, at this time, step S801 includes: establishing a three-dimensional model of the battery based on all the first images, the second images, the third images, the fourth images, the seventh images, and the eighth images, and identifying defect features in the three-dimensional model to detect defects in the battery. The method refers to the description of steps S850 to S860.
[0177] In some other implementations, step S801 includes step (801.1) to step (801.3).
[0178] (801.1) Based on the spatial coordinates of each target posture of the battery, the scanning cross-section of the first imaging device, the scanning cross-section of the second imaging device and the scanning cross-section of the third imaging device at this time, the expression of each first image, second image, third image, fourth image, seventh image and eighth image in the spatial coordinate system is determined respectively.
[0179] (801.2) Identify a feature region in each of the first image, the second image, the third image, the fourth image, the seventh image, and the eighth image.
[0180] The method of step (801.2) refers to the content of step S420.
[0181] (801.3) When at least one feature region is identified, each feature region is matched with a plurality of preset types of defect regions to detect a target defect region in the image.
[0182] When a target defect area is detected, it is determined that a corresponding type of defect exists in the battery.
[0183] The method of step (801.3) refers to the content of step S430.
[0184] Step S802: When a defect in the battery is detected, a position of the defect in three-dimensional space is determined based on the first image, the second image, the third image, the fourth image, the seventh image, and the eighth image.
[0185] In some embodiments, the position of the defect in the three-dimensional space is determined according to the coordinates of all points in the defect feature space region in the three-dimensional model.
[0186] In other embodiments, the three-dimensional spatial coordinates of all the pixels in the target defect area of each image are determined based on the two-dimensional coordinates of all the pixels in the target defect area and the expression of the image in the spatial coordinate system, and then all the points in the space belonging to the target defect area are clustered to obtain the spatial position of the target defect area. In this case, points with similar distances are clustered into a target defect area according to the clustering rule, and the average coordinate point of all the points in a target defect area is used as the center point of the target defect area to obtain the spatial position of the center point of the target defect area.
[0187] Furthermore, the volume of a target defect area is calculated according to the coordinates of all points belonging to the target defect area in the three-dimensional space.
[0188] See also Figure 7 , Figure 7 FIG. 1 is a flow chart of a third implementation of the battery detection method provided in the embodiment of the present application. Figure 7 As shown, the battery detection method includes: step S100 to step S901.
[0189] Step S901: Acquire three-dimensional point cloud data obtained by scanning and imaging the battery by a fourth imaging device.
[0190] The fourth imaging device is a three-dimensional laser scanning device, and the imaging principle of the fourth imaging device is different from the imaging principles of the first imaging device and the second imaging device.
[0191] At this time, see Figure 8 , Figure 8 yes Figure 7 Detailed flow chart of step S800 in FIG. Figure 8 As shown, step S800 includes steps S880 to S890.
[0192] Step S880: Calculate multiple pole parameters of the battery based on the first image, the second image, the third image, the fourth image and the three-dimensional point cloud data.
[0193] The plurality of pole parameters include the flatness of the positive pole, the flatness of the negative pole, the height difference between the positive pole and the top cover, and the height difference between the negative pole and the top cover.
[0194] In some embodiments, step S880 includes step (880.1) to step (880.3).
[0195] (880.1) Identify polar regions in the first image, the second image, the third image, and the fourth image, respectively.
[0196] The method of identifying the feature region in the image is described above.
[0197] (880.2) Calculate the pole parameters for the identified pole area.
[0198] In some implementations, polar parameters such as the area, perimeter, and center point coordinates of the polar region are calculated.
[0199] (880.3) Align the three-dimensional point cloud data with the first image and the second image, update the previously calculated pole parameters, and further determine the flatness of the positive pole, the flatness of the negative pole, the height difference between the positive pole and the top cover, and the height difference between the negative pole and the top cover.
[0200] Step S890: When the value of any pole parameter is not within the corresponding preset value interval, it is determined that there is a pole defect in the battery.
[0201] In summary, the battery detection method provided in the embodiment of the present application has the following advantages:
[0202] 1. Determine whether the battery needs to be inspected again based on the first image and the second image; when it is determined that the battery needs to be inspected again, determine the second target posture of the battery based on the first image and the second image; obtain a third image obtained by scanning and imaging the battery in the second target posture by the first imaging device; obtain a fourth image obtained by scanning and imaging the battery in the second target posture by the second imaging device; detect defects in the battery based on the first image, the second image, the third image and the fourth image, and be able to detect the battery in multiple postures and multiple types of images, thereby improving the battery detection method's ability to recognize tiny defects inside the battery, thereby more accurately identifying and locating defects inside the battery and reducing missed detections and false detections.
[0203] 2. By judging whether it is necessary to control the assembly line device to drive the battery to the next target posture and inspect the battery again based on the image of the previous target posture, the battery can be further inspected in multiple postures and multiple types of images, further improving the battery inspection method's ability to identify tiny defects inside the battery, thereby more accurately identifying and locating defects inside the battery and reducing missed detections and false detections.
[0204] 3. The method of identifying defects in the battery based on the three-dimensional model of the battery can more comprehensively and accurately identify and locate defects inside the battery, further reducing missed detections and false detections, compared with the method of only identifying images.
[0205] 4. By using multiple imaging devices with different imaging principles to detect batteries, the advantages of multiple imaging methods can be combined to comprehensively and accurately detect defects in batteries.
[0206] See also Fig. 9 , Fig. 9 Schematic diagram of the structure of the battery detection device provided in the embodiment of the present application. Fig. 9 As shown, the battery detection device 300 includes a control module 310 , an acquisition module 320 and a processing module 330 .
[0207] In some implementations, the control module 310 is used to control the assembly line device to drive the battery to move so that the battery switches to the first target posture.
[0208] In some embodiments, the acquisition module 320 is used to acquire a first image obtained by scanning and imaging a battery in a first target position by a first imaging device; acquire a second image obtained by scanning and imaging the battery in the first target position by a second imaging device, the imaging principle of the second imaging device being different from that of the first imaging device; when it is determined that the battery needs to be inspected again, determine the second target position of the battery based on the first image and the second image; acquire a third image obtained by scanning and imaging the battery in the second target position by the first imaging device; and acquire a fourth image obtained by scanning and imaging the battery in the second target position by the second imaging device.
[0209] In some embodiments, the processing module 330 is used to determine whether the battery needs to be inspected again based on the first image and the second image; and detect defects in the battery based on the first image, the second image, the third image, and the fourth image.
[0210] See also Fig.10 , Fig.10 Schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.10 As shown, the electronic device 400 includes: one or more processors 410 and a memory 420, Fig.10 A processor 410 is taken as an example.
[0211] In some implementations, the processor 410 and the memory 420 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.
[0212] In some embodiments, the processor 410 is used to control the assembly line device to drive the battery to move so that the battery switches to a first target position; obtain a first image obtained by scanning and imaging the battery in the first target position by a first imaging device; obtain a second image obtained by scanning and imaging the battery in the first target position by a second imaging device, and the imaging principle of the second imaging device is different from that of the first imaging device; based on the first image and the second image, it is determined whether the battery needs to be inspected again; when it is determined that the battery needs to be inspected again, the second target position of the battery is determined based on the first image and the second image; obtain a third image obtained by scanning and imaging the battery in the second target position by the first imaging device; obtain a fourth image obtained by scanning and imaging the battery in the second target position by the second imaging device; and detect defects in the battery based on the first image, the second image, the third image, and the fourth image.
[0213] In some embodiments, the memory 420 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program instructions / modules of the battery detection method in the embodiment of the present application. The processor 410 executes various functional applications and data processing of the electronic device 400 by running the non-volatile software programs, instructions and modules stored in the memory 420, that is, the battery detection method of the above method embodiment is implemented.
[0214] In some embodiments, the memory 420 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device 400, etc. In addition, the memory 420 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 420 may optionally include a memory remotely arranged relative to the processor 410, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0215] In some embodiments, one or more modules are stored in the memory 420, and when executed by one or more processors 410, the battery detection method in any of the above method embodiments is executed, for example, the battery detection method described above is executed. Figure 1 The method comprises steps S100 to S800.
[0216] Please refer to Fig.11 , Fig.11The computer-readable storage medium 500 stores a program code 510, which can be called by a processor to execute the battery detection method described in the above method embodiment.
[0217] The computer-readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium includes a non-transitory computer-readable storage medium. The computer-readable storage medium 500 has a storage space for program codes for executing any method steps in the above-mentioned battery detection method. These program codes can be read from or written to one or more computer program products. The program code can be compressed, for example, in an appropriate form.
[0218] In some implementations, the present application also provides a computer program product, including a computer program, which implements the above-mentioned battery detection method when executed by a processor.
[0219] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium 500. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to a memory, a database or other medium used in the embodiments provided in the present application can include at least one of a non-volatile and a volatile memory. Non-volatile memory can include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical memory, a high-density embedded non-volatile memory, a resistive random access memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, etc. Volatile memory can include a random access memory (RAM) or an external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0220] In summary, the present application provides a battery detection method, an electronic device and a storage medium, the battery detection method comprising: controlling an assembly line device to drive the battery to move so that the battery switches to a first target position; obtaining a first image obtained by scanning and imaging the battery in the first target position by a first imaging device; obtaining a second image obtained by scanning and imaging the battery in the first target position by a second imaging device, the imaging principle of the second imaging device being different from that of the first imaging device; judging whether it is necessary to detect the battery again based on the first image and the second image; when it is judged that the battery needs to be detected again, determining the second target position of the battery based on the first image and the second image; obtaining a third image obtained by scanning and imaging the battery in the second target position by the first imaging device; obtaining a fourth image obtained by scanning and imaging the battery in the second target position by the second imaging device; detecting defects in the battery based on the first image, the second image, the third image and the fourth image. The present application determines whether it is necessary to inspect the battery again based on the first image and the second image; when it is determined that the battery needs to be inspected again, determines the second target posture of the battery based on the first image and the second image; obtains a third image obtained by scanning and imaging the battery in the second target posture with the first imaging device; obtains a fourth image obtained by scanning and imaging the battery in the second target posture with the second imaging device; detects defects in the battery based on the first image, the second image, the third image and the fourth image, and can detect the battery in multiple postures and multiple types of images, thereby improving the battery detection method's ability to identify tiny defects inside the battery, thereby more accurately identifying and locating defects inside the battery and reducing missed detections and false detections.
[0221] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A battery detection method, characterized in that: include: Controlling the assembly line device to drive the battery to move, so that the battery switches to a first target posture, wherein the assembly line device includes a first motion device and a second motion device, the first motion device is used to drive the battery to move linearly, the second motion device is used to drive the battery to rotate, the second motion device can also be raised and lowered, and the second motion device is also used to drive the battery to rise and fall to a target height, controlling the first motion device to drive the battery to move linearly to a target position coordinate, and controlling the second motion device to drive the battery to rotate, so as to adjust the battery to the target posture; Acquire a first image obtained by scanning and imaging a battery in a first target position by a first imaging device; Acquire a second image obtained by scanning and imaging the battery in the first target posture by a second imaging device, wherein the imaging principle of the second imaging device is different from that of the first imaging device; Determining whether the battery needs to be inspected again based on the first image and the second image; When it is determined that the battery needs to be inspected again, determining a second target posture of the battery based on the first image and the second image; When it is determined that the battery needs to be inspected again, determining a second target posture of the battery based on the first image and the second image includes: When it is determined that the battery needs to be inspected again, a second target posture of the battery is determined to adjust the plane where the target defect area is located to be perpendicular to the scanning direction of any imaging device, wherein, while adjusting the plane where the target defect area is located to be perpendicular to the scanning direction, the height of the battery is adjusted by controlling the second motion device to rise or fall, so that the center point of the target defect area is aligned with the particle beam or ultrasonic beam of the imaging device; Acquire a third image obtained by scanning and imaging the battery in the second target posture by the first imaging device; Acquire a fourth image obtained by scanning and imaging the battery in the second target posture by the second imaging device; Determine a target detection mode according to a first scanning section of the battery scanned and imaged by the first imaging device and a second scanning section of the battery scanned and imaged by the second imaging device, and detect defects in the battery based on the first image, the second image, the third image, and the fourth image using the target detection mode; When the first scanning section is different from the second scanning section, there are multiple first images, which are images obtained by the first imaging device scanning and imaging the battery in the first target posture multiple times along the first direction, there are multiple second images, which are images obtained by the second imaging device scanning and imaging the battery in the first target posture multiple times along the second direction, the second direction forms a first preset angle with the first direction, there are multiple third images, which are images obtained by the first imaging device scanning and imaging the battery in the second target posture multiple times along the first direction, there are multiple fourth images, which are images obtained by the second imaging device scanning and imaging the battery in the second target posture multiple times along the second direction, a feature point detection algorithm is used to find significant feature points in each image corresponding to the target posture of each battery, and a feature matching algorithm is used to match feature points between different images; Establishing a three-dimensional model of the battery based on the matched feature point pairs, each target pose of the battery, and a scanned section of the imaging device; identifying defect features in the three-dimensional model to detect defects in the battery; The identifying defect features in the three-dimensional model to detect defects in the battery includes: Cutting the three-dimensional model and a preset standard model at one of a plurality of preset planes each time, and comparing a cross-sectional image of the three-dimensional model with a cross-sectional image of the standard model to identify defect features in the three-dimensional model; Identifying a feature space region according to the coordinates and pixel values of all points in the three-dimensional model, and then calculating a matching degree between the feature space region and each of a plurality of preset types of defect space regions, and determining that the feature space region represents a defect of a corresponding type in the battery when the matching degree is greater than a preset matching degree; When the first scanning section is the same as the second scanning section, fusing the first image with the second image to obtain a fifth image; extracting at least one image feature from the first image and the second image respectively to obtain a plurality of feature vectors; Performing weighted fusion on the multiple feature vectors to obtain a fused feature vector; transforming the fused feature vector into a fifth image; fusing the third image with the fourth image to obtain a sixth image; Respectively identifying feature areas in the fifth image and the sixth image; When at least one of the characteristic regions is identified, each of the characteristic regions is matched with a plurality of preset types of defect regions to detect defects in the battery.
2. The battery detection method according to claim 1, characterized in that: The determining whether the battery needs to be tested again based on the first image and the second image includes: identifying a feature region in the fifth image; When at least one of the characteristic regions is identified, each of the characteristic regions is matched with a plurality of preset types of defect regions to detect a target defect region in the fifth image; When the areas of all the target defect regions are not greater than a preset area, and / or the spatial position of any one of the target defect regions is located at a preset key detection position, it is determined that the battery needs to be detected again.
3. The battery detection method according to claim 2, characterized in that: The identifying the feature area in the fifth image includes: Obtain training images with marked ROI areas; Extracting image features from the ROI region of the training image; Performing homogenization processing on the image features of the ROI region to obtain homogenized image features; Based on the homogenized image features, the ROI image is located and extracted through a sliding window; Rotating the ROI image to a horizontal orientation to obtain a horizontal ROI image; Acquiring annotation information of the horizontal ROI image, and annotating the horizontal ROI image according to the annotation information to obtain an annotated horizontal ROI image; Training the model to be trained based on the labeled horizontal ROI image to obtain a trained battery detection model; The fifth image is input into the trained battery detection model for processing to obtain a feature area in the fifth image.
4. The battery detection method according to claim 1, characterized in that: The method further comprises: Acquire a seventh image obtained by scanning and imaging the battery in the first target posture by a third imaging device and an eighth image obtained by scanning and imaging the battery in the second target posture, wherein the imaging principle of the third imaging device is different from the imaging principles of the first imaging device and the second imaging device, and the third scanning section of the third imaging device is different from the first scanning section of the first imaging device and the second scanning section of the second imaging device; The detecting defects in the battery based on the first image, the second image, the third image, and the fourth image comprises: detecting whether the battery has defects based on the first image, the second image, the third image, the fourth image, the seventh image, and the eighth image; When a defect in the battery is detected, a position of the defect in a three-dimensional space is determined based on the first image, the second image, the third image, the fourth image, the seventh image, and the eighth image.
5. The battery detection method according to claim 1, characterized in that: The method further comprises: Acquire three-dimensional point cloud data obtained by scanning and imaging the battery by a fourth imaging device, wherein the fourth imaging device is a three-dimensional laser scanning device, and the imaging principle of the fourth imaging device is different from the imaging principles of the first imaging device and the second imaging device; The detecting defects in the battery based on the first image, the second image, the third image, and the fourth image comprises: Calculating a plurality of pole parameters of the battery based on the first image, the second image, the third image, the fourth image and the three-dimensional point cloud data, the plurality of pole parameters including the flatness of the positive pole, the flatness of the negative pole, the height difference between the positive pole and the top cover, and the height difference between the negative pole and the top cover; When the value of any one of the pole parameters is not within the corresponding preset value interval, it is determined that there is a pole defect in the battery.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the battery detection method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an executable program, and the executable program is executed by a processor to implement the battery detection method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Radiation inspection method and radiation inspection system
CN106950232A
Full-automatic online nondestructive testing method for lithium battery cell
CN114594114A
Industrial defect detection method, system and device and storage medium
CN118967672A