Mine blast hole detecting and positioning method based on binocular vision
Through binocular vision technology and deep learning model, combined with the SE attention mechanism and SGBM stereo matching algorithm, the automatic identification and three-dimensional positioning of mine blast holes are realized, which solves the problems of slow identification and difficult positioning in traditional methods, and improves the efficiency of mining engineering. efficiency and safety.
Patent Information
- Application Number
- CN202410861391.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-08
AI Technical Summary
Traditional mine blast hole detection methods rely on manual measurement and manual marking, resulting in slow identification and difficult positioning, increasing mining engineering costs and limiting production efficiency and safety.
Adopting a detection and positioning method based on binocular vision, collecting data through binocular cameras, performing image preprocessing and data enhancement, using a deep learning target detection model and stereo matching algorithm, combined with the SE attention mechanism module and SGBM stereo matching method, to achieve blasting Automatic identification and three-dimensional positioning of holes.
It improves the recognition speed and positioning accuracy of blast holes, reduces costs, and improves the efficiency and safety of mining projects.
Smart Images

Figure CN118747768A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image processing, and in particular to a mine blasting hole detection and positioning method based on binocular vision. Background Art
[0002] With the continuous development and deepening of mining engineering, the design and implementation of mine blasting holes have become a key link in mine blasting engineering. However, the traditional blasting hole detection method mainly relies on manual measurement and manual marking, which has the problems of slow blasting hole identification and difficult positioning. This not only increases the cost of mining engineering, but also limits its production efficiency and safety. Therefore, the research and application of mine blasting hole detection and positioning has become crucial. Summary of the invention
[0003] The purpose of the present invention is to solve the problem of slow blast hole identification and difficult positioning in the above background, and propose a mine blast hole detection and positioning method based on binocular vision, comprising the following steps:
[0004] S1, using binocular camera to collect blast hole image dataset;
[0005] S2, preprocessing the collected blast hole image data set, including image enhancement processing;
[0006] S3, dividing the preprocessed blast hole image data set into a training set, a validation set, and a test set according to a proportion;
[0007] S4. Use the training set to train the deep learning target detection model to obtain a weight file, and optimize the weight file;
[0008] S5, using a stereo matching algorithm of binocular vision to calculate the blast hole target to obtain three-dimensional information;
[0009] S6. Combine the results obtained in step S4 and step S5 to achieve the purpose of detection and positioning.
[0010] In a preferred solution, the blasthole sample images in step S1 include blasthole images under different illumination intensities, blasthole images under different illumination angles, erroneous blasthole images caused by illumination shadows, and blasthole occlusion images caused by rocks.
[0011] In a preferred solution, the preprocessing of step S2 includes: labeling the blasthole image data set, performing data enhancement processing on the blasthole sample images, labeling the collected blasthole sample images, and obtaining the blasthole target area.
[0012] In the preferred scheme, the data enhancement processing in step S2 includes: darkening the brightness of the blasting hole sample image, brightening the blasting hole sample image, adding random noise to the blasting hole sample image, blurring the blasting hole sample image, randomly cropping the blasting hole sample image, horizontally flipping the blasting hole sample image and vertically flipping the blasting hole sample.
[0013] In a preferred solution, the target measurement algorithm in step S4 includes an SE attention mechanism module;
[0014] The SE attention mechanism module adaptively learns the weight of each channel by introducing Squeeze and Excitation operations, and adaptively adjusts the importance of each channel's features in subsequent network layers through the learned weights.
[0015] In the preferred solution, step S4 specifically includes: using the training set as training data for input and the true label as output, training the YOLOv5 model network to obtain the network model weight; using the trained network weight to identify the blasting hole and detect the blasting hole target area.
[0016] In a preferred solution, the image captured by the binocular camera in step S5 is used to obtain the spatial three-dimensional coordinates (X, Y, Z) of the center point of the blasting hole using a binocular ranging algorithm.
[0017] In the preferred solution, the process of the binocular ranging algorithm includes: binocular camera calibration and binocular image stereo correction;
[0018] Image stereo correction includes the following steps:
[0019] According to the characteristics of radial distortion and the distance from the center, the coordinate changes before and after radial distortion are modeled by polynomial functions. The modeling formula is expressed as:
[0020]
[0021] Among them, (x, y) is the image coordinate under the ideal linear model, (x radial ,y radial ) is the image coordinate under the radial distortion nonlinear model, r = x2 + y2 is the distance from the center, k1, k2 and k3 represent the radial distortion parameters of the camera;
[0022] For tangential distortion, modeling can be performed using the p1 and p2 distortion parameters. The modeling formula is expressed as:
[0023]
[0024] Among them, (x, y) is the image coordinate under the ideal linear model, (x tan, y tan ) are the image coordinates under the tangential distortion non - linear model;
[0025] When both the left and right cameras are pinhole models, and their optical centers \(O_L\), \(O_R\) are on the same horizontal line, the distance between the two optical centers is defined as the baseline of the binocular camera, denoted as \(b\); when any spatial point \(P\) is captured by the binocular camera, its positions in the left and right camera imaging planes are \(P_L\) and \(P_R\) respectively. The baseline of the binocular camera makes the relative positions of \(P_L\) and \(P_R\) with respect to the left and right image origins different. The parallax of the imaging position of point \(P\) on the horizontal axis is denoted as \(d\); the abscissa of the imaging position \(P_L\) is denoted as \(u\) L , and the abscissa of \(P_R\) is denoted as \(u\) R , thus, according to the similar - triangle relationship of \(\triangle PP_LP_R\) and \(\triangle PO_LO_R\), we can get:
[0026]
[0027] After arrangement, it is expressed as:
[0028]
[0029] In the preferred solution, the binocular stereo matching is the SGBM stereo - matching algorithm. Using the horizontal Sobel operator to process the image, the formula is:
[0030] Sobel(x, y)=2[P(x + 1, y)-P(x - 1,y)]+P(x + 1,y1)-P(x - 1,y - 1)+P(x + 1,y + 1)-P(x - 1,y + 1);
[0031] After processing, cost calculation is carried out, and the formula is:
[0032]
[0033] After cost calculation, dynamic programming is carried out on the calculation results, and the formula is:
[0034]
[0035] In the formula, \(L\) is the cost function accumulated by the current path, \(P_1\) and \(P_2\) are the smooth penalties when there are differences in the disparities between the pixel point and its adjacent points, \(P_1\lt P_2\), and in the formula, \(min\) i=dmin,..,dmax \(L\) r \((p - r, i)\) is used to eliminate the influence caused by different path lengths in each direction;
[0036] Add up all the matching costs in the \(r\) direction to get the total matching cost:
[0037] \(S(p, d)=\sum\) r \(L\) r \((p, d)\);
[0038] There are 4 default paths, among which the dynamic planning is very important. The settings of two parameters P1 and P2 are:
[0039]
[0040] cn is the number of channels of the image, SAD WindowSize is the SAD window size.
[0041] The beneficial effects of the present invention are as follows: the present invention uses binocular vision to locate blasting holes and adopts the SGBM stereo matching method. The method uses the BT cost, which is a one-dimensional matching cost. In the application, not only the weighted fused BT cost is generated by using x-sobel and the original image gray, but also the SAD idea is adopted. The neighborhood summation method is used to calculate SAD-BT. The cost calculated in this way is the local block cost. The matching cost of each pixel point will contain the information of the surrounding local area, so that it has the advantages of fast speed and high precision. In terms of detection, the YOLOv5 target detection algorithm with the SE attention mechanism module added is adopted. The SE module can bring significant performance improvements to the existing most advanced deep architecture with minimal additional computing cost. The model designed by the present invention has a clear structure and is relatively easy to design and build. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram of the overall implementation of the present invention.
[0043] Figure 2 It is the geometric model of the binocular vision ranging principle in the present invention.
[0044] Figure 3 This is the flow chart of the SGBM algorithm in the present invention. DETAILED DESCRIPTION
[0045] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0046] Step 1: Use a binocular camera to collect sample images of blastholes, including images of blastholes under different light intensities, images of blastholes under different light angles, images of erroneous blastholes caused by light shadows, and images of blastholes blocked by rocks.
[0047] Step 2: Preprocess the blast hole image dataset, including labeling the blast hole image dataset and performing data enhancement processing on the blast hole sample images; label the collected blast hole sample images and obtain the blast hole target area.
[0048] Step 3: Data enhancement processing, including but not limited to darkening the brightness of the blast hole sample image, brightening the blast hole sample image, adding random noise to the blast hole sample image, blurring the blast hole sample image, randomly cropping the blast hole sample image, horizontally flipping the blast hole sample image, and vertically flipping the blast hole sample.
[0049] Step 4: Divide the data set after data enhancement into training set, validation set and test set in proportion.
[0050] Step 5: The YOLOv5 target detection algorithm with the SE attention mechanism module added is used to train the dataset. The SE module introduces Squeeze and Excitation operations and adaptively learns the weight of each channel to enhance the expressiveness and performance of the neural network, enabling the network to more effectively learn and utilize the relationship between feature channels. It can automatically learn the weight and importance of each channel. Through the learned weights, the SE module can adaptively adjust the importance of the features of each channel in subsequent network layers. In this way, the network can pay more attention to important feature channels, improve the discriminative ability of features, and thus improve the performance of the model.
[0051] Step 6: Use the network model weights obtained in step 5 to identify the blasting holes and detect the target area of the blasting holes.
[0052] Step 7: The blast hole sample image is realized based on a binocular camera, which is installed on the mechanical arm of the charging trolley. The blast hole sample is imaged based on the binocular camera; the binocular camera uses a binocular ranging algorithm to obtain the spatial three-dimensional coordinates (X, Y, Z) of the center point of the blast hole. After determining the spatial three-dimensional coordinates, the charging trolley is used to load the charge; the process of the binocular ranging algorithm includes binocular camera calibration and binocular image stereo correction; according to the characteristics of radial distortion related to the distance from the center, the coordinate changes before and after radial distortion are modeled by a polynomial function, and the modeling formula is expressed as:
[0053]
[0054] Among them, (x, y) is the image coordinate under the ideal linear model, (x radial ,y radiial ) is the image coordinate under the radial distortion nonlinear model, r = x2 + y2 is the distance from the center, k1, k2 and k3 represent the radial distortion parameters of the camera;
[0055] For tangential distortion, modeling can be performed using two tangential distortion parameters, p1 and p2. The modeling formula is expressed as:
[0056]
[0057] Among them, (x, y) are the image coordinates under the ideal linear model, and (x tan , y tan ) are the image coordinates under the tangential distortion non-linear model.
[0058] When both the left and right cameras are pinhole models, and their optical centers OL and OR are on the same horizontal line, the distance between the two optical centers is defined as the baseline (denoted as b) of the binocular camera. When any spatial point P is captured by the binocular camera, its positions in the left and right camera imaging planes are PL and PR respectively. The baseline of the binocular camera causes a difference in the relative positions of PL and PR with respect to the left and right image origins. Since the cameras are horizontally placed, ideally, the imaging position of point P only has a difference on the horizontal axis, and this difference is called disparity (denoted as d). Denote the abscissa of the imaging position PL as u L , and the abscissa of PR as u R . Thus, according to the similar triangle relationship of ΔPPLPR and ΔPOLOR, we can obtain:
[0059]
[0060] After arrangement, we get:
[0061]
[0062] Step 8: Use the semi-global block matching (SGBM) method for binocular stereo matching to obtain the three-dimensional information of the target. First, use the horizontal Sobel operator to process the image. The formula is:
[0063] Sobel(x, y) = 2[P(x + 1, y) - P(x - 1, y)] + P(x + 1, y - 1) - P(x - 1, y - 1) + P(x + 1, y + 1) - P(x - 1, y + 1) (5)
[0064] After processing, perform cost calculation. The formula is:
[0065]
[0066] After cost calculation, perform dynamic programming on it. The formula is:
[0067]
[0068] In the formula, L is the cost function accumulated by the current path, P1 and P2 are the smooth penalties when the disparity between the pixel point and the adjacent point has relatively small and large differences, P1 < P2, and the third term is meaningless and is only used to eliminate the influence caused by different path lengths in each direction. Add up the matching costs in all r directions to obtain the total matching cost, as follows:
[0069] S(p, d) = ∑ r L r (p,d) (8)
[0070] There are 4 paths by default, among which two important parameters P1 and P2 of dynamic planning are set as follows:
[0071]
[0072] cn is the number of channels of the image, and SADWindowSize is the SAD window size.
[0073] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A mine blast hole detection and positioning method based on binocular vision, characterized by: The following steps are involved: S1, using binocular camera to collect blast hole image dataset; S2, preprocessing the collected blast hole image data set, including image enhancement processing; S3, dividing the preprocessed blast hole image data set into a training set, a validation set, and a test set according to a proportion; S4. Use the training set to train the deep learning target detection model to obtain a weight file, and optimize the weight file; S5, using a stereo matching algorithm of binocular vision to calculate the blast hole target to obtain three-dimensional information; S6. Combine the results obtained in step S4 and step S5 to achieve the purpose of detection and positioning.
2. According to claim 1, a method for detecting and locating mine blasting holes based on binocular vision is characterized by: The blast hole sample images in step S1 include blast hole images under different illumination intensities, blast hole images under different illumination angles, erroneous blast hole images caused by illumination shadows, and blast hole occlusion images caused by rocks.
3. According to claim 1, a method for detecting and locating mine blasting holes based on binocular vision is characterized by: The preprocessing of step S2 includes: labeling the blast hole image data set, performing data enhancement processing on the blast hole sample images, labeling the collected blast hole sample images, and obtaining the blast hole target area.
4. The method for detecting and locating mine blasting holes based on binocular vision according to claim 1 is characterized in that: The data enhancement processing in step S2 includes: darkening the brightness of the blast hole sample image, brightening the blast hole sample image, adding random noise to the blast hole sample image, blurring the blast hole sample image, randomly cropping the blast hole sample image, horizontally flipping the blast hole sample image, and vertically flipping the blast hole sample.
5. The method for detecting and locating mine blasting holes based on binocular vision according to claim 1 is characterized in that: The target measurement model in step S4 includes a SE attention mechanism module; The SE attention mechanism module adaptively learns the weight of each channel by introducing Squeeze and Excitation operations, and adaptively adjusts the importance of each channel's features in subsequent network layers through the learned weights.
6. The method for detecting and locating mine blasting holes based on binocular vision according to claim 1 is characterized by: The target detection model in step S4 is a YOLOv5 model. Step S4 specifically includes: taking the training set as training data as input and the true label as output, training the YOLOv5 model to obtain a network weight file; using the trained network weights to identify the blasting holes, and detecting the blasting hole target area.
7. The method for detecting and locating mine blasting holes based on binocular vision according to claim 1 is characterized by: The image captured by the binocular camera in step S5 is used to obtain the spatial three-dimensional coordinates (X, Y, Z) of the center point of the blast hole using a binocular ranging algorithm.
8. The method for detecting and locating mine blasting holes based on binocular vision according to claim 7 is characterized by: The process of binocular ranging algorithm includes: binocular camera calibration and binocular image stereo correction; Image stereo correction includes the following steps: According to the characteristics of radial distortion and the distance from the center, the coordinate changes before and after radial distortion are modeled by polynomial functions. The modeling formula is expressed as: Among them, (x, y) is the image coordinate under the ideal linear model, (x radial ,y radial ) is the image coordinate under the radial distortion nonlinear model, r = x2 + y2 is the distance from the center, k1, k2 and k3 represent the radial distortion parameters of the camera; For tangential distortion, modeling is performed using the p1 and p2 distortion parameters, and the modeling formula is expressed as: Among them, (x, y) is the image coordinate under the ideal linear model, (x tan ,y tan ) is the image coordinate under the tangential distortion nonlinear model; When both the left and right cameras are pinhole models, their optical centers OL and OR are located on the same horizontal line. The distance between the two optical centers is defined as the baseline of the binocular camera, denoted by b. When any spatial point P is captured in the binocular camera, its positions in the imaging planes of the left and right cameras are PL and PR respectively. The baseline of the binocular camera will make the relative positions of PL and PR different from the origins of the left and right images. The parallax of the imaging position of point P on the horizontal axis is denoted by d. The horizontal coordinate of the imaging position PL is marked as u. L , the horizontal coordinate of PR is u R , and thus according to the similar triangle relationship between ΔPPLPR and ΔPOLOR: After sorting, it is expressed as:
9. A method for detecting and locating mine blasting holes based on binocular vision according to claim 8, characterized in that: Binocular stereo matching is the SGBM stereo matching algorithm, which uses the horizontal Sobel operator to process the image. The formula is: Sobel(x,y)=2[P(x+1,y)-P(x-1,y)]+P(x+1,y-1)-P(x-1,y-1)+P(x+1,y+1)-P(x-1,y+1); After processing, the cost is calculated, and the formula is: After the cost calculation, the calculation results need to be dynamically planned. The formula is: where L is the cost function accumulated by the current path, and P1 and P2 are the smooth penalties when there are differences in the disparities between a pixel and its adjacent points, with P1 < P2. used to eliminate the influence caused by different path lengths in each direction; Add up the matching costs of all r directions to get the total matching cost: S(p,d)=∑ r L r (p,d); There are 4 default paths, among which the dynamic planning is very important. The settings of two parameters P1 and P2 are: cn is the number of channels of the image, SAD WindowSize is the SAD window size.
