An online detection method and system for electronic detonator bridge wire welding quality
Through the online detection method combining multi-spectral linear array cameras and deep learning models, the efficiency and accuracy issues of electronic detonator bridge wire welding quality detection have been solved, and efficient and accurate detection and management of bridge wire welding quality have been achieved.
Patent Information
- Application Number
- CN202511034298.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2045-07-25
AI Technical Summary
Existing technologies make it difficult to achieve rapid, accurate, and comprehensive online detection of the welding quality of electronic detonator bridge wires. In particular, on automated production lines, there are problems such as low detection efficiency, high misjudgment rate, and lack of precise positioning and classification management capabilities.
A multispectral linear array camera is used to synchronously capture visible light and near-infrared dual-channel images. Combined with a deep learning classification model and multidimensional feature analysis, high-precision image acquisition of the bridge wire welding area is achieved through dynamic frame rate matching and pixel compensation algorithms. The improved Retinex algorithm and phase correlation registration technology are used to eliminate image offset and light interference, and the minimum bounding rectangle algorithm is used to locate and classify defects.
It achieves accurate detection of bridge wire welding quality, significantly improves the comprehensiveness and accuracy of detection, can identify defects that are easily missed by traditional methods in real time, meet the high-speed detection needs of automated production lines, and support the classification management and traceability of detection results.
Smart Images

Figure CN120516261B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic detonator bridge wire welding detection, and in particular to an online detection method and system for electronic detonator bridge wire welding quality. Background Art
[0002] During the manufacturing process of electronic detonators, the quality of bridge wire welding is directly related to the detonator's initiation performance and operational safety. If the bridge wire welding has defects such as cold welding, over-welding, or fracture, it can lead to serious problems such as detonator refusal to detonate, premature detonation, or insufficient explosive energy, thereby affecting the safety and reliability of the blasting project. With the popularization of automated production lines for electronic detonators, higher requirements are placed on the efficiency and accuracy of bridge wire welding quality inspection. Traditional manual visual inspection or offline sampling inspection methods can no longer meet the needs of real-time online inspection in large-scale production. There is an urgent need for a fast, accurate, and comprehensive online bridge wire welding quality inspection technology to ensure the production quality and operational safety of electronic detonators.
[0003] Traditional electronic detonator bridge wire welding quality inspection technology mainly relies on manual inspection. Inspectors use visual observation or a simple optical magnifying glass to check the appearance of the bridge wire welding area to determine whether there are obvious welding defects. The advantage of this traditional technical solution is that it is relatively simple to operate, does not require complex equipment investment, and has certain applicability in small-scale production or laboratory environments. However, its disadvantages are also very significant: first, manual inspection is inefficient and cannot meet the high-speed production rhythm of automated production lines, which can easily lead to inspection bottlenecks; second, the inspection results are greatly affected by the subjective experience and fatigue level of the inspectors, and there is a high risk of misjudgment and missed judgment; in addition, manual inspection cannot quantify the welding quality, making it difficult to accurately classify the defect types and trace the quality data, which seriously restricts the improvement and optimization of the production quality of electronic detonators.
[0004] The methods for online detection of electronic detonator bridge wire welding quality in the prior art are mainly as follows:
[0005] Resistance measurement: A high-precision resistance measuring instrument is used to measure the resistance of the bridge wire after welding. A pre-set range of acceptable bridge wire resistance is used. Any value outside this range indicates a welding quality issue. For example, a cold or leaky weld will increase the resistance, while a weld through or short circuit will decrease it. For example, on a production line, a four-probe tester or other instrument can accurately measure the resistance of the bridge wire.
[0006] Capacitor charge-discharge method: This method utilizes the charge-discharge characteristics of a storage capacitor to detect the bridgewire status. The energy storage capacitor is first charged at a low voltage. Once the target voltage is reached, it is discharged at a low voltage through the bridgewire. The detection module measures the voltage values after charging and discharging, and combines pulse parameters (such as the number of pulses, pulse width, and interval width) to determine the bridgewire status and, therefore, its resistance. This method enables automated testing of bridgewires while ensuring safety, and can be used for testing various stages of the production process and finished electronic detonators.
[0007] Welding pressure and temperature monitoring: During the welding process, pressure sensors are used to monitor the pressure applied by the welding head to the bridge wire, ensuring that the pressure is within the appropriate range. Too little pressure can result in a weak weld, while too much pressure can damage the bridge wire. Furthermore, temperature sensors are used to monitor temperature changes in the welding area and obtain a temperature curve. Different welding processes (such as resistance welding and ultrasonic welding) have their own ideal temperature curves. If the actual temperature curve deviates significantly from the ideal curve, it indicates a problem with the welding quality. For example, excessively high temperatures can cause the bridge wire to melt or the solder joint to overheat and age, while excessively low temperatures can lead to insufficient solder joint strength.
[0008] Ultrasonic testing: For ultrasonically welded bridgewires, the weld area can be inspected using an ultrasonic detector. Ultrasonic waves have different propagation characteristics in different media. When the bridgewire weld quality is good, the ultrasonic wave propagates stably through the weld point and bridgewire, and the reflection and refraction signals are normal. However, if there are defects such as cold welds or inclusions, the ultrasonic wave will experience abnormal reflection, refraction, and scattering. By analyzing these signals, the weld quality can be determined.
[0009] Compared with manual inspection, this type of existing technical solution has achieved certain improvements in detection efficiency and objectivity, and can realize the automated detection of some welding defects. Its advantage is that it has initially realized the automation of detection, reduced dependence on manual labor, and improved the consistency of detection. However, the existing technology still has obvious shortcomings: on the one hand, it is difficult to fully reflect the physical characteristics of the bridge wire welding area, and the detection effect is not good for the more concealed cold welds, internal stress defects, etc.; on the other hand, it has poor adaptability to complex lighting conditions and reflections on the welding surface, which can easily lead to inaccurate feature extraction; in addition, most existing technologies lack the ability to accurately locate and classify defects, and cannot achieve effective traceability of detection results, making it difficult to meet the high standards required for electronic detonator quality control. Summary of the Invention
[0010] Based on the above technical problems, the present application discloses an online detection method and system for the welding quality of electronic detonator bridge wire, which is used to solve the technical problems raised in the above background technology.
[0011] To achieve the above object, the present invention provides the following technical solutions:
[0012] An online detection method for electronic detonator bridge wire welding quality, comprising:
[0013] S1. Dynamically and continuously photograph the electronic detonator bridge wire welding area on the conveyor track, and collect dual-channel image sequences of the bridge wire welding part in the visible light band and near-infrared band;
[0014] S2, performing registration and fusion on the dual-channel image sequence acquired in S1, obtaining a fused image, and performing preprocessing to form a preprocessed fused image;
[0015] S3. Based on the pre-processed fusion image, extract the contour features and texture feature parameters of the bridge wire welding area and identify the wire diameter of the bridge wire and the geometric features of the welding point to form a multi-dimensional feature vector including contour, texture and geometric features;
[0016] S4, inputting the multidimensional feature vector extracted in S3 into a preset deep learning classification model, and determining whether the bridge wire welding quality is qualified based on the output probability value;
[0017] S5. For electronic detonators that are judged to be unqualified, the specific location coordinates of the welding defects are determined using the minimum circumscribed rectangle algorithm based on the contour features and geometric features extracted in S3, and marked with a red box in the image;
[0018] S6. Classify the electronic detonator bridge wire welding quality data based on the judgment result in S4 and the defect position marked in S5 to achieve classified management and traceability of the test results.
[0019] Preferably, the frame rate of the dynamic continuous shooting in S1 is dynamically matched with the running speed of the conveying track. The track running speed signal is collected in real time by an encoder installed on the conveying track drive motor. Through the dynamic matching model, the shooting frame rate is dynamically adjusted according to the preset physical length of the bridge wire welding area along the track running direction and the pixel width conversion relationship of the camera single frame image, and the instantaneous pixel deficiency caused by speed fluctuations is corrected through a preset pixel compensation algorithm.
[0020] Preferably, the instantaneous pixel deficiency caused by speed fluctuation is corrected by a preset pixel compensation algorithm, specifically: when the encoder detects the instantaneous speed of the conveyor track The speed at the previous moment The absolute value of the difference Exceeding the preset threshold When the pixel compensation mechanism is activated, based on the formula Calculate the instantaneous number of pixels after compensation ,in is the number of uncompensated pixels at the current moment, is the compensation coefficient, is the number of valid pixels at the previous moment, through the formula Interpolation correction is performed on the grayscale values of image pixels, where After compensation The pixel grayscale value of the coordinate, For the current moment The original pixel grayscale value of the coordinate, For the previous moment The pixel grayscale value of the coordinate, is the weight coefficient.
[0021] Preferably, the registration fusion and image preprocessing of the acquired dual-channel image sequence in S2 is specifically as follows: the visible light band image is , near-infrared band images are , perform Fourier transform 、 , construct the phase correlation matrix ,in is the inverse Fourier transform, is the conjugate operation; positioning Peak corresponding coordinates As a spatial offset, Translation correction to obtain registered image ; Use the improved Retinex algorithm to fuse images, and the fusion formula is ,in is the band weight, The fused image is completed by image preprocessing and fusion.
[0022] Preferably, the S3 obtains the preprocessed fusion image, extracts the contour features of the bridge wire welding area in the fusion image by the Canny edge detection algorithm, calculates the texture feature parameters of the welding area in the fusion image by using the gray level co-occurrence matrix, including the second-order angular moment, contrast, and entropy value, and identifies the wire diameter of the bridge wire and the geometric features of the welding point by Hough transform to form a multidimensional feature vector including contour, texture, and geometric form.
[0023] Preferably, the deep learning classification model in S4 is an improved ResNet-50 model based on the attention mechanism, and a channel attention module and a spatial attention module are embedded after each residual block of ResNet-50. Calculate the channel attention weight, where Output feature map for residual block, is a multilayer perceptron with hidden layers, is the global average pooling, is the global maximum pooling, is the Sigmoid activation function, and is combined with Multiply the feature map after channel attention enhancement , the formula is: ; Spatial attention module Along the channel dimension 、 Get a single channel feature map, and after fusion through the convolution layer, use the Sigmoid activation function to get the spatial attention weight , through the formula The enhanced feature map is obtained, and the model output layer maps the target features with a fully connected layer, through the formula Calculate the probability value of each category, where is the weight matrix of the fully connected layer, is the bias term, is the output feature of the last layer of the model, For the The probability of the class.
[0024] Preferably, in said S5, for the electronic detonator determined as unqualified in S4, when determining the specific position coordinates of the welding defect by the minimum circumscribed rectangle algorithm based on the contour features and geometric features extracted in S3, the contour feature point set is firstly Calculate the covariance matrix , is the transpose of the bias vector, where , is the point set mean, is the total number of contour feature points, and the covariance matrix is decomposed into eigenvalues , is the eigenvector matrix, The eigenvalue diagonal matrix is taken, and the eigenvector corresponding to the maximum eigenvalue is taken as the direction of the long side of the rectangle to construct a rotating coordinate system, and the contour point is projected into the rotating coordinate system to obtain the new coordinate , calculate the minimum and maximum values of the projected coordinates , and finally through the inverse coordinate transformation, according to the formula 、 ,in is the eigenvector and the original Axis angle, For the projected coordinates, determine the coordinates of the four vertices of the minimum enclosing rectangle in the original image coordinate system , and obtain the specific location coordinates of the welding defect.
[0025] Preferably, in S6, the electronic detonator bridge wire welding quality data is divided into five categories: qualified, cold weld, over-weld, bridge wire broken and position offset according to the judgment result of S4 and the defect position marked by S5. If S4 is judged to be qualified and S5 does not mark the defect position, it is classified as qualified; if S4 is judged to be unqualified and the contour feature at the defect position marked by S5 shows that the contact area between the weld spot and the bridge wire is less than the preset threshold A1 and the angular second-order moment value of the texture feature is lower than the threshold T1, it is classified as cold weld; if the geometric feature at the defect position shows that the weld spot diameter is greater than the preset threshold D1 and the contrast value of the texture feature is higher than the threshold T2, it is classified as over-weld; if the contour feature shows that the bridge wire continuity is interrupted and the grayscale value at the interruption is higher than the preset grayscale threshold G1, it is classified as bridge wire broken; if the geometric feature at the defect position shows that the offset between the actual position of the bridge wire and the standard position exceeds the preset offset threshold O1, it is classified as position offset.
[0026] An online detection system for the welding quality of an electronic detonator bridge wire comprises an image acquisition unit, an image preprocessing unit, a feature extraction unit, a quality determination unit, a positioning marking unit and a classification storage unit;
[0027] The image acquisition unit uses a multi-spectral linear array camera to dynamically and continuously capture the electronic detonator bridge wire welding area on the conveyor track, synchronously capture a dual-channel image sequence of the bridge wire welding position, and transmit the captured image sequence to the image preprocessing unit;
[0028] The image preprocessing unit performs registration fusion and image preprocessing on the dual-channel image sequence and transmits the image to the feature extraction unit; the feature extraction unit extracts the contour features and texture feature parameters of the bridge wire welding area and the wire diameter of the bridge wire and the geometric features of the welding point based on the preprocessed fusion image to form a multidimensional feature vector, which is input into the quality judgment unit;
[0029] The quality judgment unit inputs the multidimensional feature vector into the deep learning classification model, outputs a probability value, judges whether the bridge wire welding quality is qualified, and transmits the result to the positioning marking unit and the classification storage unit;
[0030] For electronic detonators that are judged to be unqualified, the positioning marking unit determines the specific location coordinates of the welding defects based on the extracted contour features and geometric features, marks them with red boxes in the image, and records the real-time position information of the electronic detonators on the conveyor track. The marking results are fed back to the classification storage unit;
[0031] The classification storage unit classifies the electronic detonator bridge wire welding quality data according to the quality judgment result and the defect position of the positioning mark, and stores it in the corresponding database.
[0032] Preferably, the classification storage units are stored in corresponding databases respectively, and each type of data is associated with the corresponding original image, preprocessed image and feature vector information. A certain type of welding quality data can be quickly traced through the index association mechanism, and the corresponding original image, preprocessed image and feature vector information can be quickly queried.
[0033] Compared with the prior art, the technical solution of this application has the following technical effects:
[0034] The present invention uses a multi-spectral linear array camera to synchronously collect visible light and near-infrared dual-channel images, combined with a dynamic frame rate matching mechanism, which can comprehensively capture the material differences and structural characteristics of the bridge wire welding area. Through the encoder, the track running speed is matched in real time and the shooting parameters are dynamically adjusted to ensure clear acquisition of images of each bridge wire welding area, and to achieve clear presentation of microscopic details such as bridge wire diameter and weld morphology. It can effectively identify hidden defects such as cold solder joints and over-soldering that are easily missed by traditional single-spectrum detection, and significantly improve the comprehensiveness and accuracy of detection.
[0035] The present invention eliminates dual-channel image offset through a phase-correlated sub-pixel registration algorithm, uses an improved Retinex algorithm to suppress welding reflection interference, and combines combined filtering and noise reduction processing to greatly improve the stability of image quality. It integrates contour features, texture parameters and multi-dimensional feature analysis of geometric morphology to accurately distinguish the boundary features of solder joints and bridge wires, avoid misjudgment problems caused by uneven lighting or surface reflections, and effectively ensure the reliability of detection results under complex working conditions, reducing the interference of environmental factors on the detection process.
[0036] The present invention is based on an improved ResNet-50 model based on the attention mechanism. By strengthening the weight distribution of key features, the accurate classification of bridge wire welding quality is achieved. The improved ResNet-50 model can effectively distinguish different types of welding defects such as qualified, cold welds, and over-welds. Combined with the minimum enclosing rectangle algorithm to accurately locate the defect position, it can mark defects in real time and associate track coordinate information, efficiently completing online welding quality judgment and unqualified product screening, meeting the high-speed detection requirements of automated production lines.
[0037] The present invention establishes a multi-level data mapping structure, classifies and stores the inspection data by quality category, and associates the original image, pre-processed image and feature vector information. By utilizing an efficient indexing mechanism, it can quickly realize cross-query of defect type, inspection time and location information, providing support for traceability management and process optimization of welding quality. The data management model can help production personnel to conveniently analyze quality data and provide a quantitative basis for improving the electronic detonator bridge wire welding process.
[0038] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application so that it can be implemented in accordance with the contents of the specification, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following is a detailed description of the preferred embodiment of the present application in conjunction with the accompanying drawings.
[0039] Based on the detailed description of the specific embodiments of the present application in conjunction with the accompanying drawings below, those skilled in the art will become more aware of the above and other objects, advantages and features of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following will briefly introduce the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without inventive work. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0041] Figure 1 This is a flow chart of the online detection method for electronic detonator bridge wire welding quality of the present invention;
[0042] Figure 2 This is the architecture diagram of the improved ResNet-50 model based on the attention mechanism;
[0043] Figure 3 This is the structure diagram of the online detection system for electronic detonator bridge wire welding quality;
[0044] Figure 4 This is a comparison chart of the registration effects of visible light and near-infrared dual-channel images, where Figure 4 a is the visible light image, Figure 4 b is the near-infrared image, Figure 4 c is the image after registration;
[0045] Figure 5 To improve the image comparison before and after Retinex algorithm processing, Figure 5 a is the initial fusion image, Figure 5 b is the image processed by the improved Retinex algorithm;
[0046] Figure 6 This is the distribution diagram of the positioning error of the electronic detonator bridge wire welding defect;
[0047] Figure 7 is a graph showing the relationship between detection efficiency and track speed;
[0048] Figure 8This is the stability curve of the system running continuously for 24 hours. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. In the following description, specific details such as specific configurations and components are provided only to help fully understand the embodiments of the present application. Therefore, it should be clear to those skilled in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. In addition, for clarity and brevity, the description of known functions and structures has been omitted in the embodiments.
[0050] It should be understood that references throughout this specification to "one embodiment" or "this embodiment" mean that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present application. Therefore, the appearance of "one embodiment" or "this embodiment" throughout this specification does not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0051] In addition, the present application may repeat reference numerals and / or letters in different examples. This repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0052] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist at the same time. The term " / and" in this article describes another type of association object relationship, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0053] The term "at least one" in this article is merely a description of the association relationship between associated objects, indicating that three relationships may exist. For example, at least one of A and B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0054] It should also be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "include," "comprises," or any other variations thereof are intended to cover non-exclusive inclusion.
[0055] Example 1
[0056] This embodiment mainly describes an online detection method for the welding quality of an electronic detonator bridge wire. Figure 1 As shown, specifically:
[0057] S1. Dynamically and continuously photograph the electronic detonator bridge wire welding area on the conveyor track, and collect dual-channel image sequences of the bridge wire welding part in the visible light band and near-infrared band;
[0058] S2, performing registration and fusion on the dual-channel image sequence acquired in S1, obtaining a fused image, and performing preprocessing to form a preprocessed fused image;
[0059] S3. Based on the pre-processed fusion image, extract the contour features and texture feature parameters of the bridge wire welding area and identify the wire diameter of the bridge wire and the geometric features of the welding point to form a multi-dimensional feature vector including contour, texture and geometric features;
[0060] S4, inputting the multidimensional feature vector extracted in S3 into a preset deep learning classification model, and determining whether the bridge wire welding quality is qualified based on the output probability value;
[0061] S5. For electronic detonators that are judged to be unqualified, the specific location coordinates of the welding defects are determined using the minimum circumscribed rectangle algorithm based on the contour features and geometric features extracted in S3, and marked with a red box in the image;
[0062] S6. Classify the electronic detonator bridge wire welding quality data based on the judgment result in S4 and the defect position marked in S5 to achieve classified management and traceability of the test results.
[0063] Furthermore, the frame rate of dynamic continuous shooting in S1 is dynamically matched with the running speed of the conveyor track. The track running speed signal is collected in real time through the encoder installed on the conveyor track drive motor. Through the dynamic matching model, the shooting frame rate is dynamically adjusted according to the preset physical length of the bridge wire welding area along the track running direction and the pixel width of the camera single frame image. The instantaneous pixel deficiency caused by speed fluctuations is corrected through the preset pixel compensation algorithm.
[0064] Furthermore, the instantaneous pixel deficiency caused by speed fluctuation is corrected by the preset pixel compensation algorithm. Specifically, when the encoder detects the instantaneous speed of the conveyor track, The speed at the previous moment The absolute value of the difference Exceeding the preset threshold When the pixel compensation mechanism is activated, based on the formula Calculate the instantaneous number of pixels after compensation ,in is the number of uncompensated pixels at the current moment, is the compensation coefficient, is the number of valid pixels at the previous moment, through the formula Interpolation correction is performed on the grayscale values of image pixels, where After compensation The pixel grayscale value of the coordinate, For the current moment The original pixel grayscale value of the coordinate, For the previous moment The pixel grayscale value of the coordinate, is the weight coefficient.
[0065] Furthermore, S2 performs registration fusion and image preprocessing on the acquired dual-channel image sequence: the visible light band image is , near-infrared band images are , perform Fourier transform 、 , construct the phase correlation matrix ,in is the inverse Fourier transform, is the conjugate operation; positioning Peak corresponding coordinates As a spatial offset, Translation correction to obtain registered image ; Use the improved Retinex algorithm to fuse images, and the fusion formula is ,in is the band weight, The fused image is completed by image preprocessing and fusion.
[0066] Furthermore, S3 obtains the preprocessed fusion image, and uses the Canny edge detection algorithm to extract the contour features of the bridge wire welding area in the fusion image. The gray-level co-occurrence matrix is used to calculate the texture feature parameters of the welding area in the fusion image, including the second-order angular moment, contrast, and entropy value. The wire diameter of the bridge wire and the geometric features of the welding point are identified through the Hough transform to form a multidimensional feature vector containing contour, texture, and geometric form.
[0067] Further, if Figure 2 As shown in Figure 2, the deep learning classification model in S4 is an improved ResNet-50 model based on the attention mechanism. A channel attention module and a spatial attention module are embedded after each residual block of ResNet-50. The channel attention module is Calculate the channel attention weight, where Output feature map for residual block, is a multilayer perceptron with hidden layers, is the global average pooling, is the global maximum pooling, is the Sigmoid activation function, and is combined with Multiply the feature map after channel attention enhancement , the formula is: ; Spatial attention module Along the channel dimension 、 Get a single channel feature map, and after fusion through the convolution layer, use the Sigmoid activation function to get the spatial attention weight , through the formula The enhanced feature map is obtained, and the model output layer maps the target features with a fully connected layer, through the formula Calculate the probability value of each category, where is the weight matrix of the fully connected layer, is the bias term, is the output feature of the last layer of the model, For the The probability of the class.
[0068] Furthermore, in S5, for the electronic detonator judged as unqualified in S4, the specific position coordinates of the welding defect are determined by the minimum circumscribed rectangle algorithm based on the contour features and geometric features extracted in S3. Calculate the covariance matrix , is the transpose of the bias vector, where , is the point set mean, is the total number of contour feature points, and the covariance matrix is decomposed into eigenvalues , is the eigenvector matrix, The eigenvalue diagonal matrix is taken, and the eigenvector corresponding to the maximum eigenvalue is taken as the direction of the long side of the rectangle to construct a rotating coordinate system, and the contour point is projected into the rotating coordinate system to obtain the new coordinate , calculate the minimum and maximum values of the projected coordinates , and finally through the inverse coordinate transformation, according to the formula 、 ,in is the eigenvector and the original Axis angle, For the projected coordinates, determine the coordinates of the four vertices of the minimum enclosing rectangle in the original image coordinate system , and obtain the specific location coordinates of the welding defect.
[0069] Furthermore, in S6, according to the judgment result of S4 and the defect position marked by S5, the electronic detonator bridge wire welding quality data is divided into five categories: qualified, cold weld, over-weld, bridge wire breakage and position offset. If S4 judges it as qualified and S5 does not mark the defect position, it is classified as qualified; if S4 judges it as unqualified and the contour feature at the defect position marked by S5 shows that the contact area between the weld point and the bridge wire is less than the preset threshold A1 and the angular second-order moment value of the texture feature is lower than the threshold T1, it is classified as cold weld; if the geometric morphological feature at the defect position shows that the weld point diameter is greater than the preset threshold D1 and the contrast value of the texture feature is higher than the threshold T2, it is classified as over-weld; if the contour feature shows that the bridge wire continuity is interrupted and the grayscale value at the interruption is higher than the preset grayscale threshold G1, it is classified as bridge wire breakage; if the geometric morphological feature at the defect position shows that the offset between the actual position of the bridge wire and the standard position exceeds the preset offset threshold O1, it is classified as position offset.
[0070] This embodiment describes in detail a method for online detection of bridge wire welding quality of electronic detonators. By collecting dual-channel images in the visible light and near-infrared bands, combined with deep learning classification models and multidimensional feature analysis, accurate detection of bridge wire welding quality is achieved. By dynamically matching the shooting frame rate with the track running speed and introducing a pixel compensation algorithm, high-quality image acquisition is ensured. In terms of image processing, phase-correlation registration and an improved Retinex algorithm are used for preprocessing to solve the image offset problem. In defect detection and classification, by fusing multidimensional features such as contour, texture, and geometric shape, and with the help of an improved ResNet-50 model based on an attention mechanism, accurate judgment, positioning, and classification of different types of defects are achieved, overcoming the shortcomings of existing technologies in detection accuracy, adaptability, and management capabilities, and providing a new technical path for online detection of electronic detonator bridge wire welding quality.
[0071] Based on Example 1, this example describes in detail the use of an improved Retinex algorithm in image preprocessing to perform illumination balancing on the fused image, remove highlight interference caused by reflections in the welding area, and suppress image noise using a combined filtering method of median filtering and Gaussian filtering. Specifically,
[0072] The visible light band image of the acquired dual-channel image sequence is , near-infrared band images are , perform Fourier transform 、 , construct the phase correlation matrix ,in is the inverse Fourier transform, is the conjugate operation; positioning Peak corresponding coordinates As a spatial offset, Translation correction to obtain registered image ; Use the improved Retinex algorithm to fuse images, and the fusion formula is ,in is the band weight, through Calculate the lighting component, is the Gaussian filter kernel function, and the reflection component is , remove the high light interference caused by reflection in the welding area, Filtering, First, median filtering is performed. , Filter window, and then use the Gaussian filter formula as , is the standard deviation =1.2 Gaussian filtering operation to complete image preprocessing.
[0073] This embodiment describes in detail how to perform phase correlation registration on visible light and near-infrared dual-channel images to eliminate spatial offsets, and then fuse them using an improved Retinex algorithm to effectively suppress welding reflection interference, balance light distribution, improve image quality, accurately align dual-channel image information, enhance the recognition of welding area details, provide high-quality fused images for subsequent feature extraction, ensure accurate extraction of contour and texture features, and improve detection reliability and stability.
[0074] Example 2
[0075] This embodiment describes in detail an online detection system for the welding quality of electronic detonator bridge wire. Figure 3 As shown, specifically:
[0076] The welding quality online detection system includes an image acquisition unit, an image preprocessing unit, a feature extraction unit, a quality judgment unit, a positioning marking unit and a classification storage unit;
[0077] The image acquisition unit uses a multi-spectral linear array camera to dynamically and continuously capture the electronic detonator bridge wire welding area on the conveyor track, synchronously capture a dual-channel image sequence of the bridge wire welding position, and transmit the captured image sequence to the image preprocessing unit;
[0078] The image preprocessing unit performs registration fusion and image preprocessing on the dual-channel image sequence and transmits the image to the feature extraction unit; the feature extraction unit extracts the contour features and texture feature parameters of the bridge wire welding area and the wire diameter of the bridge wire and the geometric features of the welding point based on the preprocessed fusion image to form a multidimensional feature vector, which is input into the quality judgment unit;
[0079] The quality judgment unit inputs the multidimensional feature vector into the deep learning classification model, outputs a probability value, judges whether the bridge wire welding quality is qualified, and transmits the result to the positioning marking unit and the classification storage unit;
[0080] For electronic detonators that are judged to be unqualified, the positioning marking unit determines the specific location coordinates of the welding defects based on the extracted contour features and geometric features, marks them with red boxes in the image, and records the real-time position information of the electronic detonators on the conveyor track. The marking results are fed back to the classification storage unit;
[0081] The classification storage unit classifies the electronic detonator bridge wire welding quality data according to the quality judgment result and the defect position of the positioning mark, and stores it in the corresponding database.
[0082] The classified storage units are stored in the corresponding databases respectively. Each type of data is associated with the corresponding original image, pre-processed image and feature vector information. Through the index association mechanism, a certain type of welding quality data can be quickly traced and the corresponding original image, pre-processed image and feature vector information can be quickly queried.
[0083] This implementation describes in detail how the online detection system, through multispectral image acquisition, preprocessing, feature extraction, deep learning classification, defect location and data classification storage, can accurately identify defects such as cold solder joints and over-soldering in electronic detonator bridge wire welding, mark the location in real time and classify and store data, realizing full-process automated detection from image acquisition to quality judgment, defect location and data tracing, effectively improving detection efficiency and accuracy, and providing reliable technical support for the quality control of electronic detonator bridge wire welding.
[0084] Based on Example 1 or Example 2, this example describes in detail the implementation and verification of online detection of electronic detonator bridge wire welding quality, specifically:
[0085] An industrial-grade multispectral line array camera is installed: with a resolution of 2048×2048, it supports dual-channel imaging in the visible light band of 380nm-780nm and the near-infrared band of 800nm-1100nm; the conveyor track system has a maximum operating speed of 100mm / s and is equipped with a high-precision encoder (resolution of 0.01mm); the industrial computer is an Intel Core i7-11700K processor, 32GB of memory, and an NVIDIA RTX 3090 graphics card; the electronic detonator production line includes a bridge wire welding process and supporting tooling.
[0086] The track speed was set within the range of 20-80 mm / s for multiple tests. The encoder was used to collect track speed signals in real time, and the camera control module dynamically adjusted the shooting frame rate based on the preset conversion relationship between physical length and pixel width (the physical length of the bridge wire welding area is 1.5 mm, and the pixel width of a single-frame image of the camera corresponds to 0.0075 mm / pixel).
[0087] Test results show that when the track speed is 20 mm / s, the camera frame rate automatically adjusts to 133 fps; when the speed increases to 80 mm / s, the frame rate increases to 533 fps, achieving a precise match between the capture frame rate and track speed. After correcting for speed fluctuations (fluctuations ≤ 10%) using a pixel compensation algorithm, the captured image of the bridgewire weld area remains stable at a pixel size above 200 × 200, ensuring image clarity and integrity.
[0088] The quality of the acquired dual-channel images at different track speeds was evaluated using metrics including image resolution, contrast, signal-to-noise ratio (SNR), and edge clarity. For each test, 100 frames of images were collected and the average value was taken as the result. The specific data is shown in Table 1 below:
[0089] Table 1 Evaluation indicator data
[0090]
[0091] From the data in Table 1, it can be seen that within the speed range of 20-80 mm / s, the quality of the acquired images is stable, and all indicators remain at a high level, verifying the effectiveness of the dynamic frame rate matching and pixel compensation algorithms.
[0092] The collected visible light and near infrared dual-channel images are registered, fused and preprocessed to verify the effect of phase correlation registration algorithm and improved Retinex algorithm. A set of images with a track speed of 50mm / s is selected for testing. The images before and after registration are compared. Figure 4 As shown in the figure, when the track speed is 50mm / s, the comparison effect of the visible light and near-infrared dual-channel images of the electronic detonator bridge wire welding area before and after registration. It can be clearly observed from the image that the visible light image before registration ( Figure 4 a) and near-infrared image ( Figure 4 b) There is a significant spatial offset. The position of the bridgewire welding area in the two images is inconsistent. The left end of the bridgewire in the visible light image is offset by approximately 15 pixels in the near-infrared image, and the right end is offset by approximately 12 pixels. This offset will cause information misalignment during subsequent fusion processing, affecting the accuracy of feature extraction.
[0093] After being processed by the phase correlation registration algorithm, the near-infrared image is accurately translated and corrected to obtain the registered image ( Figure 4 c). Comparing the images before and after registration shows that the bridgewire weld area in the registered near-infrared image is perfectly aligned with the visible light image, with the bridgewire outline and weld point locations corresponding one-to-one in both images. Measurements show that the spatial offset of the registered images is within 0.5 pixels, meeting the sub-pixel registration accuracy requirement.
[0094] Further quantitative analysis of the registration results revealed that the cross-correlation coefficient between the two images was 0.68 before registration, but increased to 0.97 after registration, indicating a significant improvement in image similarity. Furthermore, the mean pixel deviation of the dual-channel images decreased from 13.5 pixels before registration to 0.3 pixels, and the standard deviation decreased from 8.2 pixels to 0.15 pixels, fully validating the effectiveness of the phase correlation registration algorithm in eliminating spatial offsets. This high-precision registration laid a solid foundation for subsequent improvements to the Retinex algorithm's fusion processing and feature extraction, ensuring the consistency and accuracy of features such as contours and textures extracted from the dual-channel images.
[0095] The fused image is processed by the improved Retinex algorithm, which effectively suppresses the reflection interference in the welding area and makes the light distribution more uniform. Figure 5 As shown in the figure, the processing effect of the improved Retinex algorithm on the fused image of the electronic detonator bridge wire welding area is compared, focusing on the performance in suppressing welding reflection interference and balancing light distribution; it can be seen from the image that the original fused image is ( Figure 5 Figure a) shows that there are obvious highlight reflections in the welding area, especially at the connection between the solder joint and the bridge wire. The reflection causes the grayscale value of this area to reach 220 (grayscale range 0-255), seriously obscuring the outline of the bridge wire and the details of the solder joint. The overall lighting of the image is also uneven. The average grayscale value in the upper left corner is 180, while that in the lower right corner is only 120, with a significant difference in brightness.
[0096] The image processed by the improved Retinex algorithm ( Figure 5 b) Specular reflections in the weld area are effectively suppressed, reducing the grayscale value of the original highlight area to 160, a 27.3% decrease. This allows for clearer visualization of the boundary between the bridgewire and the solder joint (such as the bridgewire surface texture and the metal flow pattern at the solder joint). Furthermore, overall image illumination uniformity is significantly improved. The grayscale standard deviation of the processed image is reduced from 35 in the original image to 12, and the grayscale difference between the upper left and lower right corners is reduced to 15, achieving significant illumination balance.
[0097] Quantitative analysis shows that the improved Retinex algorithm improves the image's signal-to-noise ratio (SNR) from 28dB to 39dB, a 39.3% improvement, and the contrast ratio increases from 0.52 to 0.78, a 49.6% enhancement. Through a combination of Gaussian and median filtering, the number of noise points in the image is reduced by 65%, the previously blurred bridge wire edges become clearer, the edge gradient amplitude increases from 80 to 150, and edge positioning accuracy improves by approximately 40%. These data demonstrate that the improved Retinex algorithm not only effectively addresses welding reflections but also, through illumination equalization and noise suppression, provides a high-quality image foundation for subsequent feature extraction operations such as contour extraction and texture analysis, ensuring accurate and reliable defect detection.
[0098] Based on the preprocessed fused image, the Canny edge detection algorithm, gray-level co-occurrence matrix, and Hough transform were used to extract contour, texture, and geometric features. Feature extraction was performed on 100 different welding samples (including qualified, cold solder joints, over-solder joints, bridge wire fractures, and positional offsets). The extraction accuracy of each feature parameter was statistically analyzed. The results showed that the accuracy of contour feature extraction reached 98.5%, while the accuracy of the second-order moment of angle, contrast, and entropy in texture features reached 97.2%, 96.8%, and 97.5%, respectively. The accuracy of wire diameter and solder joint diameter in geometric features also reached 99.0% and 98.8%, respectively. This shows that the feature extraction method can accurately obtain the contour, texture, and geometric features of the bridge wire welding area.
[0099] A modified ResNet-50 model based on the attention mechanism was used as the deep learning classification model. 10,000 labeled welding samples (8,000 for training and 2,000 for validation) were used for model training. During training, the batch size was set to 32, the learning rate was initialized to 0.001, and a cosine annealing learning rate decay strategy was used. The training cycle was 50 epochs.
[0100] After model training, the improved ResNet-50 model based on the attention mechanism was tested on the test set. The results showed that the accuracy of qualified classes reached 99.2%, 98.5% for cold welds, 98.8% for over-welds, 99.0% for bridge wire breakage, and 98.3% for positional deviations, with an average accuracy of 98.76%. The improved ResNet-50 model can accurately distinguish different quality categories of electronic detonator bridge wire welds and has a high ability to identify various defects.
[0101] To verify the superiority of the improved ResNet-50 model, we conducted comparative experiments with the traditional ResNet-50 model, support vector machine (SVM), and convolutional neural network (CNN). The results are shown in Table 2:
[0102] Table 2 Model performance comparison
[0103]
[0104] The data in the preceding table shows that the improved ResNet-50 model achieves significantly higher average accuracy than other models while maintaining a lower number of parameters and faster inference speed, demonstrating the effectiveness of the attention mechanism in improving model performance.
[0105] For electronic detonators that were judged to be unqualified, the minimum enclosing rectangle algorithm was used to determine the specific location coordinates of the welding defects. 100 unqualified samples (20 for each defect type) were selected for positioning testing. The positioning error was calculated based on the manually marked defect positions. The results are as follows: Figure 6 The figure, shown in Figure 1, is based on positioning test data from 100 unqualified samples (including 25 each of cold solder joints, over-solder joints, bridge wire breakage, and positional misalignment). The figure shows that the defect positioning error, measured in pixels, follows a nearly normal distribution, with the horizontal axis representing positioning error (pixels) and the vertical axis representing the percentage of samples. The data reveals that positioning errors are primarily concentrated in the 0-2 pixel range, with samples with an error of 0.5 pixels accounting for the highest proportion, at 22%. Samples with an error of 1 pixel account for 20%, 1.5 pixels for 18%, and 2 pixels for 15%. The combined proportion of samples in these four ranges reaches 75%, indicating that the positioning error for the vast majority of defects is within 2 pixels.
[0106] Further analysis revealed an average positioning error of 1.2 pixels, with a standard deviation of 0.6 pixels. 95% of the samples had positioning errors less than 2 pixels, and only 5% had errors exceeding 2 pixels (the maximum error was 2.8 pixels). In terms of defect type, bridge wire fractures had the smallest positioning error, averaging 0.9 pixels, thanks to the distinct contour features of the fracture. Positional offset defects had an average error of 1.5 pixels, slightly higher than other types, primarily due to the ambiguity of the offset boundary. Quantitative data demonstrates that the accuracy of this positioning algorithm meets the requirements for online detection of electronic detonator welding defects. The average error of 1.2 pixels corresponds to an actual physical size of approximately 0.009 mm (converted at 0.0075 mm / pixel), accurately marking defect locations and providing a precise position reference for subsequent rejection of defective products and process optimization, effectively ensuring the practicality and reliability of the detection system.
[0107] Statistical results show that the average error of defect positioning is 1.2 pixels, and the positioning error of 95% of the samples is less than 2 pixels, which meets the requirements for defect positioning accuracy in actual production.
[0108] Based on the judgment results and defect locations, the electronic detonator bridge wire welding quality data is divided into five categories and stored in the corresponding database. To verify the accuracy of the classification and the efficiency of data traceability, the following tests are conducted:
[0109] 500 samples (100 of each defect type) were randomly selected for manual re-inspection and compared with the system classification results to obtain the classification accuracy of each category. In the embodiment, 500 samples (100 of each defect type) were randomly selected for manual re-inspection and compared with the system classification results. The results showed excellent classification accuracy in all categories, with the classification accuracy of qualified samples reaching 99.0%, 98.0% for cold welds, 98.5% for over-welds, 98.8% for bridge wire fractures, and 97.5% for positional deviations, for an overall average classification accuracy of 98.36%. This demonstrates that the detection system can accurately classify electronic detonator bridge wire welding quality data and effectively distinguish different types of welding defects. The classification results are highly consistent with the manual re-inspection results, further verifying the reliability and accuracy of the system in practical applications.
[0110] To evaluate data traceability efficiency, 10,000 inspection records were stored in the database, and the time required for traceability queries based on defect type, inspection time, and location information was tested. Furthermore, with 10,000 inspection records stored in the database, the time required for traceability queries based on defect type, inspection time, location information, and a multi-dimensional combination (defect type + inspection time) was tested. The results showed that queries based on defect type took 12.5ms, queries based on inspection time took 15.3ms, queries based on location information took 18.7ms, and queries based on a multi-dimensional combination took 25.6ms. This demonstrates that the system, through its three-level data mapping structure and B+ tree indexing mechanism, achieves efficient traceability of inspection data. Even with tens of thousands of data records, it can quickly complete queries based on single-dimensional and combined conditions, meeting the requirements for rapid traceability and management of welding quality data in electronic detonator production. The test results demonstrate that the system can accurately classify welding defects and provides efficient data traceability, meeting the requirements for quality control in electronic detonator production.
[0111] The detection efficiency test was conducted at different track speeds to test the detection efficiency of the system. The results are as follows: Figure 7 As shown in the figure, the curve is drawn based on the measured data of the track speed in the range of 20-80 mm / s. The data points show an approximately linear growth trend, indicating that the detection efficiency increases synchronously with the increase of track speed.
[0112] When the track speed is 20 mm / s, the detection efficiency is 300 rounds / minute; when the speed is increased to 40 mm / s, the efficiency increases to 600 rounds / minute; at the speed of 60 mm / s, the efficiency further increases to 900 rounds / minute; and when the track speed reaches the highest tested value of 80 mm / s, the detection efficiency reaches 1200 rounds / minute. The data shows that the ratio of detection efficiency to track speed basically remains at 15 rounds / minute·mm / s (for example, 20 mm / s corresponds to 300 rounds / minute, and 80 mm / s corresponds to 1200 rounds / minute), indicating that the system's detection efficiency is linearly positively correlated with track speed. The dynamic frame rate matching algorithm effectively ensures image acquisition and processing efficiency at high speeds.
[0113] The curve's fluctuations at each speed node were less than 5%. For example, at 60 mm / s, the measured efficiency was 905 rounds / minute, deviating only 0.56% from the theoretical value of 900 rounds / minute, demonstrating the system's stability under varying speed conditions. This efficiency fully meets the high-speed inspection requirements of automated electronic detonator production lines (conventional production line speeds are approximately 60-80 mm / s). The peak efficiency of 1200 rounds / minute represents a tenfold increase over traditional manual inspection (approximately 120 rounds / minute), fully demonstrating the system's practicality and efficiency in industrial mass production environments.
[0114] like Figure 8 As shown in the figure, the system runs continuously for 24 hours, and records key performance indicators every hour, including image acquisition quality, classification accuracy, positioning accuracy and detection efficiency. The results are shown in the figure. Figure 8 As shown, the detection efficiency curve remained between 98.5% and 101.2% over 24 hours. The initial efficiency was 1200 rounds / minute, and after 24 hours, the efficiency increased to 1193 rounds / minute, with a fluctuation of only 0.58%, demonstrating the stability of the dynamic frame rate matching algorithm. The classification accuracy curve remained between 98.2% and 98.9%, with an initial accuracy of 98.76% and a final stability of 98.5%, with a fluctuation of less than 0.7%, indicating that the improved ResNet-50 model did not experience performance degradation due to long-term operation. The localization accuracy curve fluctuated between 97.8% and 100.3%, with an initial average error of 1.2 pixels and an error of 1.22 pixels after 24 hours, a change of only 1.67%, verifying the reliability of the minimum bounding rectangle algorithm. The signal-to-noise ratio curve (image acquisition quality) fluctuated between 38.5 and 39.8 dB, with an initial SNR of 39 dB and a final SNR of 38.8 dB, with a degradation of only 0.51%, demonstrating the stable anti-interference capability of the improved Retinex algorithm.
[0115] The standard deviation of each metric was less than 0.8%, including 0.35% for detection efficiency, 0.28% for classification accuracy, 0.42% for positioning accuracy, and 0.31% for signal-to-noise ratio (SNR), all meeting the ±5% fluctuation standard for industrial-grade equipment. At the typical eighth hour, detection efficiency reached 1,205 rounds per minute, with a relative efficiency ratio of 100.4%. At the 16th hour, classification accuracy reached 98.6%, and positioning error reached 1.22 pixels at the 24th hour. None of the metrics showed significant degradation. These stability test results demonstrate the system's stable and reliable performance over long periods of continuous operation, meeting the requirements of 24-hour uninterrupted testing on electronic detonator production lines and providing solid technical support for industrial mass production.
[0116] This embodiment describes in detail the online detection technology for electronic detonator bridge wire welding quality. Through multispectral image acquisition and dynamic frame rate matching, the microscopic details of bridge wire welding are clearly captured. Phase correlation registration and improved Retinex algorithm processing are used to eliminate image offset and reflection interference, thereby improving image quality. Canny edge detection and Hough transform are combined to extract multidimensional features. The improved ResNet-50 model is used to accurately classify welding quality. The minimum enclosing rectangle algorithm is used to locate defects. The detection data is classified, stored, and traced. This realizes the automation of the entire process from image acquisition to quality control, effectively improving detection efficiency and reliability, and meeting the high-speed detection requirements of the production line.
[0117] The above are only preferred embodiments of the present invention, which do not limit the scope of protection of the present invention. For those skilled in the art, the present invention can be modified and varied in various ways. Any changes, modifications, replacements, integrations and parameter changes to these embodiments through conventional substitutions or that can achieve the same functions without departing from the principles and spirit of the present invention fall within the scope of protection of the present invention.
Claims
1. A method for online detection of electronic detonator bridge wire welding quality, characterized in that: include: S1. Dynamically and continuously photograph the electronic detonator bridge wire welding area on the conveyor track, and collect dual-channel image sequences of the bridge wire welding part in the visible light band and near-infrared band; S2, performing registration and fusion on the dual-channel image sequence acquired in S1, obtaining a fused image, and performing preprocessing to form a preprocessed fused image; S3. Based on the pre-processed fusion image, extract the contour features and texture feature parameters of the bridge wire welding area and identify the wire diameter of the bridge wire and the geometric features of the welding point to form a multi-dimensional feature vector including contour, texture and geometric features; S4, inputting the multidimensional feature vector extracted in S3 into a preset deep learning classification model, and determining whether the bridge wire welding quality is qualified based on the output probability value; S5. For electronic detonators that are judged to be unqualified, the specific location coordinates of the welding defects are determined using the minimum circumscribed rectangle algorithm based on the contour features and geometric features extracted in S3, and marked with a red box in the image; S6. Classify the electronic detonator bridge wire welding quality data based on the determination result in S4 and the defect location marked in S5, so as to realize the classification management and traceability of the test results; The frame rate of the dynamic continuous shooting in S1 is dynamically matched with the running speed of the conveyor track. The track running speed signal is collected in real time by an encoder installed on the conveyor track drive motor. The shooting frame rate is dynamically adjusted according to the preset conversion relationship between the physical length of the bridge wire welding area along the track running direction and the pixel width of the camera single frame image through a dynamic matching model, and the instantaneous pixel deficiency caused by speed fluctuation is corrected through a preset pixel compensation algorithm; The preset pixel compensation algorithm is used to correct the instantaneous pixel deficiency caused by speed fluctuation, specifically: when the encoder detects the instantaneous speed of the conveyor track The speed at the previous moment The absolute value of the difference Exceeding the preset threshold When the pixel compensation mechanism is activated, based on the formula Calculate the instantaneous number of pixels after compensation ,in is the number of uncompensated pixels at the current moment, is the compensation coefficient, is the number of valid pixels at the previous moment, through the formula Interpolation correction is performed on the grayscale values of image pixels, where After compensation The pixel grayscale value of the coordinate, For the current moment The original pixel grayscale value of the coordinate, For the previous moment The pixel grayscale value of the coordinate, is the weight coefficient.
2. The method for online detection of electronic detonator bridge wire welding quality according to claim 1, characterized in that: The registration fusion and image preprocessing of the acquired dual-channel image sequence in S2 are specifically as follows: the visible light band image is , near-infrared band images are , perform Fourier transform 、 , construct the phase correlation matrix ,in is the inverse Fourier transform, is the conjugate operation; positioning Peak corresponding coordinates As a spatial offset, Translation correction to obtain registered image ; Use the improved Retinex algorithm to fuse images, and the fusion formula is ,in is the band weight, The fused image is completed by image preprocessing and fusion.
3. The method for online detection of electronic detonator bridge wire welding quality according to claim 1 or 2, characterized in that: In the S3, the preprocessed fusion image is obtained, and the contour features of the bridge wire welding area in the fusion image are extracted by the Canny edge detection algorithm. The texture feature parameters of the welding area in the fusion image are calculated using the gray level co-occurrence matrix, including the second-order angular moment, contrast and entropy value. The wire diameter of the bridge wire and the geometric features of the welding point are identified by the Hough transform to form a multidimensional feature vector including contour, texture and geometric form.
4. The method for online detection of electronic detonator bridge wire welding quality according to claim 1, characterized in that: The deep learning classification model in S4 is an improved ResNet-50 model based on the attention mechanism. A channel attention module and a spatial attention module are embedded after each residual block of ResNet-50. The channel attention module is Calculate the channel attention weight, where Output feature map for residual block, is a multilayer perceptron with hidden layers, is the global average pooling, is the global maximum pooling, is the Sigmoid activation function, and is combined with Multiply the feature map after channel attention enhancement , the formula is: ; Spatial attention module Along the channel dimension 、 Get a single channel feature map, and after fusion through the convolution layer, use the Sigmoid activation function to get the spatial attention weight , through the formula The enhanced feature map is obtained, and the model output layer maps the target features with a fully connected layer, through the formula Calculate the probability value of each category, where is the weight matrix of the fully connected layer, is the bias term, is the output feature of the last layer of the model, For the The probability of the class.
5. The method for online detection of electronic detonator bridge wire welding quality according to claim 1, characterized in that: In the above S5, for the electronic detonator determined as unqualified in S4, the specific position coordinates of the welding defect are determined by the minimum circumscribed rectangle algorithm based on the contour features and geometric features extracted in S3. Calculate the covariance matrix , is the transpose of the bias vector, where , is the point set mean, is the total number of contour feature points, and the covariance matrix is decomposed into eigenvalues , is the eigenvector matrix, The eigenvalue diagonal matrix is taken, and the eigenvector corresponding to the maximum eigenvalue is taken as the direction of the long side of the rectangle to construct a rotating coordinate system, and the contour point is projected into the rotating coordinate system to obtain the new coordinate , calculate the minimum and maximum values of the projected coordinates , and finally through the inverse coordinate transformation, according to the formula 、 ,in is the eigenvector and the original Axis angle, For the projected coordinates, determine the coordinates of the four vertices of the minimum enclosing rectangle in the original image coordinate system , and obtain the specific location coordinates of the welding defect.
6. The method for online detection of electronic detonator bridge wire welding quality according to claim 1, characterized in that: In the said S6, according to the judgment result of S4 and the defect position marked by S5, the electronic detonator bridge wire welding quality data is divided into five categories: qualified, cold welding, over-welding, bridge wire breakage and position deviation. If S4 judges it as qualified and S5 does not mark the defect position, it is classified as qualified; if S4 judges it as unqualified and the contour feature at the defect position marked by S5 shows that the contact area between the weld spot and the bridge wire is less than the preset threshold A1 and the angular second-order moment value of the texture feature is lower than the threshold T1, it is classified as cold welding; if the geometric morphological feature at the defect position shows that the diameter of the weld spot is greater than the preset threshold D1 and the contrast value of the texture feature is higher than the threshold T2, it is classified as over-welding; if the contour feature shows that the bridge wire continuity is interrupted and the grayscale value at the interruption is higher than the preset grayscale threshold G1, it is classified as bridge wire breakage; If the geometric features at the defect location show that the deviation between the actual position of the bridge wire and the standard position exceeds the preset deviation threshold O1, it is classified as a position deviation type.
7. A detection system for the online detection method of electronic detonator bridge wire welding quality according to any one of claims 1 to 6, characterized in that: It includes an image acquisition unit, an image preprocessing unit, a feature extraction unit, a quality determination unit, a positioning marking unit and a classification storage unit; The image acquisition unit uses a multi-spectral linear array camera to dynamically and continuously capture the electronic detonator bridge wire welding area on the conveyor track, synchronously capture a dual-channel image sequence of the bridge wire welding position, and transmit the captured image sequence to the image preprocessing unit; The image preprocessing unit performs registration fusion and image preprocessing on the dual-channel image sequence and transmits the result to the feature extraction unit; The feature extraction unit extracts the contour features, texture feature parameters of the bridge wire welding area, the wire diameter of the bridge wire, and the geometric features of the welding point based on the pre-processed fusion image, forms a multi-dimensional feature vector, and inputs it into the quality judgment unit; The quality judgment unit inputs the multidimensional feature vector into the deep learning classification model, outputs a probability value, judges whether the bridge wire welding quality is qualified, and transmits the result to the positioning marking unit and the classification storage unit; For electronic detonators that are judged to be unqualified, the positioning marking unit determines the specific location coordinates of the welding defects based on the extracted contour features and geometric features, marks them with red boxes in the image, and records the real-time position information of the electronic detonators on the conveyor track. The marking results are fed back to the classification storage unit; The classification storage unit classifies the electronic detonator bridge wire welding quality data according to the quality judgment result and the defect position of the positioning mark, and stores it in the corresponding database.
8. The detection system for the online detection method of electronic detonator bridge wire welding quality according to claim 7, characterized in that: The classified storage units are stored in the corresponding databases respectively. Each type of data is associated with the corresponding original image, pre-processed image and feature vector information. Through the index association mechanism, a certain type of welding quality data can be quickly traced and the corresponding original image, pre-processed image and feature vector information can be quickly queried.
Citation Information
Patent Citations
Multi-target vehicle trajectory extraction method based on pixel-level image fusion
CN115457080A
Circuit board surface welding spot quality detection system
CN120219314A