A machine vision-based online assembly defect detection system for thermal batteries
The online assembly defect detection system for thermal batteries based on machine vision utilizes high-pixel industrial cameras and image processing algorithms to achieve real-time detection of assembly defects, solving the problem that X-ray inspection cannot detect defects in a timely manner, and reducing production costs and time.
Patent Information
- Application Number
- CN202411187063.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-08-28
AI Technical Summary
Existing methods for detecting assembly defects in thermal batteries mainly rely on X-ray non-destructive testing, which cannot be performed in real time on the production line and has high environmental requirements. It also cannot detect and correct assembly defects in a timely manner, increasing production complexity and cost.
A machine vision-based online assembly defect detection system for thermal batteries was designed, comprising a thermal battery fixture group, a light source illumination system, an optical imaging system, an image acquisition system, and a computer processing system. The system utilizes a high-pixel industrial camera and image processing algorithms for real-time detection and identifies defects through multi-angle template matching.
It enables real-time detection of defects in thermal battery assembly, reducing production costs and time, avoiding radiation risks, and improving production efficiency and the timeliness of detection.
Smart Images

Figure CN119153718B_ABST
Abstract
Description
Technical Field
[0001] This invention pertains to thermal battery detection technology, and particularly relates to an online assembly defect detection system for thermal batteries based on machine vision. Background Technology
[0002] In the power supply field, primary batteries (such as thermal batteries) are the preferred choice for missile power supplies both domestically and internationally due to their advantages such as high power, long lifespan, and maintenance-free operation. However, because primary batteries are non-rechargeable, their electrical performance can only be verified through sampling, making it impossible to reduce risks to zero. Therefore, it is essential to effectively assess the safety and reliability of assembled thermal batteries and reserve batteries before they are put into service with weaponry. Currently, three main methods are used domestically and internationally to detect defects in thermal batteries: electrochemical performance testing, internal material structure and morphology testing, and X-ray non-destructive testing. However, electrochemical performance testing and internal material structure and morphology testing can no longer meet the military's testing requirements; X-ray testing is limited by the testing environment and cannot meet the needs of real-time testing on thermal battery production lines. Furthermore, X-ray testing is usually performed after the thermal battery is packaged, which cannot detect assembly defects in a timely manner, thus failing to effectively reduce manufacturing costs.
[0003] With the continuous advancement of machine vision technology, its application in product quality inspection on industrial production lines is becoming increasingly widespread, and using machine vision to replace quality inspectors for defect detection is gradually becoming a trend. Currently, the application of machine vision in surface defect detection is mainly concentrated on mass production industrial production lines, such as the processing and manufacturing of parts, fabrics, printed materials, integrated circuits, wheels, and glass.
[0004] There has been a great deal of research on the application of machine vision in the detection of surface defects of products, both at home and abroad. For example, Reference [1] designed an algorithm for the detection and classification of weld defects in thin-walled metal cans based on machine vision technology. The accuracy of weld defect identification and classification reached more than 95%, which can meet the requirements of real-time and continuous weld defect detection. Reference [2] proposed a method for detecting fruit peel defects using a machine vision system, which helps fruit packaging manufacturers to quickly and efficiently evaluate fruit quality and distinguish between good and bad fruits. The false detection rate of the system is only 1.7%. Reference [3] proposed an online monitoring system for surface defects of ceramic cans based on machine vision. Experiments show that the system can quickly and accurately detect whether there are defects in the target object.
[0005] Currently, the existing method for detecting defects in hot battery assembly is to inspect the packaged hot battery, that is, to use CT scanning of the battery stack to obtain X-ray images, and then to perform defect analysis based on the images. Reference [4] proposes a method to use CT scanning of the hot battery stack to obtain X-ray images, and to identify hot battery assembly defects based on the analysis of these images. By comparing and analyzing the defective individual hot battery cells with the correct template individual hot battery cells, and by using the self-comparison of the internal structural features of the hot battery cells, the detection of overall flip-chipping of individual hot battery cells, missing internal structure of individual hot battery cells, and incorrect structural order of individual hot battery cells is realized, and a non-destructive testing system is established.
[0006] The above methods for detecting assembly defects in thermal batteries have the following problems:
[0007] 1) Current methods for inspecting hot batteries utilize X-ray non-destructive testing (NDT) technology. Hot batteries packaged via CT scanning require the finished product to be sent separately to a CT scanner to acquire internal assembly images, which are then used for defect analysis. This method increases the complexity and time cost of the hot battery manufacturing process. Furthermore, this method is highly dependent on the testing environment and requires specific conditions.
[0008] 2) Due to the special properties of the materials used in thermal battery cells, these cells must be stored in a vacuum environment; otherwise, the battery materials will deteriorate. Therefore, using X-ray non-destructive testing technology to detect assembly defects in thermal batteries must be done after the thermal battery has been packaged. This method cannot detect and correct defects during the assembly process in a timely manner, which may lead to these assembly defects entering the next production stage or the market.
[0009] 3) Using X-rays to detect assembly defects in hot batteries cannot be directly applied to battery assembly lines; specialized X-ray equipment is required.
[0010] The equipment and operators involved are complex, and X-ray scanning equipment emits radiation, requiring strict safety precautions and demanding certain skills from operators.
[0011] References:
[0012] [1]Sun J, Li C, Wu XJ, et al. An effective method of weld defect detection and classification based on machine vision [J]. IEEE Transactions on Industrial Informatics, 2019, 15(12): 6322-6333.
[0013] [2]Wang L, Li A, Tian X.Detection of fruit skin defects using machinevision system[C] / / 2013Sixth International Conference on Business Intelligence and Financial Engineering.IEEE,2013:44-48.
[0014] [3]Bao N, Ran
[0015] [4] Zhou Wei, Xiao Xin, Wang Rui, Liu Zhibo, Yi Jilu. Defect detection of hot battery assembly based on image recognition [J]. Manufacturing Automation, 2022, 44(6):87-91. Summary of the Invention
[0016] To address the shortcomings in detecting assembly defects in thermal batteries, this invention provides an online assembly defect detection system for thermal batteries based on machine vision.
[0017] The present invention discloses an online assembly defect detection system for thermal batteries based on machine vision, comprising an online detection platform for thermal battery defect detection, a built-in thermal battery defect detection algorithm, and a thermal battery software interface.
[0018] The online inspection platform is a box-like structure, comprising a hot battery fixture assembly, a lighting system, an optical imaging system, an image acquisition system, and a computer processing system. The hot battery fixture assembly consists of a drawer panel at the bottom of the box structure, with hot battery clamps mounted in the center of the drawer panel for securing the hot batteries. The lighting system includes small and large ring light sources mounted vertically on a support frame inside the box; both ring light sources are vertically adjustable. The optical imaging system includes a high-resolution industrial camera and lens, which are also vertically adjustable. The industrial camera, small ring light source, and large ring light source are arranged sequentially from top to bottom, their centers aligned on a line and perpendicularly aligned with the hot battery being inspected. The image acquisition system includes a screen displaying the hot battery assembly defect output results and a window for operator interaction with the system. The computer processing system incorporates a built-in hot battery defect detection algorithm.
[0019] The built-in hot battery defect detection algorithm includes a correct hot battery detection template acquisition algorithm and a detection method for the battery stack under test.
[0020] The thermal battery software interface includes four interfaces: a visualization window interface, a data recording interface, an operation bar interface, and an assembly list output interface.
[0021] Furthermore, the drawer panel features an equidistant multi-circle hole design, the thermal battery clamp is designed with a V-groove, and both the drawer panel and the thermal battery clamp are made of plastic.
[0022] Furthermore, the industrial camera is a Hikvision MV-CH310-10TC-M58-NN industrial camera, with a lens model of MVL-LF3528-F and a focal length of 35mm.
[0023] Furthermore, the specific algorithm for acquiring the correct hot battery detection template is as follows:
[0024] Images of the thermal battery are captured using a high-resolution industrial camera, and the image of the thermal battery stack is manually selected and saved. Next, the battery stack image is converted to grayscale, and the highlight portion of each individual heating element is identified to obtain an image containing the highlight portion. Then, adaptive binarization processing is performed using the OTSU binarization algorithm, setting the portion of the image pixels larger than a threshold to white and the portion smaller than the threshold to black. Finally, noise in the binarized image is removed through opening and closing operations such as erosion and dilation.
[0025] Traverse each row of the binarized image and obtain the width of the highlight portion and the leftmost column number of each row; calculate the median of the highlight portion width and the leftmost column number of all rows, and use them as the width and starting point of the highlight portion, respectively; then, extend to the left by the width of the highlight portion to extract the region containing both the highlight portion and the non-highlight portion from the image.
[0026] The non-highlight portions of the captured image are processed to segment the first pile, the last pile, and the intermediate pile; then the intermediate pile is processed and the structures of the first and last piles are identified.
[0027] Furthermore, the specific steps for dividing the first pile, the last pile, and the intermediate pile are as follows:
[0028] S1.1: The non-highlight part of the battery stack is grayscaled, then a suitable threshold is selected based on the white pad for binarization, and then an opening and closing operation is performed to remove noise.
[0029] S1.2: Identification of the last pad of the first pile: Local processing is performed on the first one-sixth of the rows of the binarized image, each connected component is delineated and its area is calculated, and the three connected components with the largest areas are retained; Since the first pile contains two regional pads, an ignition plate and an electric ignition head assembly, the thickness difference between the first pile and the white negative electrode plate is relatively large, so the last connected component is the last pad of the first pile.
[0030] S1.3: Tail pile first pad identification: The last one-sixth of the rows of the binarized image are processed in a similar way to the first pile last pad identification. There are three pad regions in the tail pile, which are also significantly different in thickness from the white negative electrode sheet. The three connected regions with the largest areas are retained, and the first connected region is the first pad of the tail pile.
[0031] S1.4: First, last, and middle pile segmentation: The part above the bottom edge of the connected domain of the last pad of the first pile is the first pile; the part below the bottom edge of the connected domain of the last pad of the first pile and the part above the top edge of the connected domain of the last pile are the middle piles; the part below the top edge of the connected domain of the last pile is the last pile.
[0032] Furthermore, the specific steps for intermediate heap processing are as follows:
[0033] S2.1: Identification of the middle lead-out piece and segmentation of the upper and lower stacks: Due to the structure of the middle lead-out piece, its visual characteristic is yellow, and the lead-out piece is located in the middle of the entire middle stack. One-tenth of the middle stack is extracted for local region analysis. First, this local region is converted into an HSV image. Based on the specific characteristics of the three HSV channels represented by yellow, the location of the lead-out piece is identified. The average pixel value of each row is calculated. The row with the largest average value is the row for segmenting the upper and lower stacks. The part above the row with the largest average value is the upper stack, and the part below it is the lower stack.
[0034] S2.2: Individual Segmentation: Perform individual segmentation on the upper and lower stacks segmented above; first, extract the highlight portions of the upper and lower stacks, as a single heating element will exhibit reflective visual characteristics under ring light illumination; first, perform highlight recognition on the single heating element, and then perform OTSU binarization (adaptive binarization) on the image based on highlight recognition; count the number of pixels with a grayscale value of 255 in each row, and when the number of pixels with a grayscale value of 255 in the first five rows is greater than 0, and the number of pixels with a grayscale value of 255 in the last three rows is equal to 0, this is the segmentation row for each individual; then, segment the individual based on the segmentation rows of each individual.
[0035] S2.3: Internal segmentation of a single unit, including single heating element identification, composite element identification, and negative electrode identification: Due to the reflective characteristics of a single heating element, each unit image is first processed for highlights, followed by adaptive binarization. Next, the number of pixels with a grayscale value of 255 in each row is counted; if the number is greater than 0, the row is determined to contain a single heating element. The grayscale value of the row corresponding to the single heating element in each column of the previously cropped unit image is set to 0, i.e., it is set to black. The image is binarized, and then each pixel undergoes non-linear grayscale adjustment. The non-linear grayscale adjustment method is as follows:
[0036] a. Pixels with a grayscale value greater than 0 and less than 60 are set to 0.5 times their current grayscale value;
[0037] b. Pixels with a grayscale value greater than or equal to 60 and less than 80 are set to 1.25 times their current grayscale value;
[0038] c. Pixels with a grayscale value greater than or equal to 80 and less than 120 are set to 1.5 times their current grayscale value;
[0039] d. Pixels with a grayscale value greater than or equal to 150 and less than 250 are set to twice their current grayscale value;
[0040] After adjustment, the average gray value of each row of pixels is calculated. If the average gray value of the first four rows is 0 and the average gray value of the last four rows is greater than 0, it is identified as a single heating element; if the average gray value of the first four rows is less than 100 and the average gray value of the last four rows is greater than 100, it is identified as a composite element; if the average gray value of the first four rows is not 0 and the average gray value of the last four rows is greater than 0, it is identified as a negative electrode.
[0041] S2.4: Output the assembly list based on the category and quantity of each structure identified for each unit.
[0042] Furthermore, the identification of each structure in the head and tail piles is as follows:
[0043] For the structure recognition of the first and last piles, the images of their non-highlight parts are first extracted and then grayscaled. Then, binarization is performed based on the white features of the pads. Due to camera distortion, the images of cylindrical objects will be tilted: the structure of the first pile image is slightly tilted from the upper left to the lower right, while the structure of the last pile image is slightly tilted from the lower left to the upper right. Therefore, only the average pixel grayscale value of half a column of the non-highlight part of each row is calculated.
[0044] For the first reactor, the structure includes end heaters, upper fixing bands, gaskets, ignition plates, and electric ignition head assemblies. The gaskets, ignition plates, and electric ignition head assemblies are visually white, while the end heaters and upper fixing bands are visually black. These color characteristics are used to distinguish the gaskets from the end heaters and upper fixing bands. The ignition plates are tightly integrated with the electric ignition head assemblies, and the thickness of the ignition plates is much smaller than the thickness of the electric ignition head assemblies. The combined thickness of the two is also much greater than the thickness of the gaskets. Therefore, these thickness differences are used to identify the ignition plates, electric ignition head assemblies, and gaskets.
[0045] For the tail stack, the identification method is similar to that for the top stack; the tail stack includes a lower fixing band, a gasket, and an end heating plate; the gasket is visually white, while the end heating plate and the lower fixing band are visually black; the gasket, end heating plate, and lower fixing band are identified based on these characteristics.
[0046] Furthermore, the detection method for the fuel cell stack under test is achieved through multi-angle template matching. The specific steps of multi-angle template matching are as follows:
[0047] S3.1: Perform pyramid downsampling twice on the template battery stack image and the image of the battery to be matched with the template.
[0048] S3.2: For the image of the fuel cell stack without a rotating template and the image of the battery to be matched with the template, perform the first template matching, record the suitability of the current matching, and consider it as the most suitable matching degree.
[0049] S3.3: First, rotate the template battery image 5° to the left, then perform template matching. Compare the matching degree with the most suitable template matching degree. If it is greater than the most suitable template matching degree, record the current angle and let the matching degree replace the most suitable template matching degree. Then rotate 0.1° to the right and perform the above comparison process to obtain the maximum matching degree and record the rotation angle of the template battery.
[0050] After obtaining the battery stack, the correct thermal battery test template test process is carried out. The test data is compared with the test data of the correct template battery stack. If any inconsistency is found, it is marked in red in the assembly list output table.
[0051] Furthermore, the thermal battery software interface was developed on a Windows 11 system using Visual C++ on the QT platform, and includes four interfaces:
[0052] The visual window interface is used for real-time display of hot batteries captured by high-pixel industrial cameras, display of the battery stack in the hot battery, and selection of the shooting template to obtain the correct template battery stack.
[0053] The data logging interface is used to record the thermal battery test log, the thermal battery stack test time, the model of the thermal battery stack tested, and the test results.
[0054] The assembly list output interface is used to display the order and quantity of each structure in the thermal battery.
[0055] The operation bar interface is used to adjust various parameters and control image capture.
[0056] Furthermore, the operation process of the interactive software of the online detection platform is as follows:
[0057] S4.1: In the thermal battery production line, the assembled but unsealed semi-finished thermal battery is placed on the drawer plate fixture of the equipment.
[0058] S4.2: Close the drawer panel, click "Template" and select "Shoot Template".
[0059] S4.3: Select the thermal battery stack in the visualization window, and then click the "Detect" button.
[0060] S4.4: After the assembly list is generated, click "Save" to save the template data for the test.
[0061] S4.5: Click the "Detect" button below "Battery Parameters" to take a picture.
[0062] The beneficial technical effects of this invention are as follows:
[0063] This invention utilizes a high-resolution industrial camera instead of X-ray scanning equipment to acquire thermoelectric image data, avoiding problems such as radiation and complex data acquisition. Furthermore, the image data acquisition has low environmental requirements and can be directly used on the thermoelectric battery production line, making data acquisition convenient. If assembly defects are detected, the assembly sequence can be changed promptly to prevent defects and reduce scrap costs, thereby lowering overall production costs. Additionally, this inspection system can inspect each thermoelectric battery in real time, eliminating the need for separate inspection equipment, reducing inspection time, and improving overall production efficiency. Attached Figure Description
[0064] Figure 1 This is a schematic diagram of the structure of an online defect detection platform for thermal batteries.
[0065] Figure 2 This is a schematic diagram of the thermal battery clamp assembly structure.
[0066] Figure 3 This is a flowchart for splitting the head and tail heaps.
[0067] Figure 4 A flowchart for identifying the intermediate structures.
[0068] Figure 5 This is the basic workflow of a thermal battery defect detection algorithm.
[0069] Figure 6 This is a schematic diagram of the software interface for a thermal battery.
[0070] Figure 7 This is a flowchart illustrating the operation of the interactive software for the online testing platform. Detailed Implementation
[0071] The present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0072] The present invention discloses an online assembly defect detection system for thermal batteries based on machine vision, comprising an online detection platform for thermal battery defect detection, a built-in thermal battery defect detection algorithm, and a thermal battery software interface.
[0073] like Figure 1 As shown, the online detection platform is a box structure, including a thermal battery fixture assembly, a light source illumination system, an optical imaging system, an image acquisition system, and a computer processing system.
[0074] The thermal battery clamping assembly consists of a drawer plate 1 located at the bottom of the housing structure. A thermal battery clamp 2 is installed in the middle of drawer plate 1 to secure the thermal battery 3. When a worker needs to place the thermal battery 3, they simply pull out drawer plate 1, accurately place the thermal battery 3, and then close the drawer. Drawer plate 1 features a design with equidistant multi-circular holes, such as... Figure 2 As shown, the distance between the fixtures can be adjusted according to the size of the thermal battery to properly position the thermal battery stack. Thermal battery fixture 2 is designed with a V-groove, suitable for fixing cylindrical thermal battery stacks. The V-groove ensures that the thermal battery 3 remains fixed during drawer opening and closing. The fixtures are made of plastic instead of carbon steel to prevent the influence of carbon steel on the thermal battery performance during testing.
[0075] The lighting system includes a small ring light source 5 and a large ring light source 8, vertically mounted on a bracket 4 inside the housing. Both ring light sources 5 and 8 are vertically adjustable. These light sources are designed to provide sufficient illumination for the battery stack during camera shooting. The large ring light source 8 provides overall illumination, ensuring that every part of the battery stack is lit and that the structural heating elements within the thermal battery stack fully reflect light. The small ring light source 5 eliminates the shadows cast on the battery stack by the large ring light source. Two ring light sources are used because using only one would result in a ring-shaped shadow on the thermal battery stack. By adding a small ring light source that extends through the camera, the shadow areas created by the large ring light source can be effectively compensated for.
[0076] The optical imaging system includes a high-resolution industrial camera 6 and a lens, which can be adjusted vertically via an adjustment device 7. The industrial camera 6 is a Hikvision MV-CH310-10TC-M58-NN model, and the lens is an MVL-LF3528-F model with a focal length of 35mm. A high-resolution industrial camera was chosen because the thermal battery cell has a layered structure with very thin layers.
[0077] The industrial camera 6, the small ring light source 5, and the large ring light source 8 are arranged from top to bottom, with their centers on a line and vertically aligned with the thermal battery 3 being photographed.
[0078] The image acquisition system includes screen 9, which is used to display the output results of hot battery assembly defects and the window for operators to interact with the system.
[0079] The computer processing system incorporates a built-in hot cell defect detection algorithm. This algorithm includes a correct hot cell detection template acquisition algorithm and a method for detecting the cell stack under test.
[0080] The thermal battery software interface includes four interfaces: a visualization window interface, a data recording interface, an operation bar interface, and an assembly list output interface.
[0081] Furthermore, the specific algorithm for acquiring the correct hot battery detection template is as follows:
[0082] Images of the hot battery are captured using a high-resolution industrial camera. The hot battery stack image is manually selected and saved for subsequent multi-angle template matching of the battery to be inspected. The purpose of this step is to remove the external environment of the non-hot battery stack, as the assembly defect detection in this system mainly targets the hot battery stack. Next, the battery stack image is grayscaled, and the highlight portion of each heating element is identified to obtain an image containing the highlight portion. Then, adaptive binarization processing is performed using the OTSU binarization algorithm (Otsu method - maximum inter-class variance method), setting the portion of the image pixels greater than the threshold to white (255) and the portion less than the threshold to black (0). Finally, noise in the binarized image is removed through opening and closing operations such as erosion and dilation.
[0083] Traverse each row of the binarized image and obtain the width of the highlight portion and the leftmost column number of each row; calculate the median of the highlight portion width and the leftmost column number of all rows, and use them as the width and starting point of the highlight portion, respectively; then, extend to the left by the width of the highlight portion to extract the region containing both the highlight portion and the non-highlight portion from the image.
[0084] The non-highlight portions of the captured image are processed to segment the first pile, the last pile, and the intermediate pile; then the intermediate pile is processed and the structures of the first and last piles are identified.
[0085] Furthermore, Figure 3 The flowchart for splitting the head and tail heaps is as follows:
[0086] S1.1: The non-highlight part of the battery stack is grayscaled, then a suitable threshold is selected based on the white pad for binarization, and then an opening and closing operation is performed to remove noise.
[0087] S1.2: Identification of the last pad of the first pile: Local processing is performed on the first one-sixth of the rows of the binarized image, each connected component is delineated and its area is calculated, and the three connected components with the largest areas are retained; since the first pile contains two regional pads and an ignition plate and an electric ignition head assembly (with a large area), the thickness difference between it and the white negative electrode plate is relatively large, so the last connected component is the last pad of the first pile.
[0088] S1.3: Tail pile first pad identification: The last one-sixth of the rows of the binarized image are processed in a similar way to the first pile last pad identification. There are three pad regions in the tail pile, which are also significantly different in thickness from the white negative electrode sheet. The three connected regions with the largest areas are retained, and the first connected region is the first pad of the tail pile.
[0089] S1.4: First, last, and middle pile segmentation: The part above the bottom edge of the connected domain of the last pad of the first pile is the first pile; the part below the bottom edge of the connected domain of the last pad of the first pile and the part above the top edge of the connected domain of the last pile are the middle piles; the part below the top edge of the connected domain of the last pile is the last pile.
[0090] In this way, by processing the non-highlight parts of the image, effective segmentation of the first pile, the last pile, and the middle pile can be achieved.
[0091] Furthermore, the intermediate heap processing flow is as follows: Figure 4 As shown, the specific steps are as follows:
[0092] S2.1: Identification of the middle lead-out piece and segmentation of the upper and lower stacks: Due to the structure of the middle lead-out piece, its visual characteristic is yellow, and the lead-out piece is located in the middle of the entire middle stack. One-tenth of the middle stack is extracted for local region analysis. First, this local region is converted into an HSV image. Based on the specific characteristics of the three HSV channels represented by yellow, the location of the lead-out piece is identified. The average pixel value of each row is calculated. The row with the largest average value is the row for segmenting the upper and lower stacks. The part above the row with the largest average value is the upper stack, and the part below it is the lower stack.
[0093] S2.2: Individual Segmentation: Perform individual segmentation on the upper and lower stacks segmented above; first, extract the highlight portions of the upper and lower stacks, as a single heating element will exhibit reflective visual characteristics under ring light illumination; first, perform highlight recognition on the single heating element, and then perform OTSU binarization (adaptive binarization) on the image based on highlight recognition; count the number of pixels with a grayscale value of 255 in each row, and when the number of pixels with a grayscale value of 255 in the first five rows is greater than 0, and the number of pixels with a grayscale value of 255 in the last three rows is equal to 0, this is the segmentation row for each individual; then, segment the individual based on the segmentation rows of each individual.
[0094] S2.3: Internal segmentation of a single unit, including single heating element identification, composite element identification, and negative electrode identification: Due to the reflective characteristics of a single heating element, each unit image is first processed for highlights, followed by adaptive binarization. Next, the number of pixels with a grayscale value of 255 in each row is counted; if the number is greater than 0, the row is determined to contain a single heating element. The grayscale value of the row corresponding to the single heating element in each column of the previously cropped unit image is set to 0, i.e., it is set to black. The image is binarized, and then each pixel undergoes non-linear grayscale adjustment. The non-linear grayscale adjustment method is as follows:
[0095] a. Pixels with a grayscale value greater than 0 and less than 60 are set to 0.5 times their current grayscale value;
[0096] b. Pixels with a grayscale value greater than or equal to 60 and less than 80 are set to 1.25 times their current grayscale value;
[0097] c. Pixels with a grayscale value greater than or equal to 80 and less than 120 are set to 1.5 times their current grayscale value;
[0098] d. Pixels with a grayscale value greater than or equal to 150 and less than 250 are set to twice their current grayscale value;
[0099] After adjustment, the average gray value of each row of pixels is calculated. If the average gray value of the first four rows is 0 and the average gray value of the last four rows is greater than 0, it is identified as a single heating element; if the average gray value of the first four rows is less than 100 and the average gray value of the last four rows is greater than 100, it is identified as a composite element; if the average gray value of the first four rows is not 0 and the average gray value of the last four rows is greater than 0, it is identified as a negative electrode.
[0100] S2.4: Output the assembly list based on the category and quantity of each structure identified for each unit.
[0101] Furthermore, the identification of each structure in the head and tail piles is as follows:
[0102] For the structure recognition of the first and last piles, the images of their non-highlight parts are first extracted and then grayscaled. Then, binarization is performed based on the white features of the pads. Due to camera distortion, the images of cylindrical objects will be tilted: the structure of the first pile image is slightly tilted from the upper left to the lower right, while the structure of the last pile image is slightly tilted from the lower left to the upper right. Therefore, only the average pixel grayscale value of half a column of the non-highlight part of each row is calculated.
[0103] For the first reactor, the structure includes end heaters, upper fixing bands, gaskets, ignition plates, and electric ignition head assemblies. The gaskets, ignition plates, and electric ignition head assemblies are visually white, while the end heaters and upper fixing bands are visually black. These color characteristics are used to distinguish the gaskets from the end heaters and upper fixing bands. The ignition plates are tightly integrated with the electric ignition head assemblies, and the thickness of the ignition plates is much smaller than the thickness of the electric ignition head assemblies. The combined thickness of the two is also much greater than the thickness of the gaskets. Therefore, these thickness differences are used to identify the ignition plates, electric ignition head assemblies, and gaskets.
[0104] For the tail stack, the identification method is similar to that for the top stack; the tail stack includes a lower fixing band, a gasket, and an end heating plate; the gasket is visually white, while the end heating plate and the lower fixing band are visually black; the gasket, end heating plate, and lower fixing band are identified based on these characteristics.
[0105] Furthermore, the detection method for the fuel cell stack under test is achieved through multi-angle template matching. The specific steps of multi-angle template matching are as follows:
[0106] S3.1: Perform pyramid downsampling twice on the template battery stack image and the image of the battery to be matched with the template.
[0107] S3.2: For the image of the fuel cell stack without a rotating template and the image of the battery to be matched with the template, perform the first template matching, record the suitability of the current matching, and consider it as the most suitable matching degree.
[0108] S3.3: First, rotate the template battery image 5° to the left, then perform template matching. Compare the matching degree with the most suitable template matching degree. If it is greater than the most suitable template matching degree, record the current angle and let the matching degree replace the most suitable template matching degree. Then rotate 0.1° to the right and perform the above comparison process to obtain the maximum matching degree and record the rotation angle of the template battery.
[0109] After obtaining the battery stack, the correct thermal battery test template test process is carried out. The test data is compared with the test data of the correct template battery stack. If any inconsistency is found, it is marked in red in the assembly list output table.
[0110] Therefore, the basic process of the thermal battery defect detection algorithm proposed in this system can be summarized as follows: Figure 5 As shown.
[0111] Furthermore, the thermal battery software interface is developed on a Windows 11 system using Visual C++ and implemented on the QT platform. The software interface is as follows: Figure 6 As shown, it includes four interfaces: a visualization window interface, a data recording interface, an operation bar interface, and an assembly list output interface.
[0112] The visual window interface is used for real-time display of hot batteries captured by high-pixel industrial cameras, display of the battery stack in the hot battery, and selection of the shooting template to obtain the correct template battery stack.
[0113] The data logging interface is used to record the thermal battery test log, the thermal battery stack test time, the model of the thermal battery stack tested, and the test results.
[0114] The assembly list output interface is used to display the order and quantity of each structure in the thermal battery.
[0115] The operation bar interface is used to adjust various parameters and control image capture.
[0116] Furthermore, the operation process of the interactive software of the online detection platform is as follows: Figure 7 As shown, specifically:
[0117] S4.1: In the thermal battery production line, the assembled but unsealed semi-finished thermal battery is placed on the drawer plate fixture of the equipment.
[0118] S4.2: Close the drawer panel, click "Template" and select "Shoot Template".
[0119] S4.3: Select the thermal battery stack in the visualization window, and then click the "Detect" button.
[0120] S4.4: After the assembly list is generated, click "Save" to save the template data for the test.
[0121] S4.5: Click the "Detect" button below "Battery Parameters" to take a picture.
[0122] Only one template needs to be saved for each model, eliminating the need to re-detect the template every time a shot is taken. When the data of the battery to be tested does not match the data of the correct template, it will be marked in red in the list.
[0123] This invention has the following characteristics:
[0124] 1. The method for acquiring thermal battery image data in the online thermal battery assembly defect detection system proposed in this invention is through a high-pixel industrial camera, rather than through CT scanning equipment, which can largely avoid radiation and harm to the human body, and also save time.
[0125] 2. An online hot battery assembly defect detection system is proposed, which can be directly used on the hot battery assembly line. If a hot battery assembly defect is found, the assembly order of the battery cells can be changed in time to ensure the correct assembly of the battery, which can greatly reduce production costs and production time.
[0126] This invention proposes a machine vision-based online assembly defect detection system for hot batteries. This novel system can be used on hot battery assembly lines to directly inspect semi-finished batteries. Unlike previous CT-scan-based methods for inspecting individual hot battery cells, which only inspect finished hot batteries and require scrapping if assembly defects are detected, this invention allows for timely modification of detected assembly defects, saving production costs and improving economic efficiency. Furthermore, the detection platform is specifically designed for detecting hot battery assembly defects. Since the inspected hot batteries have a cylindrical shape, the fixture is designed with a V-groove for easy horizontal placement of the battery stack.
Claims
1. A machine vision-based online assembly defect detection system for thermal batteries, characterized in that, It includes an online detection platform for thermal battery defects, with built-in thermal battery defect detection algorithms and a thermal battery software interface; The online detection platform is a box structure, including a thermal battery fixture assembly, a light source illumination system, an optical imaging system, an image acquisition system, and a computer processing system; The thermal battery clamping assembly consists of a drawer plate (1) at the bottom of the housing structure, with a thermal battery clamp (2) installed in the middle of the drawer plate (1) for fixing the thermal battery (3); the light source illumination system includes a small ring light source (5) and a large ring light source (8) set vertically on a bracket (4) inside the housing, which can be adjusted vertically; the optical imaging system includes a high-pixel industrial camera (6) and a lens, which can be adjusted vertically via an adjustment device (7); the industrial camera (6), the small ring light source (5), and the large ring light source (8) are arranged sequentially from top to bottom, with their centers on a line and vertically aligned with the thermal battery (3) being photographed; the image acquisition system includes a screen (9), which is used to display the output results of thermal battery assembly defects and a window for operators to interact with the system; the computer processing system has a built-in thermal battery defect detection algorithm; The built-in thermal battery defect detection algorithm includes a correct thermal battery detection template acquisition algorithm and a method for detecting the battery stack under test. The specific algorithm for acquiring the correct hot battery detection template is as follows: Images of the thermal battery are captured using a high-resolution industrial camera. The images of the thermal battery stack are then manually selected and saved. Next, the images of the battery stack are converted to grayscale, and the highlight areas of individual heating elements are identified to obtain images containing these highlight areas. Then, adaptive binarization is performed using the OTSU binarization algorithm, setting the portion of the image pixels larger than the threshold to white and the portion smaller than the threshold to black; finally, noise in the binarized image is removed through opening and closing operations such as erosion and dilation. Iterate through each row of the binarized image and obtain the width of the highlight portion and the leftmost column number of each row; Calculate the width of the highlight portion of all rows and the median of the leftmost column number, and use them as the width and starting point of the highlight portion, respectively; Then, extend to the left by the width of the highlight area to crop the region from the image that includes both the highlight and non-highlight areas; The non-highlight portions of the captured image are processed to segment the first pile, the last pile, and the intermediate pile; then the intermediate pile is processed and the structures of the first and last piles are identified. The thermal battery software interface includes four interfaces: a visualization window interface, a data recording interface, an operation bar interface, and an assembly list output interface.
2. The online assembly defect detection system for thermal batteries based on machine vision according to claim 1, characterized in that, The drawer plate (1) adopts an equidistant multi-circular hole design, and the thermal battery clamp (2) is designed as a V-groove. The materials of the drawer plate (1) and the thermal battery clamp (2) are plastic.
3. The online assembly defect detection system for thermal batteries based on machine vision according to claim 1, characterized in that, The industrial camera (6) is a Hikvision MV-CH310-10TC-M58-NN industrial camera with a lens model of MVL-LF3528-F and a focal length of 35mm.
4. The online assembly defect detection system for thermal batteries based on machine vision according to claim 1, characterized in that, The specific steps for dividing the first pile, the last pile, and the intermediate pile are as follows: S1.1: The non-highlight part of the battery stack is grayscaled, then a suitable threshold is selected based on the white pad for binarization, and then an opening and closing operation is performed to remove noise. S1.2: Identification of the last pad of the first pile: Local processing is performed on the first one-sixth of the rows of the binarized image, each connected component is delineated and its area is calculated, and the three connected components with the largest areas are retained; Since the first pile contains two regional pads, an ignition plate and an electric ignition head assembly, the thickness difference between the first pile and the white negative electrode plate is relatively large, so the last connected component is the last pad of the first pile. S1.3: Tail pile first pad identification: The last one-sixth of the rows of the binarized image are processed in a similar way to the first pile last pad identification. The tail pile has three pad regions, which are also significantly different in thickness from the white negative electrode sheet. The three connected regions with the largest areas are retained, and the first connected region is the tail pile first pad. S1.4: First, last, and middle pile segmentation: The part above the bottom edge of the connected domain of the last pad of the first pile is the first pile; the part below the bottom edge of the connected domain of the last pad of the first pile and the part above the top edge of the connected domain of the last pile are the middle piles; the part below the top edge of the connected domain of the last pile is the last pile.
5. The online assembly defect detection system for thermal batteries based on machine vision according to claim 1, characterized in that, The specific steps for intermediate stack processing are as follows: S2.1: Identification of the middle lead-out piece and segmentation of the upper and lower stacks: Due to the structure of the middle lead-out piece, its visual characteristic is yellow, and the lead-out piece is located in the middle of the entire middle stack. One-tenth of the middle stack is extracted for local region analysis. First, this local region is converted into an HSV image. Based on the specific characteristics of the three HSV channels represented by yellow, the location of the lead-out piece is identified. The average pixel value of each row is calculated. The row with the largest average value is the row for segmenting the upper and lower stacks. The part above the row with the largest average value is the upper stack, and the part below it is the lower stack. S2.2: Individual segmentation: Perform individual segmentation on the upper and lower stacks segmented above; first, extract the highlight parts of the upper and lower stacks. Since a single heating element will exhibit reflective visual characteristics under the illumination of a ring light source, first perform highlight recognition on the single heating element, and then perform OTSU binarization, i.e., adaptive binarization, on the image based on highlight recognition. Count the number of pixels with a grayscale value of 255 in each row. When the number of pixels with a grayscale value of 255 in the first five rows is greater than 0, and the number of pixels with a grayscale value of 255 in the last three rows is equal to 0, this is the segmentation row for each individual unit. Then, individual units are segmented based on the segmentation rows of each individual unit. S2.3: Internal segmentation of a single unit, including single heating element identification, composite element identification, and negative electrode identification: Since the single heating element has reflective characteristics, each unit image is first processed for highlights, and then adaptive binarization is performed; next, the number of pixels with a grayscale value of 255 in each row is counted. If the number is greater than 0, it is determined that the row contains a single heating element; the grayscale value of the row corresponding to the single heating element in each column of the previously cropped unit image is set to 0, that is, it is set to black; the image is binarized, and then the grayscale of each pixel is non-linearly adjusted. The grayscale non-linear adjustment method is as follows: a. Pixels with a grayscale value greater than 0 and less than 60 are set to 0.5 times their current grayscale value; b. Pixels with a grayscale value greater than or equal to 60 and less than 80 are set to 1.25 times their current grayscale value; c. Pixels with a grayscale value greater than or equal to 80 and less than 120 are set to 1.5 times their current grayscale value; d. Pixels with a grayscale value greater than or equal to 150 and less than 250 are set to twice their current grayscale value; After adjustment, the average grayscale value of each row of pixels is calculated. If the average grayscale value of the first four rows is 0 and the average grayscale value of the last four rows is greater than 0, it is identified as a single heating element; if the average grayscale value of the first four rows is less than 100 and the average grayscale value of the last four rows is greater than 100, it is identified as a composite element; if the average grayscale value of the first four rows is not 0 and the average grayscale value of the last four rows is greater than 0, it is identified as a negative electrode element. S2.4: Output the assembly list based on the category and quantity of each structure identified for each unit.
6. The online assembly defect detection system for thermal batteries based on machine vision according to claim 1, characterized in that, The identification of each structure in the head and tail piles is specifically as follows: For the structure recognition of the first and last piles, the images of their non-highlight parts are first extracted and then grayscaled. Then, binarization is performed based on the white features of the pads. Due to camera distortion, the images of cylindrical objects will be tilted: the structure of the first pile image is slightly tilted from the upper left to the lower right, while the structure of the last pile image is slightly tilted from the lower left to the upper right. Therefore, only the average pixel grayscale value of half a column of the non-highlight part of each row is calculated. For the first reactor, the structure includes end heaters, upper fixing bands, gaskets, ignition plates, and electric ignition head assemblies. The gaskets, ignition plates, and electric ignition head assemblies are visually white, while the end heaters and upper fixing bands are visually black. These color characteristics are used to distinguish the gaskets from the end heaters and upper fixing bands. The ignition plates are tightly integrated with the electric ignition head assemblies, and the thickness of the ignition plates is much smaller than the thickness of the electric ignition head assemblies. The combined thickness of the two is also much greater than the thickness of the gaskets. Therefore, these thickness differences are used to identify the ignition plates, electric ignition head assemblies, and gaskets. For the tail stack, the identification method is similar to that for the top stack; the tail stack includes a lower fixing band, a gasket, and an end heating plate; the gasket is visually white, while the end heating plate and the lower fixing band are visually black; the gasket, end heating plate, and lower fixing band are identified based on these characteristics.
7. The online assembly defect detection system for thermal batteries based on machine vision according to claim 1, characterized in that, The method for detecting the fuel cell stack under test is achieved through multi-angle template matching. The specific steps of multi-angle template matching are as follows: S3.1: Perform pyramid downsampling twice on the template battery stack image and the image of the battery to be matched with the template; S3.2: For the image of the fuel cell stack without a rotating template and the image of the battery to be matched with the template, perform the first template matching, record the suitability of the current matching, and consider it as the most suitable matching degree; S3.3: First, rotate the template stack image 5° to the left, then perform template matching. Compare the matching suitability with the most suitable template matching degree. If it is greater than the most suitable template matching degree, record the current angle and let the matching suitability replace the most suitable template matching degree. Rotate 0.1° to the right sequentially, then perform the above comparison process to obtain the maximum matching degree and record the rotation angle of the template battery; After obtaining the battery stack, the correct thermal battery test template test process is carried out. The test data is compared with the test data of the correct template battery stack. If any inconsistency is found, it is marked in red in the assembly list output table.
8. The online assembly defect detection system for thermal batteries based on machine vision according to claim 1, characterized in that, The thermal battery software interface is implemented on a Windows 11 system using Visual C++ on the QT platform, and includes four interfaces: The visual window interface is used for real-time display of hot batteries captured by high-pixel industrial cameras, display of the battery stack in the hot battery, and selection of the shooting template to obtain the correct template battery stack. The data logging interface is used to record the thermal battery test log, the thermal battery stack test time, the model of the thermal battery stack tested, and the test results; The assembly list output interface is used to display the order and quantity of each structure in the thermal battery; The operation bar interface is used to adjust various parameters and control image capture.
9. The online assembly defect detection system for thermal batteries based on machine vision according to claim 8, characterized in that, The operation process of the interactive software of the online detection platform is as follows: S4.1: In the thermal battery production line, the assembled but unsealed semi-finished thermal battery is placed on the drawer plate fixture of the equipment; S4.2: Close the drawer panel, click "Template" and select "Shoot Template"; S4.3: Select the thermal battery stack in the visualization window, and then click the "Detect" button; S4.4: After the assembly list is generated, click "Save" to save the template data for testing; S4.5: Click the "Detect" button below "Battery Parameters" to take a picture.
Citation Information
Patent Citations
Battery connector quality detecting method based on machine vision
CN108355981A
Visual inspection system for appearance defects of cylindrical lithium batteries
CN113522793A