A method for detecting parameter characteristics of booster tube based on machine vision
Through machine vision detection methods, the problem of low detection accuracy and long time consumption in explosion-transmitting tube detection is solved, and fast and accurate explosion-transmitting tube parameter detection is achieved, which improves the degree of automation.
Patent Information
- Application Number
- CN202310914295.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-07-25
AI Technical Summary
During the existing explosion-transmitting tube detection process, the detection parameters are single, the artificial influence is large, and the time is long, resulting in low detection accuracy and easy damage to the equipment.
Using machine vision-based detection methods, by forming an image acquisition system, image enhancement, edge extraction and feature segmentation are performed, and combined with the Hough transformation algorithm, the parameter characteristics of the explosion-transmitting tube are automatically detected.
It realizes non-contact, fast and accurate detection of explosive tube parameters, reducing artificial damage and improving the degree of automation.
Smart Images

Figure CN117252807B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of machine vision, and in particular relates to a method for detecting parameter characteristics of a squib based on machine vision. Background Art
[0002] Explosive tubes are one type of explosive device used to achieve micro-delay blasting. Their applications include, but are not limited to, military weaponry, tunnel excavation, and mineral mining. The detonating structure, formed together with the detonator, is a critical component of the equipment, and its dimensional, geometric, and positional errors are crucial to its effectiveness. However, current measurement processes suffer from limitations such as limited testing parameters, significant human influence, and lengthy testing times. These issues not only compromise the effectiveness of explosive tubes but also lead to unavoidable waste.
[0003] Therefore, there is an urgent need to improve the traditional production and equipment model of detonator tubes to make the installation process of the equipment more automated and intelligent, saving manpower and material resources. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for detecting the parameter characteristics of a detonator based on machine vision. Compared with traditional measurement, the method has the characteristics of non-contact, rapid calculation, simple operation and accurate detection. It can avoid the number of times the detonator is touched, reduce unnecessary human damage, and also improve the degree of automation.
[0005] The purpose of the present invention is achieved through the following technical solutions:
[0006] A method for detecting parameter characteristics of a squib based on machine vision comprises the following steps:
[0007] S1. Build a machine vision image acquisition system to capture images of the upper surface of the detonator tube;
[0008] S2. Perform image enhancement and noise reduction on the upper surface image of the detonator tube, adjust the region of interest by threshold, and segment the region by feature screening;
[0009] S3, extracting edges of the segmented area to obtain a detonator skeleton;
[0010] S4. Segment the detonator skeleton structure and retain appropriate edges for fitting.
[0011] S5. Fitting to obtain the center position coordinates and size parameters of the upper surface of the detonator tube to obtain the detonator tube contour;
[0012] S6, performing region subtraction between the region generated by the fitted squib contour and the segmented region obtained in step S2 to obtain a remaining region;
[0013] S7, performing sub-pixel extraction on the regional graphic, dividing the region into four mutually disconnected sub-regions to generate different objects, and then applying the Hough transform line detection algorithm to each part to extract the straight line features of the contour image;
[0014] S8. Generate an arc detection area between the two nearest adjacent objects, measure the objects one by one in a clockwise circular direction, and obtain the data for optimal value.
[0015] Furthermore, the image acquisition system assembled in step S1 includes a workbench, a ring light source, an industrial camera and a host computer. The detonator tube is placed on the workbench, the industrial camera is fixed above the detonator tube, a lens is provided at the head of the industrial camera, the ring light source is set at the front end of the lens, and the industrial camera is connected to the host computer through a communication line.
[0016] Preferably, the industrial camera model is MV-CS050-10GM, the notched side of the detonator tube faces the industrial camera, and the industrial camera is located at a height of 35 cm directly above the detonator tube.
[0017] Furthermore, the step S2 includes:
[0018] S20, pre-processing enhances the image, increases the gray value in the image, and increases the background contrast according to the linear formula:
[0019]
[0020] Where g1 is the grayscale value of the image, Gmax and Gmin are the maximum and minimum grayscale values respectively;
[0021] S21, using median filtering to filter salt and pepper noise in the image;
[0022] S22, filtering out the region of interest in the image whose grayscale value is between Gmax and Gmin;
[0023] S23, using regional area features to obtain accurate segmentation areas;
[0024] S24. Fill the obtained segmented area to avoid the existence of small voids.
[0025] Furthermore, step S3 includes:
[0026] S31, performing hysteresis threshold processing;
[0027] S32, calculating the gradient amplitude of the image;
[0028] S33. Use Canny edge detection.
[0029] Furthermore, the step S31 includes:
[0030] To calculate the grayscale value in the double threshold, which is related to the hysteresis threshold, you need to first calculate the horizontal and vertical partial derivatives:
[0031] G x =S×src
[0032] G y =S T ×src
[0033] Where Gx and Gy are the amplitudes of the image gradient in the horizontal and vertical directions respectively, S is the discrete differential operator, and src is the original image pixel.
[0034] Furthermore, the step S32 includes:
[0035] The formula for calculating the gradient amplitude of an image is:
[0036]
[0037] θ=arctan(G y ,G x )
[0038] Wherein, the magnitude of the gradient is G and the direction is θ. Double thresholds are set according to the magnitude of the image gradient. When the gradient of a pixel is greater than or equal to the high threshold, it is retained; when the gradient of a pixel is between the high and low thresholds and is connected to the retained pixel, it is retained.
[0039] Furthermore, the step S7 includes:
[0040] S70, obtaining a processing region by intersecting the image and the region, and visualizing the contour using an inverted image;
[0041] S71, extract using edge detection and apply probabilistic Hough transform;
[0042] S72, dividing the region into four mutually disconnected sub-regions, cyclically generating different objects, and obtaining endpoints of each contour that correspond one to one in a clockwise circumferential direction.
[0043] Furthermore, the step S8 includes:
[0044] Calculate the distance d between points:
[0045]
[0046] Calculate the angle between the two endpoints and the center point:
[0047]
[0048] Where a is the distance between the endpoint and the center point of each feature line, b is the distance between the corresponding point of each feature line of the other object and the center point, and c is the distance between two corresponding points.
[0049] Convert to angle:
[0050] θ=deg(arccos(θ))
[0051] Where deg() is a function that converts radians into degrees.
[0052] The optimal solution is obtained by averaging multiple groups of results.
[0053] The advantages of the present invention are:
[0054] The present invention provides a method for detecting the parameter characteristics of a detonator tube based on machine vision. Compared with traditional measurement, the method is non-contact, fast in calculation, simple in operation, and accurate in detection. It can avoid the number of times the detonator tube is touched, reduce unnecessary human damage, and also improve the degree of automation. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 A flowchart of a method for detecting parameters and features of a squib based on machine vision according to an embodiment of the present invention;
[0056] Figure 2 This is a diagram showing the outer contour and center position results of the method for detecting the parameter characteristics of a squib according to an embodiment of the present invention;
[0057] Figure 3 A diagram showing a deflection result of a method for detecting parameter characteristics of a squib according to an embodiment of the present invention;
[0058] Figure 4 A schematic diagram of the structure of an image acquisition system constructed for the method for detecting parameters and characteristics of a squib according to an embodiment of the present invention;
[0059] In the picture:
[0060] 1-Workbench; 2-Workpiece; 3-Ring light source; 4-Industrial camera; 5-Profile support frame. DETAILED DESCRIPTION
[0061] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments:
[0062] Example
[0063] like Figure 1 As shown, this embodiment is a method for detecting parameter characteristics of a squib based on machine vision, comprising the following steps:
[0064] S1. Build a machine vision image acquisition system to capture images of the top surface of the detonator tube:
[0065] like Figure 4 As shown, the image acquisition system described in this embodiment includes a workbench 1, an annular light source 3, an industrial camera 4, a profile support frame 5, a clamping device, a host computer and a transformer, etc. The profile support frame 5 is fixed on the workbench 1, and the workpiece (detonator) 2 is placed on the workbench 1. The industrial camera 4 is fixed above the detonator through the profile support frame 5. A lens is provided at the head position of the industrial camera, and the annular light source 3 is arranged at the front end of the lens. The industrial camera is connected to the host computer through a communication line; the model of the industrial camera is MV-CS050-10GM, and the notched side of the detonator faces the industrial camera, and the industrial camera is located at a height of 35 cm directly above the detonator.
[0066] S2. Perform image enhancement and noise reduction on the upper surface image of the detonator tube, adjust the region of interest by threshold, and segment the region by feature screening:
[0067] S20, pre-processing enhances the image, increases the gray value in the image, and increases the background contrast according to the linear formula:
[0068]
[0069] Where g1 is the grayscale value of the image, Gmax and Gmin are the maximum and minimum grayscale values respectively;
[0070] S21, using median filtering to filter salt and pepper noise in the image;
[0071] S22. It is calculated that the grayscale value of the region of interest in the image is between Gmax and Gmin, that is, the region with a grayscale value lower than 255 and higher than 135 is screened out;
[0072] S23, further accurately segmenting the region using regional area features;
[0073] S24. Fill the obtained segmented area to avoid the existence of small voids.
[0074] S3. Extract the edges of the segmented area to obtain the detonator skeleton:
[0075] S31, hysteresis threshold processing:
[0076] To calculate the grayscale value in the double threshold, which is related to the hysteresis threshold, you need to first calculate the horizontal and vertical partial derivatives:
[0077] G x =S×src
[0078] G y =S T ×src
[0079] Where Gx and Gy are the amplitudes of the image gradient in the horizontal and vertical directions respectively, S is the discrete differential operator, and src is the pixel point of the original image;
[0080] S32. Calculate the gradient amplitude of the image:
[0081]
[0082] θ=arctan(G y ,G x )
[0083] Where, the magnitude of the gradient is G and the direction is θ. A double threshold is set according to the magnitude of the image gradient. If the gradient of a pixel is greater than or equal to the high threshold, it is retained; if the gradient of a pixel is between the high and low thresholds and is connected to the retained pixel, it is retained together.
[0084] S33. Use Canny edge detection, set the high threshold to 20, the low threshold to 15, and the Alpha input parameter to 50.
[0085] S4. Segment the detonator skeleton structure and retain appropriate edges for fitting.
[0086] S5. Fit the center position coordinates and size parameters of the upper surface of the detonator tube to obtain the detonator tube contour, such as Figure 2 As shown;
[0087] S6, performing region subtraction between the region generated by the fitted squib contour and the segmented region obtained in step S2 to obtain a remaining region;
[0088] S7. Perform sub-pixel extraction on the regional graphics, segment the region into four interconnected sub-regions, generate different objects, and then apply the Hough transform line detection algorithm to each part to extract the straight line features of the contour image:
[0089] S70, obtaining a processing region by intersecting the image and the region, and visualizing the contour using an inverted image;
[0090] S71. Use edge detection and extraction, apply probabilistic Hough transform, take the distance accuracy in pixels as 1, the angle accuracy as pi / 180, the minimum line length as 100, and the maximum collinear segment interval as 50;
[0091] S72, dividing the region into four mutually disconnected sub-regions, cyclically generating different objects, and obtaining endpoints of each contour that correspond one to one in a clockwise circumferential direction.
[0092] S8. Generate an arc-shaped detection area between the two nearest adjacent objects, measure the objects one by one in a clockwise circular direction, and obtain the data for optimal value.
[0093] S80. Calculate the distance between points:
[0094]
[0095] S81. Calculate the angle between the two end points and the center point:
[0096]
[0097] Where a is the distance between the endpoint and the center point of each feature line, b is the distance between the corresponding point of each feature line of the other object and the center point, and c is the distance between two corresponding points.
[0098] S82. Convert to angle:
[0099] θ=deg(arccos(θ))
[0100] In the formula, deg() is used to convert radians into angle values;
[0101] S83. Get the optimal solution by averaging multiple sets of results, such as Figure 3 shown.
[0102] Finally, the further detailed description provided herein in conjunction with specific embodiments, including but not limited to the present embodiment, should be understood by those skilled in the art to include any modifications and equivalent conversions made without departing from the scope of the present invention.
Claims
1. A method for detecting parameters of a booster tube based on machine vision, characterized in that: The following steps are involved: S1. Build a machine vision image acquisition system to capture images of the upper surface of the detonator tube; S2. Perform image enhancement and noise reduction on the upper surface image of the detonator tube, adjust the region of interest by threshold, and segment the region by feature screening; S3, extracting edges of the segmented area to obtain a detonator skeleton; S4. Segment the detonator skeleton structure and retain appropriate edges for fitting. S5. Fitting to obtain the center position coordinates and size parameters of the upper surface of the detonator tube to obtain the detonator tube contour; S6, performing region subtraction between the region generated by the fitted squib contour and the segmented region obtained in step S2 to obtain a remaining region; S7, performing sub-pixel extraction on the remaining area graphics, dividing the area into four mutually disconnected sub-areas to generate different objects, and then applying the Hough transform line detection algorithm to each part to extract the line features of the contour image; S8. Generate an arc detection area between the two nearest adjacent objects, measure the objects one by one in a clockwise circular direction, and obtain the data for optimal value.
2. The method for detecting parameter characteristics of a booster tube based on machine vision according to claim 1, wherein: The image acquisition system assembled in step S1 includes a workbench, a ring light source, an industrial camera and a host computer. The detonator tube is placed on the workbench, the industrial camera is fixed above the detonator tube, a lens is provided at the head of the industrial camera, the ring light source is set at the front end of the lens, and the industrial camera is connected to the host computer through a communication line.
3. The method for detecting parameter characteristics of a booster tube based on machine vision according to claim 2, wherein: The industrial camera model is MV-CS050-10GM. The notched side of the detonator tube faces the industrial camera, and the industrial camera is located at a height of 35 cm directly above the detonator tube.
4. The method for detecting parameter characteristics of a squib based on machine vision according to claim 1, wherein: The step S2 comprises: S20, pre-processing enhances the image, increases the gray value in the image, and increases the background contrast according to the linear formula: Where g1 is the grayscale value of the image, Gmax and Gmin are the maximum and minimum grayscale values respectively; S21, using median filtering to filter salt and pepper noise in the image; S22, filtering out the region of interest in the image whose grayscale value is between Gmax and Gmin; S23, using regional area features to obtain accurate segmentation areas; S24. Fill the obtained segmented area to avoid the existence of small voids.
5. The method for detecting parameter characteristics of a booster tube based on machine vision according to claim 1, wherein: The step S3 comprises: S31, performing hysteresis threshold processing; S32, calculating the gradient amplitude of the image; S33. Use Canny edge detection.
6. The method for detecting parameter characteristics of a booster tube based on machine vision according to claim 5, wherein: The step S31 includes: To calculate the grayscale value in the double threshold, which is related to the hysteresis threshold, you need to first calculate the horizontal and vertical partial derivatives: G x =S×src G y =S T ×src Where Gx and Gy are the amplitudes of the image gradient in the horizontal and vertical directions respectively, S is the discrete differential operator, and src is the original image pixel.
7. The method for detecting parameter characteristics of a booster tube based on machine vision according to claim 6, wherein: The step S32 includes: The formula for calculating the gradient amplitude of an image is: θ=arctane(G y ,G x ) Wherein, the magnitude of the gradient is G and the direction is θ. Double thresholds are set according to the magnitude of the image gradient. When the gradient of a pixel is greater than or equal to the high threshold, it is retained; when the gradient of a pixel is between the high and low thresholds and is connected to the retained pixel, it is retained.
8. The method for detecting parameter characteristics of a booster tube based on machine vision according to claim 1, wherein: The step S7 comprises: S70, obtaining a processing region by intersecting the image and the region, and visualizing the contour using an inverted image; S71, extract using edge detection and apply probabilistic Hough transform; S72, dividing the region into four mutually disconnected sub-regions, cyclically generating different objects, and obtaining endpoints of each contour that correspond one to one in a clockwise circumferential direction.
9. The method for detecting parameter characteristics of a booster tube based on machine vision according to claim 1, wherein: The step S8 comprises: Calculate the distance d between points: Calculate the angle between the two endpoints and the center point: Where a is the distance between the endpoint and the center point of each feature line, b is the distance between the corresponding point of each feature line of the other object and the center point, and c is the distance between two corresponding points. Convert to angle: θ=deg(arccos(θ)) where deg() is a function that converts radians into degrees. The optimal solution is obtained by averaging multiple groups of results.
Citation Information
Patent Citations
Power transmission and distribution transformer high-voltage winding winding angle detection method based on visual detection
CN115457276A
Object detection method, object detection device, terminal device, and medium
WO2021114775A1