AI algorithm-based full-appearance visual detection method and system for energy storage socket

Through the full-appearance visual inspection system based on AI algorithms, combined with color imaging, black and white imaging and multi-spectral components, the problems of multi-specification adaptability and efficiency of energy storage socket inspection are solved, and high-precision and low-cost defect detection is achieved.

CN120629205AActive Publication Date: 2025-09-12杭州映图智能科技有限公司

Patent Information

Application Number
CN202511134770.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-14
Publication Date
2025-09-12
Estimated Expiration
2045-08-14

AI Technical Summary

Technical Problem

Existing energy storage socket appearance inspection technology has limited ability to identify complex defects and is difficult to adapt to the inspection needs of products of different specifications. In addition, traditional equipment is costly and inefficient, and has high missed detection rates and misjudgment problems.

Method used

A full-appearance visual inspection system based on AI algorithms is adopted, combined with color imaging equipment, black and white imaging equipment and multi-spectral components. Through dynamic focusing, rotational drive mechanism and multi-field image stitching, multi-specification inspection of energy storage sockets is realized, and pressure sensing and ultraviolet fluorescence imaging are integrated to build a defect detection model.

Benefits of technology

It achieves full coverage detection of energy storage sockets of different specifications, improves detection accuracy and efficiency, reduces equipment costs, reduces missed detection rates and misjudgments, and ensures product structural integrity and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120629205A_ABST
    Figure CN120629205A_ABST
Patent Text Reader

Abstract

The invention discloses an AI algorithm-based full-appearance visual detection method and system for an energy storage socket, and the method comprises the steps of detection image collection, data analysis and processing, socket defect detection and detection optimization, and comprises the steps: adjusting the position of imaging equipment according to the specification parameters of the energy storage socket; acquiring socket and wiring copper column images through a color imaging device and a black-and-white imaging device respectively; processing the image to generate a model training data set; and constructing a defect detection model, outputting a comprehensive detection result through multi-module output consistency verification, and dynamically optimizing model parameters based on detection accuracy. The system comprises a detection image acquisition module, a data analysis processing module and a socket defect detection module, can realize high-precision and high-efficiency online detection of full appearance defects of energy storage sockets of multiple specifications, remarkably improves detection compatibility and reliability, and guarantees product quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of energy storage socket manufacturing, and specifically to a method and system for visually inspecting the entire appearance of an energy storage socket based on an AI algorithm. Background Art

[0002] With the rapid development of the new energy industry, energy storage sockets, as key equipment for energy storage and transmission, have a direct impact on their safety and reliability due to their appearance quality and structural integrity. Currently, the appearance inspection of energy storage sockets mainly relies on traditional visual inspection technology or manual sampling, which has the following significant defects: Existing technologies mostly use black and white cameras combined with traditional image processing algorithms for inspection. They have limited ability to identify complex defects, low defect detection rates, high defective product missed detection rates, and are particularly difficult to identify subtle defects. The inspection results are easily affected by product color differences. For dark-colored products such as black energy storage sockets, insufficient contrast leads to detection failure. For the inspection of whether the buckle is in place, since traditional algorithms only rely on visual contour judgment, they cannot distinguish between the phenomenon of false buckles that are visually in place but not actually fastened.

[0003] Energy storage sockets come in a variety of lengths, widths, and heights. Traditional inspection equipment, with its fixed camera position and limited depth of field, is unable to adapt to the inspection needs of products of varying heights. When product height differences exceed a certain threshold, the image becomes blurred, preventing full coverage of products of varying specifications. Frequent manual adjustments to equipment parameters are required, severely impacting production efficiency. Furthermore, to cover complex areas like side surfaces, traditional solutions require multiple camera arrays, resulting in large equipment footprint and high costs. Furthermore, the high rate of manual review further reduces inspection efficiency, making it difficult to meet the demands of large-scale mass production.

[0004] Therefore, in order to solve the problems existing in the prior art, the present invention proposes a method and system for visually inspecting the entire appearance of energy storage sockets based on AI algorithm. Summary of the Invention

[0005] In view of the shortcomings of the existing technology, the purpose of the present invention is to provide a method and system for visual inspection of the entire appearance of energy storage sockets based on AI algorithm.

[0006] To achieve the above object, the present invention provides the following technical solutions: A method for visually inspecting the entire appearance of an energy storage socket based on an AI algorithm includes the following steps: In the detection image acquisition step, the relative position of the imaging device and the energy storage socket is adjusted according to the read specifications of the energy storage socket; the upper and lower end surfaces, side surfaces, and socket hole array of the energy storage socket are imaged by a color imaging device to obtain a socket sample image; the wiring copper pillar is imaged by a black and white imaging device combined with a multispectral component to obtain a copper pillar sample image; a data analysis and processing step, performing image preprocessing on the socket sample images and the copper pillar sample images, generating a model training data set through multi-field image stitching, key area feature extraction, and multispectral data processing; In the socket defect detection step, a defect detection model is constructed based on the model training data set, and the defect detection model includes a hole position detection module, a plating detection module, a buckle detection module, and a sealing strip detection module; the real-time collected image of the energy storage socket to be inspected is input into the defect detection model, and a consistency check is performed based on the output results of each module, and finally a comprehensive detection result including defect type, defect location, and confidence level is output.

[0007] As a further improvement of the present invention, the color imaging device is equipped with a dynamic focusing lens, which synchronously reads the real-time angle data of the rotating drive mechanism during the acquisition process. When the rotation angle change reaches a preset angle threshold, the dynamic focusing lens automatically adjusts the focal length to compensate for the defocus caused by motion offset; the color imaging device is linked to the ultraviolet light source component, and adopts a segmented exposure mode for the sealing strip area, and the exposure intensity is dynamically adjusted with the curvature and rotation angle of the sealing strip; when rotated to the corresponding work station of the buckle, the color imaging device is synchronously triggered with the pressure sensing component to capture the appearance image of the buckle and record the associated data at the time of pressure acquisition; the black and white imaging device works synchronously with the multi-spectral component to perform time-series image acquisition on the wiring copper column, and its exposure parameters are dynamically adjusted with the rotation speed to avoid motion blur, and a group of image data including the copper column size and coating spectral characteristics are collected at each preset rotation angle interval.

[0008] As a further improvement of the present invention, the data analysis and processing step includes: performing feature extraction on the socket sample image to obtain a buckle area image, a hole position image and a sealing strip image; establishing a rotation angle and pixel offset mapping model based on the encoder data of the rotary drive mechanism, calibrating the images collected at different angles and completing multi-field motion compensation stitching; correcting the influence of the rotation angle on the spectral reflectivity through polynomial fitting, associating the corrected multispectral data with the dimensional data of the copper column sample image, and generating a two-dimensional feature matrix of size and spectrum; performing motion blur removal on the buckle area image, and extracting the gap width between the buckle and the slot and the buckle deformation area after blur correction as the dynamic features of the buckle.

[0009] As a further improvement of the present invention, the detection process of the hole position detection module includes receiving the socket hole array image after multi-field motion compensation splicing, removing noise through the image preprocessing algorithm, and calibrating the pixel coordinate system of the hole position area based on the rotation angle data; using a high-precision edge detection algorithm to extract the inner edge contour of each socket hole, calculating the coordinates of the hole position center, and mapping and aligning them with the hole position coordinates in the standard template; identifying the hole position offset through coordinate deviation calculation, performing dynamic threshold segmentation on the area within the hole, combining morphological operations to identify foreign matter in the hole, and outputting the hole position defect type and position information as the hole position detection result.

[0010] As a further improvement of the present invention, the detection process of the coating detection module includes obtaining the wiring copper pillar size data of the copper pillar sample image and the spectral data of the multi-spectral component, and calibrating the coordinate system of the copper pillar image based on the position information output by the hole detection module; extracting the characteristic band of coating oxidation through the characteristic band extraction algorithm, and correcting the influence of angle offset on reflectivity in combination with the rotation angle data; fusing the corrected spectral data with the size data to identify coating oxidation, scratches and pinhole defects, and outputting the coating defect type and associated copper pillar size deviation information.

[0011] As a further improvement of the present invention, the detection process of the buckle detection module includes receiving the buckle area image captured by the color imaging device and the contact pressure value synchronously captured by the pressure sensing component, and locating the coordinate area of ​​the buckle in the image based on the position information of the hole detection module; extracting the gap contour between the buckle and the slot through the edge detection algorithm, calculating the average gap width and the buckle deformation curvature; establishing a pressure visual association model, and when the contact pressure value is greater than the preset pressure threshold and the average gap width is less than the preset gap threshold, it is determined that the assembly is qualified; otherwise, the buckle abnormality type and abnormal position information are output.

[0012] As a further improvement of the present invention, the buckle detection module also includes a pressure visual fusion judgment module, whose detection process includes calibrating the time difference between the pressure acquisition time and the image acquisition time. When the time difference is greater than the preset difference, the pressure change within the time difference is calculated based on the rotation speed, and the pressure value is corrected by the interpolation algorithm; the weights of the pressure value and the gap width are adjusted according to the rotation speed, and the comprehensive score of the buckle defect is calculated in combination with the gap width and the buckle deformation rate; when the comprehensive score is lower than the preset score threshold, it is determined that the buckle assembly is abnormal, and the scoring result, abnormality type and abnormal location information are output.

[0013] As a further improvement of the present invention, the detection process of the sealing strip detection module includes receiving a fluorescent image of the sealing strip excited by an ultraviolet light source, locating the sealing strip area based on the overall contour of the socket, and extracting the strip contour through adaptive threshold segmentation; using a skeleton extraction algorithm to obtain the central axis of the strip, calculating the axis continuity, identifying the area within the contour whose grayscale value is higher than a preset grayscale threshold based on the mean value of the strip, and calculating its area and circularity; when the axis continuity is lower than the preset continuity threshold, or the area and circularity are greater than the preset feature threshold, or the offset of the strip contour compared with the standard position template is greater than the preset offset threshold, outputting the detection result of the sealing strip defect.

[0014] As a further improvement of the present invention, it also includes a detection optimization step, comparing the output defect detection results of various types with the high-precision labeled sample images, and calculating the detection accuracy of different defect types; for defect types with a detection accuracy lower than a preset accuracy threshold, automatically extracting feature samples of the defect type, increasing its weight in the model training set, and adjusting the core parameters of the corresponding sub-model based on the parameter adjustment algorithm; redeploying the adjusted model to the detection process, using newly collected test samples for detection, and recalculating the accuracy of each defect type. If the accuracy is improved to above the preset accuracy threshold, the current model parameters are solidified; if the threshold is not reached, the above optimization process is repeated.

[0015] An AI-based visual inspection system for the entire appearance of energy storage sockets, including: The detection image acquisition module adjusts the relative position of the imaging device and the energy storage socket according to the read specifications of the energy storage socket; uses a color imaging device to capture images of the upper and lower end faces, side faces, and socket hole array of the energy storage socket to obtain a socket sample image; uses a black and white imaging device combined with a multispectral component to capture images of the wiring copper pillar to obtain a copper pillar sample image; A data analysis and processing module performs image preprocessing on the socket sample images and the copper pillar sample images, and generates a model training data set through multi-field image stitching, key area feature extraction, and multispectral data processing; A socket defect detection module constructs a defect detection model based on the model training data set, and the defect detection model includes a hole position detection module, a plating detection module, a buckle detection module, and a sealing strip detection module; the real-time collected image of the energy storage socket to be inspected is input into the defect detection model, and a consistency check is performed based on the output results of each module, and finally a comprehensive detection result including defect type, defect location, and confidence level is output.

[0016] The beneficial effects of the present invention are: (1) The automatic calibration of the imaging device position is achieved through the height adjustment device, which can adapt to the detection requirements of energy storage sockets with different lengths, widths and heights. In particular, it solves the problem of blurred imaging of height difference products caused by the fixed depth of field of traditional equipment. It can achieve full coverage detection of products of multiple specifications without manual adjustment, greatly improving the flexibility and detection efficiency of the production line.

[0017] (2) The use of color imaging equipment combined with dynamic focusing, segmented exposure and other optimization strategies, in conjunction with AI deep learning algorithms, effectively solves the problems of traditional black and white cameras being sensitive to color difference and having a low defect detection rate, especially significantly improving the recognition accuracy of subtle defects; the side is photographed multiple times in steps through a rotating drive mechanism to achieve complete detection of the entire side area and threaded structure, avoiding the irregular imaging defects of traditional line scan cameras, while reducing the number of camera layouts, equipment costs and space occupancy; for key parts such as buckle assembly and sealing strips, the fusion of multi-source data such as pressure sensing and ultraviolet fluorescence imaging solves the problem of misjudgment of hidden defects such as false buckles and rubber strip bubbles in traditional vision, and greatly reduces the missed detection rate.

[0018] The present invention specifically solves the key defect detection problems that directly affect product functions, such as socket hole position offset, wiring copper column plating defects, and sealing strip breakage. Through high-precision feature extraction and multi-dimensional verification, it ensures the structural integrity and performance stability of factory products, and avoids potential safety hazards from the production process. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a method flow chart of a method for visually inspecting the entire appearance of an energy storage socket based on an AI algorithm of the present invention; Figure 2 This is a system block diagram of a full-appearance visual inspection system for energy storage sockets based on an AI algorithm of the present invention; Figure 3 This is a first photographic diagram of the end face of the socket of the present invention; Figure 4 This is a second photographic diagram of the socket end face of the present invention. DETAILED DESCRIPTION

[0020] The present invention will be described in further detail below with reference to the accompanying drawings and embodiments. Identical components are denoted by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, and the terms "bottom," "top," "inner," and "outer" refer to directions toward or away from the geometric center of a particular component, respectively.

[0021] The embodiment of the present invention proposes a method for visual inspection of the entire appearance of energy storage sockets based on AI algorithm, such as Figures 1 to 4 As shown, the following steps are included: In the detection image acquisition step, the relative position of the imaging device and the energy storage socket is adjusted according to the read specifications of the energy storage socket; the upper and lower end surfaces, side surfaces, and socket hole array of the energy storage socket are imaged by a color imaging device to obtain a socket sample image; the wiring copper pillar is imaged by a black and white imaging device combined with a multispectral component to obtain a copper pillar sample image; The energy storage socket specification parameters refer to the structural parameters of the energy storage socket to be tested, including but not limited to the length and width of the upper and lower end surfaces, the side height, the arrangement spacing of the socket hole array, the number and distribution position of the wiring copper columns, the layout range of the clips and sealing strips, etc. These parameters are used to guide the initial positioning of the imaging equipment.

[0022] This is achieved through a height adjustment device, which includes a servo drive assembly that automatically adjusts the spatial height of the imaging device based on the height differences in the aforementioned specifications. Specifically, based on the imaging device's depth of field (i.e., the distance range within which a clear image is captured), the servo drive assembly receives height adjustment commands from the controller and drives the color and black and white imaging devices to move vertically until the distance between the device and the detection surface of the energy storage socket is within the preset clear imaging range, ensuring that images of products of different specifications are clear.

[0023] The color imaging equipment uses six 130W color cameras for image acquisition, corresponding to the upper and lower end faces and four side faces of the energy storage socket, respectively, to achieve full coverage through workstation division. The upper and lower end faces are captured directly by a fixed-angle camera; the side faces and the socket hole array are captured in conjunction with a rotary drive device. For side inspection of the square energy storage socket, the rotary drive device rotates the product in steps at a preset workstation, triggering a camera photo each time it rotates one angle, and the entire side area is covered through multiple shots. In particular, the socket hole array is captured by focusing the camera on the hole area, ensuring a clear outline of the hole edge and hole opening. The fifth shot at workstation 2 simultaneously focuses on the side thread structure to detect the presence and integrity of the threads.

[0024] A 2000W black-and-white camera is used for image acquisition, primarily capturing the dimensional characteristics of copper pillars. The multispectral component works synchronously with the black-and-white camera to collect spectral information in the 400-700nm visible light and 850nm near-infrared bands for analyzing the material properties of the copper pillar coating, such as the degree of oxidation. During acquisition, the black-and-white camera and the multispectral component are linked via a controller to ensure that the dimensional image and spectral data captured at the same moment correspond to the same copper pillar area, laying the foundation for subsequent fusion analysis.

[0025] a data analysis and processing step, performing image preprocessing on the socket sample images and the copper pillar sample images, generating a model training data set through multi-field image stitching, key area feature extraction, and multispectral data processing; Image preprocessing includes noise removal and distortion correction. A Gaussian filter algorithm is used to smooth out noise in the socket and copper pillar sample images caused by equipment vibration and ambient light interference. Image distortion caused by lens optical characteristics is corrected at the pixel level using pre-calibrated lens distortion parameters to ensure that the image geometry is consistent with the actual product.

[0026] Multiple images captured during side inspection are processed through multi-field image stitching. Based on the encoder data from the rotary drive unit, the angle of each rotation is recorded, and a mapping relationship between the rotation angle and pixel offset is established. Coordinate calibration is then performed on side images captured at different angles. For example, after a side image is rotated 30°, the edge pixels of the second image are radially shifted by the corresponding offset based on the rotation center coordinates. The image is then stitched together into a complete side panoramic image using an image fusion algorithm to ensure that the entire side area is not missed.

[0027] For the socket sample image, the image segmentation algorithm is used to locate the key detection areas and extract features: in the socket hole array area, the edge contour of the hole position and the grayscale distribution inside the hole are extracted; in the buckle area, the contact edge and gap width between the buckle and the slot are extracted; in the sealing strip area, the continuous contour and grayscale mean of the strip are extracted to provide a benchmark for subsequent fluorescence detection.

[0028] The copper pillar spectral data collected by the multi-spectral component is standardized to eliminate the influence of different light intensities. The angular deviation of the spectral reflectance is corrected in combination with the rotation angle data. For example, the change in light angle caused by the rotation of the copper pillar surface will affect the reflectivity, and this deviation is compensated by a preset correction model. Finally, the processed spectral data is associated with the copper pillar size data collected by the black and white camera to form a size spectrum feature pair, which serves as the basic data for coating defect detection.

[0029] The image feature data after the above processing and the manually annotated defect labels form a model training data set for subsequent AI model training.

[0030] In the socket defect detection step, a defect detection model is constructed based on the model training data set, and the defect detection model includes a hole position detection module, a plating detection module, a buckle detection module, and a sealing strip detection module; the real-time collected image of the energy storage socket to be inspected is input into the defect detection model, and a consistency check is performed based on the output results of each module, and finally a comprehensive detection result including defect type, defect location, and confidence level is output.

[0031] The defect detection model is constructed using an AI deep learning algorithm, and a training strategy of one workstation and one special sub-model is adopted for different inspection objects: for the hole detection module, based on the feature data training of the socket hole array, the deviation law between the hole center coordinates and the standard template is learned, and defects such as hole offset and foreign matter in the hole can be identified; for the coating detection module, based on the size and spectral feature pair training, the spectral differences between the coating in normal and oxidized and scratched states are learned, and the size deviation and coating defects can be judged simultaneously; the buckle detection module, based on the edge features of the buckle area and the assembly standard data training, the normal gap range between the buckle and the slot is learned, and assembly anomalies such as false buckles and deformations are identified; the sealing strip detection module, based on the contour feature training of the sealing strip, the normal continuous form of the rubber strip is learned, and defects such as breakage, dislocation, and bubbles can be identified.

[0032] After undergoing the aforementioned image acquisition and data analysis steps, the real-time image of the energy storage socket to be inspected is fed into the defect detection model, where each module outputs the corresponding defect detection results. A consistency check is implemented by the controller. Its core objective is to determine if there are logical inconsistencies between the detection results of different modules. For example, if the buckle inspection module determines an assembly anomaly, while the sealing strip inspection module in an adjacent area indicates a misaligned seal, it is necessary to verify whether both are caused by the same structural error, thereby eliminating false positives due to image noise or accidental errors.

[0033] After consistency verification, the output includes structured data including the defect type, such as hole position offset, coating oxidation, etc., the specific location coordinates of the defect on the product, and the detection confidence. The confidence reflects the reliability of the model's judgment of the defect, providing a clear basis for sorting and rework on the production line.

[0034] Specifically, such as Figures 1 to 4 As shown, the color imaging device is equipped with a dynamic focusing lens, which synchronously reads the real-time angle data of the rotation drive mechanism during the acquisition process. When the rotation angle change reaches a preset angle threshold, the dynamic focusing lens automatically adjusts the focal length to compensate for the defocus caused by the motion offset; A dynamic focus lens refers to an optical component that can change the focal length of the lens through motor drive. Different from a fixed-focus lens, it can adjust the focal length parameters in real time according to the change in the distance between the photographed object and the lens, ensuring clear imaging of objects at different distances.

[0035] The real-time angle data of the rotary drive mechanism is output in real time by the encoder on the rotary motor. This data is transmitted to the controller in the form of a pulse signal, reflecting the current rotation angle of the energy storage socket and providing a position reference for lens focusing.

[0036] The preset angle threshold is set according to the structural complexity of the side of the energy storage socket, such as whether there are protrusions or grooves. For example, when the rotation angle changes by 5°, a focus adjustment is triggered to ensure that the lens is always aligned with the current detection area during the product rotation process. For example, when rotating from a flat surface to a raised surface with a buckle, the blur caused by the distance change is offset by focusing.

[0037] The color imaging device is linked to the ultraviolet light source component, and adopts a segmented exposure mode for the sealing strip area, and the exposure intensity is dynamically adjusted according to the curvature and rotation angle of the sealing strip.

[0038] The ultraviolet light source assembly contains an array of ultraviolet LED lamp beads with a wavelength of 365nm. The ultraviolet light it emits can excite the fluorescent agent pre-added in the sealing strip of the energy storage socket, causing the sealing strip to emit fluorescence visible to the naked eye, forming a significant grayscale difference with the non-fluorescent shell.

[0039] Segmented exposure mode means that as the energy storage socket rotates, the color imaging device sequentially exposes and captures different sections of the sealing strip. For example, if the sealing strip is 100mm long, each 10° rotation will capture a 10mm segment, and multiple images are stitched together to cover the entire strip.

[0040] Dynamic adjustment of exposure intensity is implemented based on a preset curvature-angle-intensity mapping table. When an increase in the curvature of the sealing strip is detected, the exposure intensity is increased by 20% to offset the attenuation of fluorescent reflection. When the rotation angle increases the angle between the light source and the sealing strip, the exposure intensity is simultaneously increased by 10% to ensure that the fluorescent brightness of the sealing strip at different positions is consistent, facilitating subsequent contour extraction.

[0041] When rotating to the position corresponding to the buckle, the color imaging device and the pressure sensing component are triggered synchronously to collect the buckle appearance image and record the associated data at the time of pressure collection.

[0042] The corresponding work position of the buckle refers to the rotation angle position preset according to the design drawing of the energy storage socket. This position is associated with the encoder data of the rotating motor through the controller to ensure that the buckle is at the same shooting angle during each inspection.

[0043] Synchronous triggering is achieved by the controller sending a synchronous pulse signal. When rotating to the target workstation, the controller simultaneously sends trigger signals to the color imaging device and the pressure sensing component, so that both start working at the same time, ensuring that the collected image and pressure data correspond to the buckle in the same state, such as avoiding slight displacement of the buckle during image acquisition due to delays.

[0044] The associated data at the moment of pressure collection includes the pressure value, the current rotation angle, the frame number of the image acquisition, etc. This data is packaged and stored for subsequent analysis of the correspondence between pressure visual features, such as determining whether the buckle image under a certain pressure value meets the assembly standard.

[0045] The black and white imaging device works synchronously with the multispectral component to capture time-series images of the wiring copper pillars. Its exposure parameters are dynamically adjusted with the rotation speed to avoid motion blur. A set of image data containing the copper pillar dimensions and the spectral characteristics of the coating is collected at each preset rotation angle.

[0046] The black and white imaging device is used to collect the geometric outline of the copper column and shares the same trigger signal with the multispectral component to ensure that the same copper column area is imaged at the same time, so that the dimensional data and spectral data have spatial correspondence.

[0047] The exposure parameter mainly refers to the exposure time. When the speed of the rotating motor increases, the controller automatically shortens the exposure time to reduce image smear caused by the movement of the copper column and ensure the accuracy of dimensional measurement.

[0048] The preset rotation angle interval is set according to the circumferential uniformity requirements of the copper column. For example, a set of data is collected every 15° rotation. Six sets of data cover the 360° circumference of the copper column to ensure that no coating defects are missed. Each set of data contains a black and white image and a multispectral image, which are linked to form a size spectrum data set through coordinate mapping.

[0049] Specifically, such as Figures 1 to 4 As shown, the data analysis and processing step includes extracting features from the socket sample image to obtain a buckle area image, a hole position image, and a sealing strip image; A deep learning-based object detection algorithm locates key areas. Using a pre-trained region recognition model, a region of interest (ROI) is automatically selected from sample socket images, including the clips, holes, and seals. This process incorporates prior structural knowledge of energy storage sockets, such as the typical distribution of clips along the side edges and the regular arrangement of holes, to optimize the model's ability to resist interference from complex backgrounds.

[0050] The selected ROI is cropped and resized to obtain independent images of the buckle area, hole position, and sealing strip. The hole position image must retain the complete hole array layout, and the sealing strip image must include the interface between the strip and the shell, laying the foundation for subsequent fine feature extraction.

[0051] Based on the encoder data of the rotation drive mechanism, a rotation angle and pixel offset mapping model is established to calibrate images collected at different angles and complete multi-field motion compensation stitching.

[0052] It refers to the angle value obtained after decoding the pulse signal output by the encoder in the rotation drive mechanism. It reflects the real-time position of the energy storage socket during rotation. Its accuracy can reach 0.1°, providing a position reference for image calibration.

[0053] A mapping relationship was established through calibration experiments. When the energy storage socket rotates by an angle θ around its rotation center, the offset of any pixel (x, y) in the image is related to the distance r from that point to the rotation center. The offset, expressed in pixels, is Δ = θ × r × π / 180. The model is fitted using a linear equation: Δx = a × θ × r + b, Δy = c × θ × r + d (a, b, c, d are calibration coefficients). This ensures that pixel coordinates at different angles can be traced back to the same reference coordinate system.

[0054] Multi-field-of-view motion-compensated stitching first performs pixel-level calibration on side images acquired at different angles based on a mapping model to correct image offsets caused by rotation. The SIFT algorithm is then used to extract matching feature points from the calibrated images, such as features of side threads and raised structures, and the transformation matrix between the images is calculated. A weighted fusion algorithm is then used to stitch the images together, eliminating stitching seams and forming a complete side panoramic image. This ensures that the geometric error of the stitched image is ≤0.5 pixels.

[0055] The influence of the rotation angle on the spectral reflectivity is corrected by polynomial fitting, and the corrected multispectral data is associated with the size data of the copper column sample image to generate a two-dimensional feature matrix of size and spectrum.

[0056] The influence of rotation angle on spectral reflectivity. The reflectivity of the copper column surface coating changes with the rotation angle. For example, when the angle between the light direction and the normal of the coating surface increases, the reflectivity decreases. This interference needs to be eliminated through correction.

[0057] Polynomial fitting correction collects spectral data of copper pillars at different rotation angles, and performs cubic polynomial fitting with angle as the independent variable and reflectivity as the dependent variable. The reflectivity at any angle is corrected to the equivalent value at the reference angle, ensuring that the spectral characteristics only reflect the material status of the coating, such as oxidation and scratches.

[0058] The horizontal dimensions of the two-dimensional dimensional and spectral feature matrix represent the copper pillar's dimensional parameters, including diameter, length, and cylindricity, calculated from a black-and-white image using edge detection and Hough transform. The vertical dimension represents corrected multispectral reflectance data, covering eigenvalues ​​in the 400-700nm visible light and 850nm near-infrared bands. Each element in the matrix represents the correlation between a specific dimensional parameter and the reflectance in a specific band, providing fusion features for the coating inspection module.

[0059] Motion blur is removed from the buckle area image, and the gap width between the buckle and the slot and the buckle deformation area after blur correction are extracted as buckle dynamic features.

[0060] Blurred images of the buckle area are caused by relative motion during rotation. The blur kernel is linear, and its length is positively correlated with the rotation speed. This is corrected using a blind deconvolution algorithm. Frequency-domain analysis is used to estimate the blur kernel parameters, and Wiener filtering is then used to restore a sharp image, ensuring a 30% or greater improvement in edge clarity. Sub-pixel edge detection algorithms, such as Zernike moment edge positioning, are used to identify the interface between the buckle and the slot. The shortest distance between the edges is calculated as the gap width, with an accuracy of up to 0.01 mm. Buckle deformation region extraction involves differentially comparing the corrected buckle image with a standard buckle template. Morphological dilation and erosion operations are used to extract grayscale difference regions. The area of ​​the deformed region and the maximum deformation distance are calculated as dynamic features for determining the buckle assembly state.

[0061] Through the above processing, the data analysis and processing step can convert the original image into structured, interference-resistant feature data, providing high-quality input for the training and reasoning of subsequent defect detection models, ensuring detection accuracy and robustness.

[0062] Specifically, such as Figures 1 to 4 As shown, the detection process of the hole position detection module includes receiving the socket hole array image after multi-field motion compensation stitching, removing noise through image preprocessing algorithm, and calibrating the pixel coordinate system of the hole position area based on the rotation angle data.

[0063] The socket hole array image after multi-field motion compensation stitching refers to the complete hole area image formed by stitching through the aforementioned data analysis and processing steps, covering all socket holes on the upper and lower end surfaces of the energy storage socket, ensuring that the hole array is not missed and has no overlap.

[0064] The image preprocessing algorithm denoising adopts bilateral filtering algorithm to remove noise. This algorithm takes into account both spatial distance and grayscale similarity, smoothing the noise while retaining the hole edge details, thus avoiding noise interference in subsequent edge detection.

[0065] The pixel coordinate system is calibrated based on the rotation angle data. The encoder data of the rotary drive mechanism is used as a reference to map the pixel coordinates of the hole area image to the physical coordinate system. Specifically, the coordinate offset caused by rotation is corrected by using a pre-calibrated pixel-to-physical size conversion coefficient combined with the rotation angle. For example, after rotating by an angle of θ, the hole pixel coordinates (x, y) correspond to the physical coordinates (x×0.02×cosθ-y×0.02×sinθ, x×0.02×sinθ+y×0.02×cosθ), ensuring a consistent and accurate coordinate system.

[0066] A high-precision edge detection algorithm is used to extract the inner edge contour of each socket hole, calculate the coordinates of the hole center, and map and align them with the hole coordinates in the standard template.

[0067] The high-precision edge detection algorithm uses a sub-pixel edge detection algorithm, such as edge positioning based on Zernike moments. By performing polynomial fitting on the grayscale distribution of the edge pixels at the hole position, the sub-pixel position of the edge is determined. Compared with the traditional Canny algorithm, the edge positioning error is reduced to ≤0.002mm.

[0068] Inner edge contour extraction performs morphological processing on the detected edges, such as corrosion and expansion operations, to remove interfering contours such as hole burrs and retain the continuous curve of the inner edge of the hole; through contour fitting, a regular hole position contour is obtained.

[0069] Hole center coordinate calculation: for circular holes, the center of the fitted circle is used as the hole center; for special-shaped holes, the geometric center of the contour is used as the center coordinate, ensuring that the coordinate calculation error is ≤0.01mm.

[0070] Alignment is performed with a standard template. The standard template is a set of hole coordinates generated based on the energy storage socket design drawing, containing the theoretical physical coordinates of each hole. Using a rigid transformation algorithm, the actual hole center coordinates are matched with the standard template coordinates. The minimum mean square error (MSE) is calculated, and alignment is considered successful when the error is ≤0.05mm, eliminating coordinate deviations caused by slight product placement offsets.

[0071] The hole position offset is identified by coordinate deviation calculation, the area inside the hole is segmented by dynamic threshold, and foreign matter inside the hole is identified by combining morphological operations. The hole position defect type and location information are output as the hole position detection result.

[0072] Calculate the Euclidean distance between the center of the actual hole position and the center of the standard template after alignment When Δ exceeds the preset offset threshold, it is determined to be a hole offset defect, and the offset direction and distance are recorded.

[0073] Dynamic threshold segmentation of the hole area: For foreign objects such as metal debris and plastic residues that may exist in the hole, adaptive threshold segmentation is used. The hole area is delineated with the edge contour of the hole as the boundary, and the grayscale mean μ and standard deviation σ of the pixels in the area are calculated. The segmentation threshold is dynamically set to μ+2σ. Areas above this threshold are judged as suspected foreign objects, adapting to grayscale changes under different lighting conditions.

[0074] Morphological operation to identify foreign objects: Morphological processing is performed on the segmented suspected foreign object areas: Use opening operation to remove tiny noise points, that is, areas with an area of ​​≤5 pixels, and calculate the area and circularity of the remaining area. Circularity = Area / Perimeter 2 When the area is ≥ the preset foreign body area threshold and the roundness is consistent with the foreign body shape, such as metal debris is mostly irregular in shape and the roundness is ≤0.6, it is judged as a foreign body defect in the hole.

[0075] The output of the hole position detection results includes the defect type, such as hole position offset, foreign matter in the hole, the number of the defective hole position, physical coordinates (x, y), and confidence level. The confidence level is a probability calculation based on edge detection and foreign matter recognition. A confidence level of ≥95% is considered a valid defect.

[0076] Through the above process, the hole position detection module can achieve high-precision detection of the energy storage socket hole array, effectively identify subtle hole position offsets and foreign objects in the holes, and provide guarantees for product assembly compatibility and usage safety.

[0077] Specifically, such as Figures 1 to 4 As shown, the detection process of the plating detection module includes obtaining the connection copper pillar size data of the copper pillar sample image and the spectral data of the multi-spectral component, and calibrating the coordinate system of the copper pillar image based on the position information output by the hole detection module.

[0078] The wiring copper pillar size data refers to the geometric parameters extracted from the copper pillar sample image collected by the black and white imaging device, including the diameter, length, and cylindricity of the copper pillar. After the sub-pixel positioning of the copper pillar edge is calculated through edge detection and Hough transform algorithm, the cylindrical contour is fitted. The diameter is the maximum lateral distance of the contour, the length is the axial extension distance, and the cylindricity is the deviation value between the actual contour and the ideal cylinder.

[0079] The spectral data of the multi-spectral component is collected by the multi-spectral component. The reflectance data of the 400-700nm visible light band and the 850nm near-infrared band are presented in the form of a spectral curve with the horizontal axis being wavelength and the vertical axis being reflectance, reflecting the material properties of the copper column plating. For example, after the nickel plating is oxidized, the reflectance in the 850nm band will drop significantly.

[0080] Coordinate system calibration uses the hole center coordinates output by the hole detection module as a reference. A coordinate transformation aligns the copper pillar image's pixel coordinate system with the hole coordinate system. Specifically, the fixed positional relationship between the copper pillar and the adjacent socket hole is used. For example, the theoretical distance L between the copper pillar center and the center of a hole is used to calculate the offset and rotation angle of the copper pillar image. After correction, the copper pillar coordinates are incorporated into a unified product coordinate system, ensuring spatial consistency in dimensional measurement and defect location.

[0081] The characteristic band of coating oxidation is extracted by the characteristic band extraction algorithm, and the influence of angle offset on reflectivity is corrected by combining the rotation angle data.

[0082] The characteristic band extraction algorithm uses principal component analysis (PCA) to reduce the dimensionality of multispectral data and identify the bands most sensitive to coating oxidation. For example, by comparing the spectral curves of normal and oxidized coatings, it was found that the reflectivity difference at 850nm near-infrared band is the largest. After oxidation, the reflectivity decreases by more than 30%. This band is extracted as the characteristic band for oxidation detection.

[0083] The correction of the effect of angle offset on reflectivity is based on the encoder data of the rotary drive mechanism, and a quadratic polynomial is used to fit the correction model. , where θ is the rotation angle, and k2, k1, and k0 are fitting coefficients. This eliminates the effect of changes in illumination angle on reflectivity caused by the copper pillar's rotation. For example, when the copper pillar is rotated 30°, the model calculates a corrected reflectivity value, ensuring direct comparison of reflectivity data at different angles.

[0084] The corrected spectral data is integrated with the dimensional data to identify coating oxidation, scratches, and pinhole defects, and the coating defect type and associated copper pillar dimensional deviation information are output.

[0085] Data fusion method: Construct a spectrum-size feature vector, and input the corrected characteristic band reflectivity and copper column size parameters as joint features into the defect recognition model, so that the model can simultaneously learn the correlation between material and geometric features.

[0086] Its defect identification logic is: Coating oxidation: when the corrected reflectivity of the characteristic band (850nm) is lower than the normal threshold, for example, if the normal coating reflectivity is ≥70% and ≤40% after oxidation, it is determined to be an oxidation defect; Scratches: Spectral data is used to identify areas with sudden reflectivity changes. The reflectivity at the scratch is more than 20% lower than that of the surrounding area. Combined with the morphological characteristics in the dimensional data, scratches are linearly distributed, with a length of ≥0.5mm and a width of ≤0.1mm, eliminating surface texture interference. Pinholes, which appear as local low reflectivity points in spectral data, are identified by combining morphological operations with position information in size data.

[0087] The output information includes defect types such as oxidation, scratches, pinholes, etc., the specific location of the defect on the copper pillar based on the calibrated coordinate system, such as 2mm from the top of the copper pillar, the defect size such as scratch length, pinhole diameter, and the associated copper pillar size deviation information such as diameter deviation +0.05mm, realizing the coordinated detection of material defects and geometric accuracy.

[0088] Through the above process, the coating detection module realizes the integrated detection of the size and material of the copper pillars of the connection, solves the problem that traditional single visual inspection cannot take into account both the coating quality and geometric accuracy, and improves the detection reliability of the conductive safety of the energy storage socket.

[0089] Specifically, such as Figures 1 to 4 As shown, the detection process of the buckle detection module includes receiving the buckle area image captured by the color imaging device and the contact pressure value synchronously captured by the pressure sensing component, and locating the coordinate area of ​​the buckle in the image based on the position information of the hole detection module.

[0090] The buckle area image is a local high-definition image of the buckle part of the energy storage socket collected by the color imaging equipment. The image focuses on the assembly joint between the buckle and the slot, clearly showing the edge shape, gap distribution and surface state of the two, providing detailed basis for subsequent contour extraction.

[0091] The contact pressure value is the force data generated when the pressure sensing component contacts the protruding part of the buckle. The pressure sensor converts the mechanical force into an electrical signal and obtains it through analog-to-digital conversion. Its numerical value directly reflects the tightness of the buckle assembly. The greater the force value, the more fully the buckle is inserted into the slot.

[0092] The process for locating the clip coordinate area based on the position information from the hole detection module is as follows: The hole detection module has determined the precise coordinates of the socket hole array. The relative positions of the clip and adjacent holes are fixed during design, such as the distance between the clip center and the center of a particular hole. Leveraging this fixed positional relationship, and using the hole coordinates as a reference, coordinate translation and angular rotation operations can accurately calculate the clip's coordinate range in the image, ensuring a positioning deviation of no more than 1 pixel, thus defining an accurate area for subsequent inspection.

[0093] The gap contour between the buckle and the slot is extracted using an edge detection algorithm, and the mean gap width and buckle deformation curvature are calculated.

[0094] The edge detection algorithm uses the Canny operator, which smooths image noise through Gaussian filtering, determines candidate edge points by calculating gradient magnitude and direction, and finally extracts the continuous contour lines of the buckle and slot edges through non-maximum suppression and dual-threshold filtering. Compared to traditional algorithms, the edge positioning error is kept within 0.5 pixels, ensuring accurate gap measurement.

[0095] Gap contour extraction targets the gap area between the buckle and the slot. The two parallel contour lines corresponding to the buckle edge and the slot edge obtained by edge detection constitute the gap contour, which reflects the degree of fit between the two.

[0096] The mean gap width is calculated by evenly selecting multiple sampling points along the length of the buckle on the extracted gap contour, calculating the perpendicular distance between the two contour lines at each point, and then averaging the distance values ​​of all sampling points. This eliminates measurement errors caused by local burrs and makes the results more representative.

[0097] The buckle deformation curvature is obtained by curve fitting the buckle edge profile. The buckle edge profile is treated as a continuous curve and fitted to a quadratic curve using the least squares method. The curvature value is then calculated using the curve's curvature formula. A greater curvature indicates more significant buckle deformation, which can be used to determine whether the buckle has undergone abnormal deformation due to assembly forces.

[0098] A pressure-visual correlation model is established. When the contact pressure value is greater than a preset pressure threshold and the average gap width is less than a preset gap threshold, the assembly is determined to be qualified; otherwise, the buckle abnormality type and abnormal position information are output.

[0099] The pressure-visual correlation model is a comprehensive judgment model that integrates contact pressure values ​​and mean gap width. Its core principle is to establish association rules between the two. Under normal assembly conditions, contact pressure values ​​and mean gap width are negatively correlated; greater pressure results in smaller gaps. The model learns from a large number of qualified sample pressure and gap data to determine a reasonable matching range between the two.

[0100] The preset pressure threshold is the minimum value determined based on the pressure data statistics of qualified products. It represents the minimum force required for the buckle to achieve effective locking. A value lower than this indicates that the buckle is not fully locked.

[0101] The preset gap threshold is the maximum value determined based on the gap data statistics of qualified products. It represents the maximum allowable gap when the buckle and the slot are properly fitted. Exceeding this value indicates that the two are not tightly fitted.

[0102] The logic for determining if the assembly is qualified is as follows: only when the contact pressure value is greater than the preset pressure threshold and the average gap width is less than the preset gap threshold, the dual qualification conditions are met and the assembly is determined to be qualified.

[0103] Output of buckle anomaly type and location information: If the qualification criteria are not met, the anomaly type is classified and output based on the specific deviation. If the contact pressure value is lower than the preset pressure threshold but the average gap width meets the requirements, it is judged as a false buckle, meaning that the visual fit is not actually tightened. If the average gap width exceeds the preset gap threshold but the pressure meets the requirements, it is judged as buckle deformation, meaning that the fit is poor due to deformation. If both conditions are not met, it is judged as assembly misalignment. At the same time, combined with the previously located buckle coordinate area, the specific location of the anomaly on the buckle is output, providing precise guidance for rework.

[0104] Through the above process, the buckle detection module realizes double verification of the buckle assembly status, effectively avoiding the misjudgment of hidden defects such as false buckles by single visual inspection, and improving the reliability of assembly quality inspection.

[0105] Specifically, such as Figures 1 to 4 As shown, the buckle detection module also includes a pressure visual fusion judgment module, and its detection process includes calibrating the time difference between the pressure acquisition moment and the image acquisition moment. When the time difference is greater than the preset difference, the pressure change within the time difference is calculated based on the rotation speed, and the pressure value is corrected by the interpolation algorithm.

[0106] The time difference between pressure acquisition and image acquisition refers to the interval between the time the pressure sensing component acquires the contact pressure value and the time the color imaging device captures the image of the buckle area. This time difference is primarily caused by factors such as device trigger delay and signal transmission time. If not calibrated, it can cause a temporal and spatial mismatch between the pressure data and the image data. For example, during pressure acquisition, the buckle may have already rotated to the next position, while the image is still in the previous position.

[0107] The calibration process uses a synchronized clock to configure a unified timestamp recording mechanism for the pressure sensing component and the color imaging device. After the acquisition is completed, the timestamps of the two are compared, and the difference is the actual time difference.

[0108] The preset difference is the maximum allowable time difference determined based on the device response speed. Exceeding this value will cause the data matching error to exceed the acceptable range and require correction.

[0109] The logic for calculating pressure change based on rotational speed is as follows: rotational speed reflects the buckle's movement rate, and the buckle's rotation angle during the time difference can be calculated by multiplying the rotational speed by the time difference. The pressure change is related to the rotational angle. For example, the change in contact area with the sensor during buckle rotation causes pressure fluctuations. Using a pre-established model for the relationship between rotational angle and pressure change, the theoretical pressure change during this time difference can be calculated.

[0110] The interpolation algorithm uses linear interpolation to correct the pressure value: based on the pressure value at the time of pressure acquisition, combined with the calculated pressure change, the pressure value corresponding to the image acquisition time is inferred, so that the corrected pressure value and the buckle state reflected in the image are completely matched in time, ensuring the correlation between the two.

[0111] The weight of the pressure value and gap width is adjusted according to the rotation speed, and the comprehensive score of the buckle defect is calculated based on the gap width and buckle deformation rate.

[0112] The basis for adjusting the weight is the impact of rotation speed on the reliability of pressure data and visual data: when the rotation speed is low, the image acquisition is clearer and the credibility of visual features such as gap width is high. In this case, a higher weight is given to the gap width; when the rotation speed is high, the image is prone to motion blur, the error of visual features increases, and the pressure data is less affected by motion. In this case, the weight of the pressure value is increased.

[0113] The weight adjustment method is achieved through a preset weight coefficient function: the rotation speed is set as the independent variable, and the pressure weight and gap width weight are set as the dependent variables. When the speed increases, the pressure weight increases linearly and the gap width weight decreases linearly. The sum of the two weights is always 1 to ensure the normalization of the score.

[0114] The buckle deformation rate is a parameter that reflects the degree of buckle deformation. It is calculated by extracting the actual buckle contour through edge detection, comparing it with the standard buckle contour, and calculating the ratio of the maximum deformation distance of the two to the buckle reference length. The larger the deformation rate, the more severe the buckle deformation.

[0115] The overall score = (pressure value / preset pressure threshold) × pressure weight + (1 - gap width / preset gap threshold) × gap width weight + (1 - buckle deformation rate) × fixed weight. All parameters are normalized to a range of 0-1, and the fixed weight is used to balance the influence of deformation rate, ensuring that the score comprehensively reflects the status of pressure, gap, and deformation.

[0116] When the comprehensive score is lower than the preset score threshold, it is determined that the buckle assembly is abnormal, and the score result, abnormality type and abnormal location information are output.

[0117] The preset scoring threshold is a critical value determined based on the scoring data of a large number of qualified and unqualified samples. It represents the minimum scoring standard for qualified snap-on assembly. A value lower than this indicates that at least one indicator does not meet the requirements.

[0118] The logic for determining abnormal buckle assembly is as follows: the comprehensive score is a comprehensive reflection of pressure, gap, and deformation. When the score is lower than the preset threshold, it means that the buckle has defects in tightness, fit, or structural integrity, and is determined to be an assembly abnormality.

[0119] If the score of the pressure value contribution is too low, it is judged as insufficient pressure (false buckle); if the score of the gap width contribution is too low, it is judged as too large a gap (poor fitting); if the score of the buckle deformation rate contribution is too low, it is judged as buckle deformation (structural abnormality); if multiple parameters do not meet the standards, it is judged as a comprehensive assembly defect.

[0120] The specific value of the comprehensive score, the above-mentioned abnormality type, and the precise location of the abnormality on the buckle are output to provide a quantitative basis for defect location and rework in the production process.

[0121] Through the above process, the pressure-vision fusion judgment module realizes the deep fusion of pressure data and visual data. Through dynamic weight adjustment and comprehensive scoring, it effectively avoids the limitations of single data and significantly improves the accuracy of buckle assembly anomaly detection.

[0122] Specifically, such as Figures 1 to 4 As shown, the detection process of the sealing strip detection module includes receiving a fluorescent image of the sealing strip excited by an ultraviolet light source, locating the sealing strip area based on the overall outline of the socket, and extracting the strip outline through adaptive threshold segmentation.

[0123] A UV-excited seal strip fluorescence image is an image captured by color imaging equipment when a specific wavelength of UV light from a UV light source is irradiated on the seal strip of an energy storage socket. The fluorescent material contained in the seal strip is excited to produce visible fluorescence, which is then captured by color imaging equipment. In this type of image, the seal strip appears bright due to fluorescence, creating a significant grayscale difference from the non-fluorescent socket shell, facilitating subsequent area identification.

[0124] The process for locating the sealing strip area based on the overall socket outline is as follows: First, an edge detection algorithm is used to extract the overall outer contour of the energy storage socket. Then, based on the predetermined layout characteristics of the sealing strip on the socket, such as the distribution of the sealing strip along the socket edge, the area where the sealing strip may be located is delineated from the overall outline. For example, if the socket is rectangular, the sealing strip is typically distributed along all four sides of the rectangle. Based on the rectangular edge as a reference, the sealing strip is retracted inward a certain distance to match the width of the sealing strip to determine the initial detection area, ensuring that the positioning range covers the entire sealing strip.

[0125] Adaptive threshold segmentation for extracting the seal strip outline is an algorithm that dynamically adjusts the segmentation threshold based on the local grayscale distribution of the image. Unlike fixed threshold segmentation, it divides the image into multiple local regions and calculates a threshold for each region, such as the mean and standard deviation of the grayscale within the region. This can adapt to uneven fluorescence brightness, such as slightly lower fluorescence intensity at the corners of the sealing strip. In practice, adaptive threshold segmentation is applied to the image of the designated sealing strip area. Areas with grayscale values ​​above the local threshold are identified as the seal strip, while areas below the threshold are identified as the background. This allows the continuous seal strip outline to be extracted.

[0126] A skeleton extraction algorithm is used to obtain the central axis of the rubber strip, calculate the axis continuity, identify the areas within the contour whose grayscale value is higher than the preset grayscale threshold based on the mean value of the rubber strip, and calculate their area and circularity.

[0127] The skeleton extraction algorithm obtains the central axis of the rubber strip by performing morphological operations to extract a central curve from the rubber strip's outline that reflects its geometry. This algorithm repeatedly erodes the outline's edges while preserving its topological structure until a continuous curve with a single pixel width is obtained, representing the central axis. This central axis simplifies the rubber strip's shape, facilitating analysis of its continuity and direction.

[0128] Axis continuity is calculated by performing a break test on the extracted central axis and counting the lengths of continuous line segments along the axis. If a break exists (i.e., the distance between adjacent line segments exceeds a certain value), the ratio of the longest continuous line segment length to the total axis length is used as the continuity indicator. A lower ratio indicates a more severe break.

[0129] The process for identifying areas within the contour with grayscale values ​​above a preset grayscale threshold based on the mean value of the seal strip is as follows: The grayscale mean of all pixels within the contour of the seal strip is first calculated. A preset grayscale threshold is then set based on defect characteristics, such as bubbles appearing brighter due to light scattering. This threshold is typically 1.2-1.5 times the grayscale mean. Areas within the contour with grayscale values ​​above this threshold are marked as suspected defects, typically representing bubbles or impurities within the seal strip.

[0130] In calculating its area and circularity, the area is obtained by counting the number of pixels contained in the suspected defect area and combining the conversion coefficient between pixels and actual size; the circularity is obtained by the formula circularity = Area / Perimeter 2 Calculation: The closer the value is to 1, the closer the area is to a circle. Bubble defects are often nearly circular in shape and generally have a high degree of circularity, which can be used to distinguish them from other impurities.

[0131] When the axis continuity is lower than the preset continuity threshold, or the area and circularity are greater than the preset feature threshold, or the offset between the strip profile and the standard position template is greater than the preset offset threshold, the detection result of the sealing strip defect is output.

[0132] The preset continuity threshold is a minimum value determined based on the axis continuity statistics of qualified sealing strips. A value below this value indicates a break in the strip. For example, if the axis continuity of qualified sealing strips is ≥95%, the preset continuity threshold can be set to 90%. If the detected continuity is less than 90%, the sealing strip is considered broken.

[0133] Preset feature thresholds include area and circularity thresholds, both of which are set based on the grayscale fluctuation characteristics of normal rubber strips in qualified samples. The area threshold distinguishes valid defects from minor noise; the circularity threshold identifies bubble morphology. When both the area and circularity of a suspected defect exceed the corresponding thresholds, it is identified as a bubble in the sealing strip.

[0134] The offset between the strip contour and the standard position template is calculated by aligning the actual strip contour with the standard position template (based on the theoretical strip position profile generated from the design drawing). The preset offset threshold is the maximum allowable position deviation. If the offset exceeds this value, the strip assembly position deviates from the design requirements and is considered misaligned.

[0135] When outputting the inspection results of sealing strip defects, it is necessary to clearly define the defect type, such as breakage, bubble or misalignment, the specific location of the defect on the sealing strip, such as 50 mm from the left end of the sealing strip, and the defect parameters, such as breakage length, bubble diameter, and offset distance, to provide a clear basis for quality judgment and rework.

[0136] Through the above process, the sealing strip detection module utilizes the high-contrast characteristics of fluorescence imaging and combines it with multi-dimensional feature analysis to accurately identify defects such as sealing strip breakage, bubbles, and misalignment, effectively ensuring the sealing performance of the energy storage socket.

[0137] Specifically, such as Figures 1 to 4 As shown, it also includes a detection optimization step, comparing the output defect detection results of various types with the high-precision labeled sample images, and calculating the detection accuracy of different defect types; for defect types with a detection accuracy lower than a preset accuracy threshold, automatically extracting feature samples of the defect type, increasing its weight in the model training set, and adjusting the core parameters of the corresponding sub-model based on the parameter adjustment algorithm; redeploying the adjusted model to the detection process, using newly collected test samples for detection, and recalculating the accuracy of each defect type. If the accuracy is improved to above the preset accuracy threshold, the current model parameters are solidified; if the threshold is not reached, the above optimization process is repeated.

[0138] High-precision annotated sample images refer to images processed by professional quality inspectors or automated annotation systems. The types, locations, and boundaries of all defects in these images, such as hole position offset, coating oxidation, buckle anomalies, and sealing strip breakage, are accurately marked with pixel-level accuracy, serving as a benchmark for measuring the accuracy of inspection results.

[0139] The defect position output by the defect detection module is compared with the defect position marked in the sample image. When the coordinate deviation between the two is within the preset range, such as no more than 2 pixels, the detection is judged to be correct; if the detection module outputs a defect but there is no corresponding mark in the sample image, it is judged to be a false positive; if there is a mark in the sample image but the detection module does not output it, it is judged to be a false negative.

[0140] Detection accuracy is calculated by dividing the number of correctly detected defects by the total number of defects of that type in the sample image for each defect type. For example, if a sample image contains 100 hole shift defects and the detection module correctly identifies 92 of them, the detection accuracy for hole shift is 92%.

[0141] The preset accuracy threshold is the minimum qualification standard set according to the production requirements for detection accuracy. For example, it is set to 95%. When the detection accuracy of a certain type of defect is lower than 95%, the optimization process is triggered.

[0142] Automatically extracting characteristic samples of this defect type means screening out typical image areas of this type of defect from historical inspection data, such as hole array images of hole position offset and spectral images of copper pillars with oxidized coatings. These samples must contain defect features of different forms, such as hole position offsets of varying degrees and oxidized coating areas of varying areas, to ensure sample diversity.

[0143] Increasing its weight in the model training set means assigning a higher loss weight to characteristic samples of this type of defect during model training. For example, while the weight of a normal sample is 1.0, the weight of this type of defect sample is increased to 1.5-2.0. This allows the model to focus more on learning the characteristics of this type of sample during training, reducing misjudgments.

[0144] The parameter adjustment algorithm uses an improved version of the gradient descent algorithm. By calculating the loss between the model's predictions and the sample annotations, it adjusts the core parameters of the corresponding sub-model through backpropagation. Core parameters include convolutional kernel weights, activation function thresholds, and fully connected layer weights in the convolutional neural network. The goal of the adjustment is to minimize the loss and improve the ability to identify this type of defect.

[0145] Redeployment to the inspection process means loading the parameter-adjusted model into the inspection system of the production line to replace the original model to perform real-time inspection tasks. The deployment process must ensure that the model is compatible with the interfaces of the image acquisition and data processing modules, and that the switching time does not affect the production rhythm.

[0146] Newly collected test samples refer to recent production samples that were not used in model training. These samples can reflect the defect characteristics of the current production batch and avoid optimization bias caused by outdated training samples. The number of test samples must meet statistical requirements to ensure the reliability of accuracy calculations.

[0147] Solidifying the current model parameters means that when the detection accuracy of a certain type of defect increases above the preset accuracy threshold, the current parameters of the sub-model, such as convolution kernel weights and thresholds, are saved as a stable version as the benchmark parameters for subsequent detection to avoid model fluctuations caused by frequent adjustments.

[0148] Through the above optimization steps, the model can dynamically adapt to changes in defect characteristics during the production process, such as changes in coating oxidation characteristics caused by differences in material batches, and abnormal changes in the buckle morphology caused by fluctuations in the assembly process, continuously improving detection accuracy and ensuring long-term and stable satisfaction of production quality control needs.

[0149] An AI-based visual inspection system for the entire appearance of energy storage sockets, including: The detection image acquisition module adjusts the relative position of the imaging device and the energy storage socket according to the read specifications of the energy storage socket; uses a color imaging device to capture images of the upper and lower end faces, side faces, and socket hole array of the energy storage socket to obtain a socket sample image; uses a black and white imaging device combined with a multispectral component to capture images of the wiring copper pillar to obtain a copper pillar sample image; A data analysis and processing module performs image preprocessing on the socket sample images and the copper pillar sample images, and generates a model training data set through multi-field image stitching, key area feature extraction, and multispectral data processing; A socket defect detection module constructs a defect detection model based on the model training data set, and the defect detection model includes a hole position detection module, a plating detection module, a buckle detection module, and a sealing strip detection module; the real-time collected image of the energy storage socket to be inspected is input into the defect detection model, and a consistency check is performed based on the output results of each module, and finally a comprehensive detection result including defect type, defect location, and confidence level is output.

[0150] The above shows and describes the basic features, principles, and advantages of the present invention. It should be noted that the present invention is not limited to the above embodiments, which are only some embodiments. Without departing from the spirit and scope of the present invention, various improvements and supplements made are considered to be within the scope of protection of the present invention.

Claims

1. A method for visual inspection of the entire appearance of energy storage sockets based on AI algorithm, characterized in that: The steps include: In the detection image acquisition step, the relative position of the imaging device and the energy storage socket is adjusted according to the read specifications of the energy storage socket; the upper and lower end surfaces, side surfaces, and socket hole array of the energy storage socket are imaged by a color imaging device to obtain a socket sample image; the wiring copper pillar is imaged by a black and white imaging device combined with a multispectral component to obtain a copper pillar sample image; a data analysis and processing step, performing image preprocessing on the socket sample images and the copper pillar sample images, generating a model training data set through multi-field image stitching, key area feature extraction, and multispectral data processing; In the socket defect detection step, a defect detection model is constructed based on the model training data set, and the defect detection model includes a hole position detection module, a plating detection module, a buckle detection module, and a sealing strip detection module; the real-time collected image of the energy storage socket to be inspected is input into the defect detection model, and a consistency check is performed based on the output results of each module, and finally a comprehensive detection result including defect type, defect location, and confidence level is output.

2. The method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to claim 1 is characterized in that: The color imaging device is equipped with a dynamic focusing lens, which synchronously reads the real-time angle data of the rotating drive mechanism during the acquisition process. When the rotation angle changes to a preset angle threshold, the dynamic focusing lens automatically adjusts the focal length to compensate for the defocus caused by motion offset; the color imaging device is linked to the ultraviolet light source component, and adopts a segmented exposure mode for the sealing strip area, and the exposure intensity is dynamically adjusted with the curvature and rotation angle of the sealing strip; when rotating to the corresponding work station of the buckle, the color imaging device is synchronously triggered with the pressure sensing component to capture the appearance image of the buckle and record the associated data at the time of pressure acquisition; the black and white imaging device works synchronously with the multi-spectral component to perform time-series image acquisition on the wiring copper column, and its exposure parameters are dynamically adjusted with the rotation speed to avoid motion blur. A set of image data containing the copper column size and coating spectral characteristics is collected at each preset rotation angle interval.

3. The method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to claim 1 is characterized in that: The data analysis and processing steps include extracting features from the socket sample image to obtain a buckle area image, a hole position image, and a sealing strip image; establishing a rotation angle and pixel offset mapping model based on encoder data of the rotary drive mechanism, calibrating images collected at different angles, and completing multi-field motion compensation stitching; correcting the effect of the rotation angle on the spectral reflectance through polynomial fitting, correlating the corrected multispectral data with the dimensional data of the copper pillar sample image, and generating a two-dimensional feature matrix of size and spectrum; Motion blur is removed from the buckle area image, and the gap width between the buckle and the slot and the buckle deformation area after blur correction are extracted as buckle dynamic features.

4. The method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to claim 1 is characterized in that: The detection process of the hole position detection module includes receiving the socket hole array image after multi-field motion compensation stitching, removing noise through an image preprocessing algorithm, and calibrating the pixel coordinate system of the hole position area based on the rotation angle data; A high-precision edge detection algorithm is used to extract the inner edge contour of each socket hole, calculate the coordinates of the hole center, and map and align them with the hole coordinates in the standard template; the hole offset is identified through coordinate deviation calculation, and the area inside the hole is dynamically segmented. Morphological operations are combined to identify foreign objects in the hole, and the hole defect type and location information are output as the hole detection result.

5. The method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to claim 1 is characterized in that: The detection process of the plating detection module includes obtaining the connection copper pillar size data and the spectrum data of the multi-spectral component of the copper pillar sample image, and calibrating the coordinate system of the copper pillar image based on the position information output by the hole position detection module; The characteristic bands of coating oxidation are extracted through the characteristic band extraction algorithm, and the influence of angle offset on reflectivity is corrected by combining the rotation angle data. The corrected spectral data is fused with the size data to identify coating oxidation, scratches and pinhole defects, and the coating defect type and the associated copper pillar size deviation information are output.

6. The method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to claim 1 is characterized in that: The detection process of the buckle detection module includes receiving the buckle area image captured by the color imaging device and the contact pressure value synchronously collected by the pressure sensing component, locating the coordinate area of ​​the buckle in the image based on the position information of the hole detection module; extracting the gap contour between the buckle and the slot through an edge detection algorithm, calculating the average gap width and the buckle deformation curvature; establishing a pressure visual association model, and determining that the assembly is qualified when the contact pressure value is greater than a preset pressure threshold and the average gap width is less than the preset gap threshold; Otherwise, the abnormal type and location of the buckle are output.

7. The method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to claim 6 is characterized in that: The buckle detection module also includes a pressure-visual fusion judgment module, whose detection process includes: calibrating the time difference between the pressure acquisition time and the image acquisition time; when the time difference is greater than a preset difference value, calculating the pressure change within the time difference based on the rotation speed, and correcting the pressure value through an interpolation algorithm; adjusting the weights of the pressure value and the gap width according to the rotation speed, and calculating the comprehensive score of the buckle defect in combination with the gap width and the buckle deformation rate; when the comprehensive score is lower than the preset score threshold, it is determined that the buckle assembly is abnormal, and the score result, abnormality type and abnormal location information are output.

8. The method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to claim 1 is characterized in that: The detection process of the sealing strip detection module includes receiving a fluorescent image of the sealing strip excited by an ultraviolet light source, locating the sealing strip area based on the overall outline of the socket, and extracting the strip outline through adaptive threshold segmentation; using a skeleton extraction algorithm to obtain the central axis of the strip, calculating the axis continuity, identifying the area within the outline whose grayscale value is higher than a preset grayscale threshold based on the mean value of the strip, and calculating its area and circularity; when the axis continuity is lower than the preset continuity threshold, or the area and circularity are greater than the preset feature threshold, or the offset of the strip outline compared with the standard position template is greater than the preset offset threshold, the detection result of the sealing strip defect is output.

9. The method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to claim 1, characterized in that: It also includes a detection optimization step, comparing the output defect detection results of various types with high-precision labeled sample images, and calculating the detection accuracy of different defect types; for defect types with detection accuracy lower than the preset accuracy threshold, automatically extracting feature samples of the defect type, increasing its weight in the model training set, and adjusting the core parameters of the corresponding sub-model based on the parameter adjustment algorithm; redeploying the adjusted model to the detection process, using newly collected test samples for detection, and recalculating the accuracy of each defect type. If the accuracy is improved to above the preset accuracy threshold, the current model parameters are solidified; if the threshold is not reached, the above optimization process is repeated.

10. A system for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm, applicable to the method for visual inspection of the entire appearance of an energy storage socket based on an AI algorithm according to any one of claims 1 to 9, characterized in that: include: The detection image acquisition module adjusts the relative position of the imaging device and the energy storage socket according to the read specification parameters of the energy storage socket; The upper and lower end faces, side faces and socket hole array of the energy storage socket are imaged by a color imaging device to obtain a socket sample image; the wiring copper pillar is imaged by a black and white imaging device combined with a multispectral component to obtain a copper pillar sample image; A data analysis and processing module performs image preprocessing on the socket sample images and the copper pillar sample images, and generates a model training data set through multi-field image stitching, key area feature extraction and multispectral data processing; A socket defect detection module constructs a defect detection model based on the model training data set, and the defect detection model includes a hole position detection module, a plating detection module, a buckle detection module, and a sealing strip detection module; the real-time collected image of the energy storage socket to be inspected is input into the defect detection model, and a consistency check is performed based on the output results of each module, and finally a comprehensive detection result including defect type, defect location, and confidence level is output.

Citation Information

Patent Citations

  • Five-jack socket panel defect intelligent detection method and system based on machine vision

    CN114324350A

  • Pork intramuscular fat content portable determination method and device

    CN119715383A

  • PCB (Printed Circuit Board) defect detection method and system

    CN120446164A

  • System and method for image fusion

    US20040141659A1

  • Image Inspection Device

    US20180328855A1

Cited By

  • Appearance detection method and system for flat gasket of automobile oil pump

    CN121431372A

  • Injection molding part defect detection method based on collaborative operation of double mechanical arms

    CN121540727A