Method for sampling tunnel face muck
By combining handheld blasting debris positioning equipment with training algorithms, the accurate identification and collection of blasting debris samples were achieved, solving the problems of low sampling efficiency and difficulty in accurate traceability in existing technologies, and improving the safety and economy of tunnel engineering.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CENT SOUTH UNIV
- Filing Date
- 2026-04-28
- Publication Date
- 2026-05-29
AI Technical Summary
Existing blasting sampling methods in tunnel engineering cannot accurately trace the slag samples back to the original area of the tunnel face, resulting in inaccurate calibration of rock mechanical parameters and affecting support design and construction safety.
A handheld slag positioning device was used to capture and analyze images of slag piles after blasting. A trained slag positioning algorithm was used to identify and filter colored slag. The three-dimensional coordinates of the slag were calculated by combining a laser irradiation module and an IMU inertial measurement module, so as to achieve accurate picking of slag samples.
This improved the efficiency and precision of the blasting sampling process, enabled precise tracing of slag samples against the original area of the tunnel face, ensured the accuracy of rock parameter calibration results, and enhanced the safety and economy of tunnel engineering.
Smart Images

Figure CN122108667A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of tunnel engineering monitoring technology, and in particular to a method for sampling slag and rock at the tunnel face. Background Technology
[0002] In tunnel construction, the mechanical parameters of the rock mass at the tunnel face (such as compressive strength and tensile strength) are core foundational data guiding engineering design and construction progress. These parameters need to be obtained by sampling the rock mass at the tunnel face, processing it into standard test specimens, and then calibrating them through professional tests such as uniaxial compressive strength tests and Brazilian splitting tests. The accuracy of these parameters directly determines the scientific validity of key aspects such as support scheme design, construction risk prediction, and schedule optimization. If the parameter deviation is too large, it may lead to insufficient support causing collapse accidents, or excessive support causing delays and cost waste. Therefore, the representativeness and accuracy of the sampling process are crucial to the safe and efficient progress of tunnel engineering.
[0003] Currently, the mainstream sampling methods at the tunnel face in engineering projects are mainly divided into three categories: advanced horizontal geological drilling sampling, manual block sampling at the tunnel face, and blasting sampling. While advanced horizontal geological drilling sampling can ensure the consistency and regional correspondence of the sample muck pile images, the drilling operation is time-consuming and the equipment investment cost is high, which contradicts the tight schedule requirements and economic demands of tunnel engineering. Manual block sampling at the tunnel face requires technicians to directly chisel rock samples at the face, which is not only limited by working space and inefficient, but may also cause additional disturbance to the rock mass at the tunnel face, affecting the objectivity of the sampling; it is only suitable for small-scale, low-frequency sampling scenarios. In contrast, blasting sampling simultaneously obtains muck samples through conventional blasting procedures at the tunnel face, without requiring additional independent working time, with low equipment dependence, and can maximize the adaptation to project schedule and economic benefits, making it the most widely used sampling method in tunnel engineering.
[0004] However, the widespread application of blasting sampling has not solved the core problem of accurate sample location. The current process for screening slag samples still heavily relies on manual operation, presenting significant limitations. Specifically, after blasting at the tunnel face, slag is irregularly scattered in all directions due to the impact of the blast. Subsequent conveyor belt transport, muck truck transfer, and on-site storage completely disrupt the original spatial location of the samples. After ventilation, geological engineers or technicians must manually collect samples from under the bucket, on the surface of the slag heap, or beside the conveyor belt during the muck removal process. They can only rely on experience to judge the size suitability of the samples and the overall representativeness of the tunnel face, making it impossible to trace the original area of the tunnel face corresponding to each piece of slag. This deficiency directly results in experimentally calibrated rock mechanical parameters only reflecting the overall characteristics of the tunnel face rock mass, failing to achieve precise regional correspondence. In reality, the tunnel face rock mass often exhibits significant heterogeneity; different areas have differences in lithology, fracture development, and slag heap characteristics, and the corresponding mechanical parameters may also differ significantly. If construction is guided solely by overall parameters, it will result in a lack of detailed basis for support design, risk prediction, and other work, making it difficult to take targeted prevention and control measures for weak areas. This may not only create safety hazards but also hinder the accurate control of project costs. Therefore, achieving accurate traceability between slag samples and the original area of the tunnel face, and breaking through the bottleneck of precision in manual sampling, has become an urgent technical requirement to be addressed in the sampling process of tunnel engineering.
[0005] Therefore, it is necessary to provide a new method for sampling slag after blasting at the working face to solve the above-mentioned technical problems. Summary of the Invention
[0006] The main objective of this invention is to provide a method for sampling slag at the tunnel face, which aims to solve the problems of low sampling efficiency and inability to accurately trace slag samples back to the original area of the tunnel face in existing methods.
[0007] To achieve the above objectives, the present invention proposes a method for sampling slag at a tunnel face, comprising the following steps: S1: Divide the working face of the rock parameters to be calibrated into regions, and use different colored paints to paint different regions of the working face to be sampled. S2: The working face to be sampled is blasted, and after ventilation, a calibrated handheld slag positioning device is used to take pictures of the blasted slag pile. S3: Handheld slag and stone positioning device based on trained... The slag and stone localization algorithm identifies and filters several effective colored slag stones in the slag and stone pile image, and calculates the three-dimensional coordinates of each effective colored slag stone in the initial camera coordinate system. S4: Control the laser irradiation module of the handheld slag positioning device to align with the three-dimensional coordinates of an effective colored slag in the slag pile image. S5: After the currently aligned valid colored slag is picked up, press the switch button on the handheld slag positioning device to make the control terminal calculate the relative coordinates of the next valid colored slag based on the coordinates of the current handheld slag positioning device. S6: The control terminal controls the laser irradiation module of the handheld slag positioning device to align with the relative coordinates of the next effective colored slag. S7: Repeat S5 and S6 until the number of slag and stone collected reaches the set total number of slag and stone samples.
[0008] Optionally, in step S2, the handheld slag positioning device includes a main frame, a camera, a lighting lamp, a laser illumination module, a laser rangefinder, an IMU (Inertial Measurement Unit) module, and a control terminal. The camera is mounted on the main frame and is used to capture images of the slag pile. The camera is electrically connected to the control terminal. The lighting lamp is mounted on the camera and provides light to the camera's shooting area. The laser illumination module is mounted on the main frame and electrically connected to the control terminal. The laser illumination module can emit laser light and adjust the direction of the laser light. The laser rangefinder is mounted on the camera and is connected to the camera's light source. The laser rangefinder is electrically connected to the control terminal, and the laser axis is set parallel to the camera. The inertial measurement unit (IMU) is mounted on the camera and is used to measure the azimuth, pitch, and rotation angles of the camera around the camera's optical axis. The control terminal is electrically connected to the camera, the laser irradiation module, the laser rangefinder, and the IMU, and can calculate the horizontal and pitch rotation angles of the laser irradiation module pointing towards the effective colored slag based on the images of the slag pile taken by the camera and the measurement data from the laser rangefinder and the IMU. Based on the calculation results, the control terminal moves the laser irradiation template to align the laser beam with the corresponding effective colored slag.
[0009] Optionally, in step S2, the calibration steps for the handheld slag and stone positioning device are as follows: The intrinsic parameter matrix of the camera is obtained by calibrating its intrinsic parameters using the checkerboard calibration method. Specifically: ① Make a target board, which is a chessboard grid flat plate with multiple evenly distributed marking points; ② Set up the handheld slag positioning device on a tripod and level it, so that the camera's optical axis is perpendicular to the checkerboard grid plate; ③ Obtain the intrinsic parameter matrix by calibrating the camera's intrinsic parameters using the checkerboard calibration method. The specific formula is as follows: ; in: The horizontal focal length per pixel for the camera. The vertical focal length of the camera's pixels. The x-coordinate of the center pixel of the camera image. The vertical coordinate of the center pixel of the camera image; The calibration of the camera's horizontal pixels and the horizontal rotation angle of the laser beam is completed based on the corresponding data of the pixel's horizontal coordinate and the laser beam's horizontal rotation angle. Specifically, this includes: ① Control the laser irradiation module to move the laser beam's landing point to the leftmost marker on the target plate, and record the horizontal angle encoder value of the laser irradiation module at this time. θ hmin And the pixel coordinates of the marker point in the camera view. u left ; ② Next, move the laser point to the far right and record the horizontal angle encoder value of the laser irradiation module at this time. And the pixel coordinates of the marker point in the camera view. ; ③ Between the leftmost and rightmost markers, select multiple intermediate points evenly and repeatedly record the corresponding data of the pixel horizontal coordinate and the horizontal angle encoder value to complete the matching calibration of the camera's horizontal pixels and the laser's horizontal rotation angle. Pitch rotation angle based on laser illumination module and the pixel ordinate v of the laser beam landing point Fit the actual depth The pixel ordinate v is the independent variable, and the pitch and rotation angles are... is a surface function of the dependent variable.
[0010] Optionally, S3 includes; S3.1, Regarding the existing The algorithm is constructed by the following improvements. Slag and stone positioning algorithm: In the existing A color perception module is embedded after the first and second C2f modules of the algorithm backbone network to process the color enhancement stream and the illumination invariant stream in parallel; The feature maps output by the color enhancement stream and the illumination invariant stream are fused and fed back to the backbone network; Based on the existing standard FPN / PAN neck network of the YOLOv8 algorithm, two cross-granularity feature fusion paths are introduced to obtain a multi-granularity feature pyramid; An adaptive size filtering module is embedded at the output of the detection head of the multi-granularity feature pyramid; S3.2, Construct a training dataset and use the training dataset to... The slag and stone positioning algorithm is trained to obtain a well-trained algorithm. A slag and rock localization algorithm, wherein the training dataset includes N labeled images of slag and rock piles; S3.3, based on pre-trained The slag and stone location algorithm identifies and filters several valid colored slag and stone stones in a slag and stone pile image; S3.4 Obtain the initial coordinates of the effective colored slag stones, and perform rotation correction on the initial coordinates of the effective colored slag stones based on the rotation angle around the optical axis of the camera to obtain the standard pixel coordinates of the effective colored slag stones. S3.5. Calculate the actual depth of the slag based on the standard pixel coordinates of the effective colored slag, the pitch angle measured by the IMU inertial measurement module, and the slag distance measured by the laser rangefinder 1.5. ; S3.6. Based on the actual depth of the slag and the camera's intrinsic parameter matrix, convert the standard pixel coordinates of the effective colored slag into three-dimensional coordinates in the initial camera coordinate system.
[0011] Optionally, in step S3.1, the color enhancement stream employs a set of convolutional kernels to extract strong color difference features in the HSV color space or specific RGB channels to amplify the target color signal. The specific color enhancement stream processing procedure is as follows: ① The input image of the slag heap has been verified by existing systems. After initial convolution and pooling processing of the algorithm backbone network, it passes through the first C2f module and the second C2f module in sequence, and outputs a feature map that corresponds to the spatial dimension of the input slag heap image; where: each pixel of the feature map corresponds to a local region of the input slag heap image, and retains the basic information of the slag heap image; ② Perform channel conversion on the obtained feature map to convert it from the original RGB color space to the HSV color space; ③ A set of 3×3 small convolution kernels is used to perform convolution operation on the feature map of the HSV color space to obtain the convolutional feature map. The weight allocation of the convolution kernel is optimized for the feature color of the target slag in the input slag pile image, so as to amplify the feature signal intensity corresponding to the target color region in the input slag pile image, while weakening the feature response of the background region and non-target color region in the input image, to ensure that the color feature of the target slag in the input image is accurately captured. ④ Normalize the feature map after convolution to obtain the feature map output by the color enhancement stream; The illumination-invariant current employs a simplified self-attention mechanism to learn which regions in the feature map are most affected by illumination and dust interference, suppressing unreliable regions and enhancing reliable regions. Specifically: ① The feature map output by the C2f module is used to generate query vector Q and key vector K through 1×1 convolution, and the input feature map is directly used as the feature weighting source. ② Calculate the spatial correlation between the query vector Q and the key vector K to obtain the spatial attention map; ③ Perform Sigmoid activation on the spatial attention map to generate a weight mask with values between 0 and 1. Regions with weights close to 0 correspond to unreliable regions with the most severe interference, while regions with weights close to 1 correspond to regions with reliable features and less interference. ④ Perform spatial dimension weighting operations on the weight mask and the input feature map. By assigning weights, suppress the feature responses of unreliable regions, retain and enhance the effective features of reliable regions, and obtain the feature map of illumination invariant current output.
[0012] Optionally, the two cross-granularity feature fusion paths in S3.1 are an ultrafine-grained injection path and an ultracoarse-grained injection path. The ultrafine-grained injection path is derived from the shallowest layer of the backbone network. By upsampling and convolution, the size and number of channels of the feature map output by the shallowest layer of the backbone network are adjusted, and the adjusted feature map is directly fused to the input features of the intermediate layer detection head. The ultracoarse-grained injection path is derived from the deepest layer of the backbone network. A dilated spatial pyramid pooling module is used to process the feature map output by the deepest layer of the backbone network. Through multiple parallel dilated convolutions with different dilation rates, multi-scale contextual information is efficiently captured to obtain the processed feature map without loss of resolution. After upsampling, the processed feature map is directly fused to the input of the shallower layer detection head. The adaptive size filtering module in S3.1 can filter out slag stones with a size smaller than a set size threshold. The specific formula for the slag stone size is as follows: ; ; in: The actual width of the slag. This refers to the actual height of the slag and stone. The coordinates of the top-left pixel corner of the bounding box of the slag are given. The coordinates of the bottom right corner of the target bounding box (pixel coordinates). The focal length of the camera lens. The depth coordinates of the slag in the feature map.
[0013] Optionally, in S3.4, the specific formula for rotation correction is as follows: ; in: As the initial x-coordinate, The x-coordinate is the standard pixel coordinate. The standard pixel ordinate, The offset angle around the camera's optical axis, measured by the IMU inertial measurement module; In S3.5, the specific formula for calculating the actual depth is as follows: ; in: The vertical coordinate of the pixel at the center of the camera image. This represents the approximate depth of the camera image center as measured by a laser rangefinder 1.5. This refers to the pitch angle of the current handheld slag and stone positioning equipment.
[0014] Optionally, S3.6 includes: S3.6.1 Establish the initial camera coordinate system, specifically: take the optical center of the camera lens as the origin Oc, the extension direction of the camera's optical axis as the Zc axis of the initial camera coordinate system, and the Zc axis direction is the depth direction of the slag; take the horizontal rightward direction of the camera image as the Xc axis of the initial camera coordinate system, and take the vertical upward direction of the camera image as the Yc axis of the initial camera coordinate system. S3.6.2. Based on the actual depth of the slag and the camera's intrinsic parameter matrix, the standard pixel coordinates of the effective colored slag are transformed into three-dimensional coordinates in the initial camera coordinate system using the pinhole imaging principle. The specific formula is as follows: ; in: Let be the horizontal offset of the slag in the initial camera coordinate system. Let be the vertical offset of the slag in the initial camera coordinate system. The depth coordinates of the slag in the initial camera coordinate system.
[0015] Optionally, S4 includes: S4.1. Using the three-dimensional coordinates of the slag as a reference, calculate the horizontal rotation angle of the laser irradiation module pointing towards the effectively colored slag. and pitch and rotation angle The specific formula is as follows: ; ; S4.2 The control terminal drives the horizontal rotation mechanism and the pitch rotation mechanism of the laser irradiation module to complete the rotation of the corresponding angles based on the horizontal rotation angle and the pitch rotation angle, so that the laser beam is aligned with the three-dimensional coordinates of the effective colored slag stone.
[0016] Optionally, in step S5, calculating the relative coordinates of the next effective colored slag based on the coordinates of the current handheld slag positioning device specifically includes: Establish a new camera coordinate system at the current location; The coordinate difference ΔP between the new camera coordinate system and the initial camera coordinate system was recorded using the IMU inertial measurement module. , , ), and the rotation matrix between the new camera coordinate system and the initial camera coordinate system. ; Based on rotation matrix The relative coordinates of the next slag heap are calculated by taking its coordinates in the initial camera coordinate system. The specific formula is as follows: ; in: Let the X-axis coordinate of the next piece of slag be in the new camera coordinate system. Let the next piece of slag be the Y-axis coordinate in the new camera coordinate system. Let Z be the Z-axis coordinate of the next piece of slag in the new camera coordinate system.
[0017] This invention uses a handheld blasting positioning device to capture images of the blasted blast pile, and then uses a trained [system / technology] to [analyze / analyze] the images. The slag and rock positioning algorithm identifies and filters several valid colored slag and rock in the slag and rock pile image, which can accurately identify the location of the required slag and rock, greatly improve the efficiency of the entire blasting and sampling process, refine and systematize the blasting and sampling process, and subsequently obtain the rock parameter calibration results from different colored areas on the working face, so as to achieve accurate traceability between the slag and rock samples and the original area of the working face. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the method for sampling slag at the tunnel face in an embodiment of the present invention. Figure 2 This is an installation diagram of the handheld slag positioning device during calibration in an embodiment of the present invention; Figure 3 This is a schematic diagram of the calibration structure of the handheld slag positioning device in an embodiment of the present invention; Figure 4 for Figure 3 Top view.
[0020] Explanation of icon numbers: 1. Handheld slag positioning device, 1.1 Main frame, 1.1.1 Handle, 1.2 Camera, 1.3 Lighting lamp, 1.4 Laser irradiation module, 1.4.1 Infrared transmitter, 1.4.2 Servo motor, 1.5 Laser rangefinder, 1.6 Control terminal, 1.7 Power supply, 1.8 Hinges, 2. Tripod, 3. Slag pile.
[0021] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and vividly described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0023] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0024] Furthermore, in this invention, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0025] In this invention, unless otherwise explicitly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise explicitly limited. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0026] Furthermore, the technical solutions of the various embodiments of the present invention can be combined with each other, but only if they are feasible for those skilled in the art. If the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such combination of technical solutions does not exist and is not within the scope of protection claimed by the present invention.
[0027] This invention proposes a method for sampling slag at the tunnel face, aiming to solve the problems of low sampling efficiency and inability to accurately trace slag samples back to the original area of the tunnel face in existing methods.
[0028] See Figures 1 to 4 This embodiment provides a method for sampling slag at a tunnel face, including the following steps: S1: Divide the tunnel face where rock parameters need to be calibrated into regions, and apply different colored paints to different areas of the tunnel face to be sampled. In this embodiment, the area on the tunnel face is demarcated according to sampling requirements, and the area is painted with different colors for different regions. Colors with significant hue differences are selected, and the required pigments should have impact resistance and the ability to withstand short-term high temperatures to improve the robustness of the subsequently trained YOLOv8 model in complex environments. The key points of the tunnel face painting scheme are as follows: (1) Based on the site conditions, the rocks in the face area where rock parameters need to be marked are colored. Due to different actual conditions, there may be an indefinite number of face areas of different sizes. Just use different colors to distinguish them. However, when choosing pigments, you must choose colors with large hue differences. For example, when there are 6 areas in a face, use six colors: red, yellow, green, blue, purple, and white to distinguish them.
[0029] (2) The selected area should cover the area between the cut hole and the auxiliary hole as much as possible, because the area around the cut hole is a dense blasting area with a larger amount of debris.
[0030] S2: The working face to be sampled is blasted, and after ventilation, the calibrated handheld slag positioning device 1 is used to take pictures of the blasted slag pile 3. In step S2, the handheld slag positioning device 1 includes a main frame 1.1, a camera 1.2, a lighting lamp 1.3, a laser irradiation module 1.4, a laser rangefinder 1.5, an IMU (Inertial Measurement Unit) module, and a control terminal 1.6. The camera 1.2 is mounted on the main frame 1.1 and is used to capture images of the slag pile 3. The camera 1.2 is electrically connected to the control terminal 1.6. The lighting lamp 1.3 is mounted on the camera 1.2 and provides light to the area it captures. The laser irradiation module 1.4 is mounted on the main frame 1.1 and is electrically connected to the control terminal 1.6. The laser irradiation module 1.4 can emit laser light and adjust its direction. The laser rangefinder 1.5 is mounted on the camera 1.2 and is used for laser ranging. The laser rangefinder 1.5 is set parallel to the optical axis of the camera 1.2, and the laser rangefinder 1.5 is electrically connected to the control terminal 1.6. The IMU inertial measurement module is electrically connected to the control terminal and is used to measure the azimuth angle, pitch angle, and rotation angle around the optical axis of the camera 1.2. The control terminal 1.6 is electrically connected to the camera 1.2, the laser irradiation module 1.4, the laser rangefinder 1.5, and the IMU inertial measurement module, and can calculate the horizontal rotation angle and pitch rotation angle of the laser irradiation module 1.4 pointing towards the effective colored slag based on the image of the slag pile taken by the camera 1.2 and the measurement data of the laser rangefinder 1.5 and the IMU inertial measurement module. Based on the calculation results, it controls the movement of the laser irradiation template to align the laser beam with the corresponding effective colored slag.
[0031] In this embodiment, camera 1.2 is an industrial camera with a resolution greater than 24 million pixels; it uses a back-illuminated CMOS sensor and an aperture lens of F1.8 or larger to ensure sufficient light intake; it supports video streams of ≥30fps, with a shutter speed range covering 1 / 4000 second to several seconds, and meets IP65 or higher (dustproof and water-resistant) standards. It has a high-speed interface (such as USB 3.0) and can output video streams in real time for subsequent YOLOv8 algorithm processing.
[0032] In this embodiment, the lighting lamp 1.3 is mounted on the camera 1.2 and rigidly connected to it, which can provide sufficient light to the front of the camera 1.2 at any time.
[0033] In this embodiment, the control terminal 1.6 includes a control panel that is rotatably connected to the main frame 1.1 via a hinge 1.8. The control terminal 1.6 uses reComputer Industrial R20xx, and the trained YOLOv8 model is directly deployed on it. Its built-in Hailo AI accelerator ensures high-speed operation of YOLOv8, enabling smooth real-time recognition and selection of colored slag. The control terminal 1.6 is connected to the camera 1.2 via a data cable.
[0034] In this embodiment, the laser irradiation module 1.4 consists of an infrared emitting device 1.4.1 and a servo motor 1.4.2. The servo motor 1.4.2 includes a pitch motor and a horizontal rotation motor connected to the control terminal 1.6. The servo motor 1.4.2 receives signals from the control terminal 1.6 and automatically controls the laser irradiation module 1.4 to perform pitch and horizontal rotation movements at a specified angle, automatically aligning with the slag and stone selected in the image of the camera 1.2.
[0035] In this embodiment, the main frame, camera, lighting, laser illumination module, laser rangefinder, IMU inertial measurement module, and control terminal are integrated into a handheld slag positioning device. The IMU inertial measurement module is mounted on camera 1.2 and is used to measure the azimuth angle of camera 1.2 relative to its initial state (calibration). α Pitch angle and the angle of rotation about the optical axis ;Main Frame 1.1 Considering the need for explosion-proof and dust-proof, as well as the portability of handheld devices, opaque acrylic sheets are selected to build the frame of the above 6 components.
[0036] In this embodiment, the handheld slag positioning device 1 also includes a power supply 1.7 for power supply, and the main frame 1.1 is also provided with a handle 1.1.1 for the operator to hold.
[0037] In this embodiment, the handheld slag positioning device 1 also includes a switching button electrically connected to the control terminal. By pressing the switching button on the handheld slag positioning device 1, the control terminal calculates the relative coordinates of the next valid colored slag based on the current coordinates of the handheld slag positioning device 1. In this embodiment, the control terminal is equipped with the switching button, which is used to trigger the control terminal to calculate the relative coordinates of the next valid colored slag.
[0038] In this embodiment, the operator first takes a picture of the slag pile using the camera of the handheld slag positioning device 1, and then transmits the picture to the control terminal 1.6. At the same time, the horizontal rotation angle and pitch rotation angle of the laser irradiation module 1.4 pointing at the effective colored slag are calculated using the measurement data of the laser rangefinder 1.5 and the IMU inertial measurement module. The calculated data is then transmitted to the pitch motor and horizontal rotation motor of the laser irradiation module to automatically control the laser irradiation module 1.4 to perform pitch and horizontal rotation at the specified angles, automatically aligning with the slag selected in the image of the camera 1.2. Then, by pressing the switch button, the control terminal is triggered to calculate the relative coordinates of the next effective colored slag based on the coordinates of the current handheld slag positioning device 1, thereby realizing the continuous picking of multiple slags.
[0039] In step S2, the calibration steps for the handheld slag positioning device 1 are as follows: The intrinsic parameter matrix of camera 1.2 is obtained by calibrating its intrinsic parameters using the checkerboard calibration method. Specifically: ① Make a target board, which is a chessboard grid flat plate with multiple evenly distributed marking points; ② Set up the handheld slag positioning device on tripod 2 and level it, so that the optical axis of the camera 1.2 is perpendicular to the chessboard grid plate; ③ The intrinsic parameter matrix of camera 1.2 is obtained by completing the intrinsic parameter calibration using the checkerboard calibration method. The specific formula is as follows: ; in: The horizontal focal length of the camera is 1.2 pixels. The vertical focal length of the camera is 1.2 pixels. The x-coordinate of the center pixel of the camera's 1.2 image. The vertical coordinate of the center pixel of the camera's 1.2 image; Based on the corresponding data of pixel horizontal coordinates and laser beam horizontal rotation angles, the calibration of the camera's 1.2 horizontal pixels and the laser beam horizontal rotation angles is completed, specifically including: ① Control the laser irradiation module 1.4 to move the laser beam landing point to the leftmost marker point on the target plate, and record the horizontal angle encoder value of the laser irradiation module 1.4 at this time. θ hmin And the pixel coordinates of the marker point in the camera's 1.2 view. u left ; ② Next, move the laser point to the far right and record the horizontal angle encoder value of the laser irradiation module 1.4 at this time. θ hmaxAnd the pixel coordinates of the marker point in the camera's 1.2 view. u right ; ③ Between the leftmost and rightmost markers, select multiple intermediate points evenly and repeatedly record the corresponding data of the pixel horizontal coordinate and the horizontal angle encoder value to complete the matching calibration of the camera's 1.2 horizontal pixels and the laser horizontal rotation angle; Pitch rotation angle based on laser illumination module 1.4 and the pixel coordinates of the laser beam's landing point Fit the actual depth Pixel ordinate The independent variable is the pitch and rotation angle. The dependent variable is a surface function. In this embodiment, the holding device is respectively in At ranging positions of 3, 5, and 7 meters, the laser point is controlled to move vertically to the top, middle, and bottom corners of the target board's three leftmost, middle, and rightmost checkerboard grids (a total of 9 feature points); for each feature point, the pitch and rotation angles are recorded. and the vertical coordinate of laser point pixels All data collected at three distances The Python code uses scikit-learn's PolynomialFeatures module and LinearRegression module to fit the data, automatically fitting the data based on the distance to the slag. Pixel ordinate The independent variable is the pitch and rotation angle. Surface function of the dependent variable .
[0040] S3: Handheld slag positioning device 1 based on trained... The slag and stone localization algorithm identifies and filters several effective colored slag stones in the slag and stone pile image 3, and calculates the three-dimensional coordinates of each effective colored slag stone in the initial camera coordinate system. In this embodiment, based on the trained... The slag and stone localization algorithm first identifies and selects all slag and stones with the target color in the image. At the same time, based on the preset slag and stone size threshold (which can be adjusted according to sampling requirements, such as minimum side length ≥ 10cm), it automatically filters out invalid slag and stones that are too small.
[0041] To address the challenges in identifying slag and gravel where color is the primary feature but is susceptible to interference from tunnel lighting and dust, and where varying slag and gravel sizes and stacking obstructions make feature extraction difficult, this paper proposes... The algorithm has undergone the following changes; S3 includes: S3.1, Regarding the existing The algorithm is constructed by the following improvements. Slag and stone positioning algorithm: In the existing A color perception module is embedded after the first and second C2f modules of the algorithm backbone network to process the color enhancement stream and the illumination invariant stream in parallel; In step S3.1, the color enhancement stream uses a set of convolutional kernels to extract strong color difference features in the HSV color space or specific RGB channels to amplify the target color signal. The specific color enhancement stream processing procedure is as follows: ① The input image of the slag heap 3 is based on existing data. After initial convolution and pooling processing of the algorithm backbone network, it passes through the first C2f module and the second C2f module in sequence, outputting a feature map that corresponds to the spatial dimension of the input slag heap 3 image; wherein: each pixel of the feature map corresponds to a local region of the input slag heap 3 image, and retains the basic information of the slag heap 3 image; in this embodiment, the basic information includes image color and edge information.
[0042] ② Perform channel conversion on the obtained feature map, converting it from the original RGB color space to the HSV color space; In this embodiment, because the HSV color space can separate brightness and color information, it has stronger robustness to brightness changes caused by tunnel illumination fluctuations in the input image, and can effectively avoid the interference of illumination changes on the recognition of target slag color features in the input image.
[0043] ③ A set of 3×3 small convolution kernels is used to perform convolution operations on the feature map of the HSV color space to obtain the convolutional feature map. The weight allocation of the convolution kernels is optimized for the feature color of the target slag in the input slag pile 3 image, so as to amplify the feature signal intensity corresponding to the target color region in the input slag pile 3 image, while weakening the feature response of the background region and non-target color region in the input image, to ensure that the color feature of the target slag in the input image is accurately captured.
[0044] ④ Normalize the feature map after convolution to obtain the feature map output by the color enhancement stream.
[0045] The illumination-invariant current employs a simplified self-attention mechanism to learn which regions in the feature map are most affected by illumination and dust interference, suppressing unreliable regions and enhancing reliable regions. Specifically: ① The feature map output by the C2f module is used to generate query vector Q and key vector K through 1×1 convolution, and the input feature map is directly used as the feature weighting source. In this embodiment, the complex multi-head attention structure in the prior art is not used, nor is the value vector V independently learned. The input feature map is directly used as the feature weighting source, which greatly reduces the number of parameters and the amount of computation, and adapts to the real-time requirements of tunnel scenarios.
[0046] ② Calculate the spatial correlation between the query vector Q and the key vector K to obtain the spatial attention map; this attention map can accurately characterize the severity of light and dust interference in each region of the feature map.
[0047] ③ Perform Sigmoid activation on the spatial attention map to generate a weight mask with values between 0 and 1. Regions with weights close to 0 correspond to unreliable regions with the most severe interference, while regions with weights close to 1 correspond to regions with reliable features and less interference.
[0048] ④ Perform spatial dimension weighting operations on the weight mask and the input feature map. By assigning weights, suppress the feature responses of unreliable regions, retain and enhance the effective features of reliable regions, and obtain the feature map of illumination invariant current output.
[0049] In this embodiment, a simplified self-attention mechanism is used to achieve lightweight model on the device, and a weight mask is introduced to achieve precise suppression of lighting and dust interference.
[0050] The feature maps output from the color enhancement stream and the illumination invariant stream are fused and fed back to the backbone network. In this embodiment, the outputs of the two streams are fused and fed back to the backbone network. This is equivalent to installing a "color filter" and a "dehazing filter" on the network early on, enabling it to focus on color features from the very beginning and resist environmental interference.
[0051] In the existing Based on the standard FPN / PAN neck network of the algorithm, two cross-granularity feature fusion paths are introduced to obtain a multi-granularity feature pyramid. In this embodiment, to enhance the detection capability of slag with large scale differences and varying degrees of occlusion, two additional cross-granularity feature fusion paths are introduced on the basis of the standard FPN / PAN neck network to construct a multi-granularity feature pyramid. This structure ultimately outputs multiple feature maps (80×80, 40×40, and 20×20 feature maps in this embodiment) for detection. The key is that each output map fuses information from three levels: the current layer, finer granularity (higher resolution), and coarser granularity (stronger semantics), thus forming a more information-rich "multi-granularity" feature.
[0052] The two cross-granularity feature fusion paths in S3.1 are the ultrafine-grained injection path and the ultracoarse-grained injection path. The ultrafine-grained injection path is derived from the shallowest layer of the backbone network (in this embodiment, the stage of generating an 80×80 feature map, which contains the richest edge, corner, and texture details). The size and number of channels of the feature map output from the shallowest layer of the backbone network are adjusted through upsampling and convolution, and the adjusted feature map is directly fused to the input features of the intermediate layer detection head. The ultracoarse-grained injection path is derived from the deepest layer of the backbone network (in this embodiment, the stage of generating a 20×20 feature map, which contains the strongest "slag" category and global context information). A hollow spatial pyramid pooling module is used to process the backbone network. The feature map output from the deepest layer is processed through multiple parallel dilated convolutions with different dilation rates to efficiently capture multi-scale contextual information without loss of resolution, resulting in a processed feature map that can better understand regions with occlusion or scale changes. After upsampling, the processed feature map is directly fused into the input of the shallower layer (40×40 or 80×80 feature map in this embodiment) of the detection head, providing strong semantic guidance. In this embodiment, upsampling and convolution adjust the feature map of the shallowest layer of the backbone network to a size of 40×40 and the number of C2 channels, perfectly aligning it with the input feature map of the intermediate layer detection head in terms of size and number of channels, thereby injecting fine detail information into the detection of medium-scale targets. Upsampling and convolution are basic operations used in neural networks, so they need not be elaborated further. In this embodiment, fusion refers to the addition of elements from feature maps of the same size.
[0053] In this embodiment, the FPN (top-down) and PAN (bottom-up) paths continue to be responsible for feature smoothing and fusion between adjacent layers. Through this design, the middle feature layer (especially the 40×40) becomes the distribution center of multi-granularity information, significantly improving the model's ability to capture and identify slag of different sizes and visibility.
[0054] An adaptive size filtering module is embedded at the output of the detection head of the multi-granularity feature pyramid; The adaptive size filtering module in S3.1 can filter out slag stones with a size smaller than a set size threshold. The specific formula for the slag stone size is as follows: ; ; in: The actual width of the slag. This refers to the actual height of the slag and stone. The coordinates of the top-left pixel corner of the bounding box of the slag are given. The coordinates of the bottom right corner of the target bounding box (pixel coordinates). The focal length of the camera lens. The depth coordinates of the slag in the feature map.
[0055] S3.2, Construct a training dataset and use the training dataset to... The slag and stone positioning algorithm is trained to obtain a well-trained algorithm. A slag pile localization algorithm, wherein the training dataset includes N labeled images of slag piles; In this embodiment, the construction of the training dataset specifically involves: selecting several slag stones of different sizes and shapes from the blasted tunnel, coating their surfaces with different colors according to a coloring scheme, mixing the colored slag stones with uncolored slag stones, and arranging them randomly so that the colored slag stones are covered to varying degrees. Approximately 10,000 labeled images are collected to obtain the training dataset. The training process in this embodiment is the same as the YOLOv8 algorithm, so it will not be described in detail here. The batch size is set to 32, the learning rate to 0.001, the AdamW optimizer is used, and Cosine annealing decay is set to avoid later oscillations. The weight decay is 0.0005, the momentum is 0.937, the number of training rounds is 100, the number of warm-up rounds is 5, the image enhancement probability is 0.8, and an early stopping mechanism with a patience value of 10 is set. The loss function for classification loss is set to BCEWithLogitsLoss; the loss function for regression loss is set to EIoULoss.
[0056] S3.3, based on pre-trained The slag and stone positioning algorithm identifies and filters several valid colored slag stones in the slag and stone pile image 3, and obtains the initial coordinates of the valid colored slag stones; In this embodiment, a local coordinate system is established with the position of the handheld slag positioning device 1 at the current shooting time as the origin (X-axis: horizontal to the right, Y-axis: vertical upward, Z-axis: perpendicular to the screen and pointing to the slag pile 3). The algorithm calculates the initial coordinates of all the effective colored slag after screening in this local coordinate system.
[0057] S3.4. Based on the rotation angle around the optical axis of the camera 1.2, the initial coordinates of the effective colored slag are rotated and corrected to obtain the standard pixel coordinates of the effective colored slag. In S3.4, the specific formula for rotation correction is as follows: ; in: As the initial x-coordinate, The x-coordinate is the standard pixel coordinate. The standard pixel ordinate, The offset angle around the camera's optical axis, measured by the IMU inertial measurement module; S3.5. Calculate the actual depth of the slag based on the standard pixel coordinates of the effective colored slag, the pitch angle measured by the IMU inertial measurement module, and the slag distance measured by the laser rangefinder 1.5. ; In S3.5, the specific formula for calculating the actual depth is as follows: ; in: The vertical pixel coordinate of the center of the camera's 1.2 image. The approximate depth of the center of the image from camera 1.2, measured by laser rangefinder 1.5. The pitch angle is the current handheld slag positioning device 1.
[0058] S3.6. Based on the actual depth of the slag and the intrinsic parameter matrix of camera 1.2, the standard pixel coordinates of the effective colored slag are transformed into three-dimensional coordinates in the initial camera coordinate system.
[0059] S3.6 includes: S3.6.1 Establish the initial camera coordinate system, specifically: take the optical center of the lens of camera 1.2 as the origin Oc, the extension direction of the optical axis of camera 1.2 as the Zc axis of the initial camera coordinate system, and the Zc axis direction is the depth direction of the slag; take the horizontal rightward direction of the image of camera 1.2 as the Xc axis of the initial camera coordinate system, and take the vertical upward direction of the image of camera 1.2 as the Yc axis of the initial camera coordinate system; S3.6.2. Based on the actual depth of the slag and the intrinsic parameter matrix of camera 1.2, the standard pixel coordinates of the effective colored slag are transformed into three-dimensional coordinates in the initial camera coordinate system using the pinhole imaging principle. The specific formula is as follows: ; in: Let be the horizontal offset of the slag in the initial camera coordinate system. Let be the vertical offset of the slag in the initial camera coordinate system. The depth coordinates of the slag in the initial camera coordinate system.
[0060] In this embodiment, for practical engineering applications, discrete solution formulas are preferred to directly calculate the coordinates in the camera coordinate system. The specific formulas are as follows: ; S4: Control the laser irradiation module 1.4 of the handheld slag positioning device 1 to align with the three-dimensional coordinates of an effective colored slag in the image of slag pile 3; in this embodiment, the leftmost effective colored slag in the image of slag pile 3 is picked first.
[0061] S4 includes: S4.1. Based on the three-dimensional coordinates of the slag, the horizontal rotation angle of the laser irradiation module 1.4 pointing towards the effectively colored slag is calculated. and pitch and rotation angle The specific formula is as follows: ; ; S4.2 The control terminal drives the horizontal rotation mechanism and the pitch rotation mechanism of the laser irradiation module 1.4 to complete the rotation of the corresponding angles based on the horizontal rotation angle and the pitch rotation angle, so that the laser beam is aligned with the three-dimensional coordinates of the effective colored slag stone.
[0062] S5: After the currently aligned valid colored slag is picked up, press the switch button on the handheld slag positioning device 1 to make the control terminal calculate the relative coordinates of the next valid colored slag based on the coordinates of the current handheld slag positioning device 1. In step S5, calculating the relative coordinates of the next effective colored slag based on the coordinates of the current handheld slag positioning device 1 specifically includes: Establish a new camera coordinate system at the current location; The coordinate difference ΔP between the new camera coordinate system and the initial camera coordinate system was recorded using the IMU inertial measurement module. , , ), and the rotation matrix between the new camera coordinate system and the initial camera coordinate system. ; Based on rotation matrix The relative coordinates of the next slag heap are calculated by taking its coordinates in the initial camera coordinate system. The specific formula is as follows: ; in: Let the X-axis coordinate of the next piece of slag be in the new camera coordinate system. Let the next piece of slag be the Y-axis coordinate in the new camera coordinate system. Let Z be the Z-axis coordinate of the next piece of slag in the new camera coordinate system.
[0063] S6: The control terminal controls the laser irradiation module 1.4 of the handheld slag positioning device 1 to align with the relative coordinates of the next effective colored slag. S7: Repeat S5 and S6 until the number of slag and stone collected reaches the set total number of slag and stone samples.
[0064] In this embodiment, the number of images of the slag pile 3 can be one or multiple. The number of images of the slag pile 3 needs to be determined according to the actual slag sampling quantity requirements. Then, S3 to S6 are executed for each image of the slag pile 3 until the set total number of slag samples is reached.
[0065] The above description is only a preferred embodiment of the present invention and does not limit the scope of the present invention. All equivalent structural transformations made under the inventive concept of the present invention using the contents of the present invention specification and drawings, or direct / indirect applications in other related technical fields, are included within the protection scope of the present invention.
Claims
1. A method for sampling slag at a tunnel face, characterized in that, Includes the following steps: S1: Divide the working face of the rock parameters to be calibrated into regions, and use different colored paints to paint different regions of the working face to be sampled. S2: The working face to be sampled is blasted, and after ventilation, a calibrated handheld slag positioning device (1) is used to take pictures of the blasted slag pile (3); S3: Handheld slag positioning device (1) based on trained The slag and stone positioning algorithm identifies and filters several effective colored slag stones in the slag and stone pile (3) image, and calculates the three-dimensional coordinates of each effective colored slag stone in the initial camera coordinate system; S4: The laser irradiation module (1.4) of the handheld slag positioning device (1) is aligned with the three-dimensional coordinates of an effective colored slag in the image of the slag pile (3); S5: After the currently aligned valid colored slag is picked up, the control terminal calculates the relative coordinates of the next valid colored slag based on the coordinates of the current handheld slag positioning device (1) by pressing the switching button on the handheld slag positioning device (1); S6: The control terminal controls the laser irradiation module (1.4) of the handheld slag positioning device (1) to align with the relative coordinates of the next effective colored slag. S7: Repeat S5 and S6 until the number of slag and stone collected reaches the set total number of slag and stone samples.
2. The method for sampling muck at the tunnel face according to claim 1, characterized in that, In S2, the handheld slag positioning device (1) includes a main frame (1.1), a camera (1.2), a lighting lamp (1.3), a laser irradiation module (1.4), a laser rangefinder (1.5), an IMU inertial measurement module, and a control terminal (1.6). The camera (1.2) is mounted on the main frame (1.1) and is used to capture images of the slag pile (3). The camera (1.2) is electrically connected to the control terminal (1.6). The lighting lamp (1.3) is mounted on the camera (1.2) and can provide light to the shooting area of the camera (1.2). The laser irradiation module (1.4) is mounted on the main frame (1.1) and is electrically connected to the control terminal (1.6). The laser irradiation module (1.4) can emit laser light and adjust the direction of the laser light. The laser rangefinder (1.5) is mounted on the camera (1.2). On the camera (1.2), the laser rangefinder (1.5) is set parallel to the optical axis of the camera (1.2), and the laser rangefinder (1.5) is electrically connected to the control terminal (1.6); the IMU inertial measurement module is electrically connected to the control terminal and is used to measure the azimuth angle, pitch angle and rotation angle around the optical axis of the camera (1.2); the control terminal (1.6) is electrically connected to the camera (1.2), the laser irradiation module (1.4), the laser rangefinder (1.5) and the IMU inertial measurement module respectively, and can calculate the horizontal rotation angle and pitch rotation angle of the laser irradiation module (1.4) pointing to the effective colored slag based on the image of the slag pile taken by the camera (1.2) and the measurement data of the laser rangefinder (1.5) and the IMU inertial measurement module, and control the laser irradiation template to move so that the laser beam is aligned with the corresponding effective colored slag based on the calculation results.
3. The method for sampling muck at the tunnel face according to claim 2, characterized in that, In S2, the calibration steps of the handheld slag positioning device (1) are as follows: The intrinsic parameter matrix of camera (1.2) is obtained by calibrating its intrinsic parameters using the checkerboard calibration method. Specifically: ① Make a target board, which is a chessboard grid flat plate with multiple evenly distributed marking points; ② Set up the handheld slag positioning device on the tripod (2) and level it so that the camera optical axis of the camera (1.2) is perpendicular to the chessboard grid plate; ③ The intrinsic parameter matrix of the camera (1.2) is obtained by completing the intrinsic parameter calibration using the checkerboard calibration method. The specific formula is as follows: ; in: Let be the horizontal focal length of the camera (1.2) in pixels. Let the vertical focal length of the camera (1.2) be the pixel. Let x be the x-coordinate of the center pixel of the camera (1.2) image. Let be the vertical coordinate of the center pixel of the camera (1.2) image; The calibration of the horizontal pixels of the camera (1.2) and the horizontal rotation angle of the laser beam is completed based on the corresponding data of the pixel horizontal coordinate and the laser beam horizontal rotation angle. Specifically, this includes: ① Control the laser irradiation module (1.4) to move the laser beam landing point to the leftmost marker point on the target plate, and record the horizontal angle encoder value of the laser irradiation module (1.4) at this time. θ hmin And the pixel coordinates of the marker point in the camera (1.2) image. u left ; ② Next, move the laser point to the far right and record the horizontal angle encoder value of the laser irradiation module (1.4) at this time. And the pixel coordinates of the marker point in the camera (1.2) image. u right ; ③ Between the leftmost and rightmost markers, select multiple intermediate points evenly and repeatedly record the corresponding data of the pixel horizontal coordinate and the horizontal angle encoder value to complete the matching calibration of the camera (1.2) horizontal pixels and the laser horizontal rotation angle; Pitch rotation angle based on laser illumination module (1.4) and the pixel coordinates of the laser beam's landing point Fit the actual depth Pixel ordinate The independent variable is the pitch and rotation angle. is a surface function of the dependent variable.
4. The method for sampling muck at the tunnel face according to claim 3, characterized in that, S3 includes; S3.1, Regarding the existing The algorithm is constructed by the following improvements. Slag and stone positioning algorithm: In the existing A color perception module is embedded after the first and second C2f modules of the algorithm backbone network to process the color enhancement stream and the illumination invariant stream in parallel; The feature maps output by the color enhancement stream and the illumination invariant stream are fused and fed back to the backbone network; In the existing Based on the standard FPN / PAN neck network of the algorithm, two cross-granularity feature fusion paths are introduced to obtain a multi-granularity feature pyramid; An adaptive size filtering module is embedded at the output of the detection head of the multi-granularity feature pyramid; S3.2, Construct a training dataset and use the training dataset to... The slag and stone positioning algorithm is trained to obtain a well-trained algorithm. Slag heap localization algorithm, wherein: the training dataset includes N labeled slag heap (3) images; S3.3, based on pre-trained The slag and stone positioning algorithm identifies and filters several valid colored slag and stone stones in the slag and stone pile (3) image; S3.4 Obtain the initial coordinates of the effective colored slag stones, and perform rotation correction on the initial coordinates of the effective colored slag stones based on the rotation angle around the optical axis of the camera (1.2) to obtain the standard pixel coordinates of the effective colored slag stones; S3.
5. Calculate the actual depth of the slag based on the standard pixel coordinates of the effective colored slag, the pitch angle measured by the IMU inertial measurement module, and the slag distance measured by the laser rangefinder 1.
5. ; S3.
6. Based on the actual depth of the slag and the intrinsic parameter matrix of the camera (1.2), the standard pixel coordinates of the effective colored slag are transformed into three-dimensional coordinates in the initial camera coordinate system.
5. The method for sampling muck at the tunnel face according to claim 4, characterized in that, In step S3.1, the color enhancement stream uses a set of convolutional kernels to extract strong color difference features in the HSV color space or specific RGB channels to amplify the target color signal. The specific color enhancement stream processing procedure is as follows: ① The input image of the slag heap (3) is based on existing data. After the initial convolution and pooling processing of the backbone network of the algorithm, it passes through the first C2f module and the second C2f module in sequence, and outputs a feature map that corresponds to the spatial dimension of the input slag heap (3) image; wherein: each pixel of the feature map corresponds to a local region of the input slag heap (3) image, and retains the basic information of the slag heap (3) image; ② Perform channel conversion on the obtained feature map to convert it from the original RGB color space to the HSV color space; ③ A set of 3×3 small convolution kernels is used to perform convolution operation on the feature map of HSV color space to obtain the convolutional feature map. The weight allocation of the convolution kernel is optimized for the feature color of the target slag in the input slag heap (3) image, so as to amplify the feature signal intensity corresponding to the target color area in the input slag heap (3) image, while weakening the feature response of the background area and non-target color area in the input image, so as to ensure that the color feature of the target slag in the input image is accurately captured. ④ Normalize the feature map after convolution to obtain the feature map output by the color enhancement stream; The illumination-invariant current employs a simplified self-attention mechanism to learn which regions in the feature map are most affected by illumination and dust interference, suppressing unreliable regions and enhancing reliable regions. Specifically: ① The feature map output by the C2f module is used to generate query vector Q and key vector K through 1×1 convolution, and the input feature map is directly used as the feature weighting source. ② Calculate the spatial correlation between the query vector Q and the key vector K to obtain the spatial attention map; ③ Perform Sigmoid activation on the spatial attention map to generate a weight mask with values between 0 and 1. Regions with weights close to 0 correspond to unreliable regions with the most severe interference, while regions with weights close to 1 correspond to regions with reliable features and less interference. ④ Perform spatial dimension weighting operations on the weight mask and the input feature map. By assigning weights, suppress the feature responses of unreliable regions, retain and enhance the effective features of reliable regions, and obtain the feature map of illumination invariant current output.
6. The method for sampling muck at the tunnel face according to claim 5, characterized in that, The two cross-granularity feature fusion paths in S3.1 are the ultrafine-grained injection path and the ultracoarse-grained injection path. The ultrafine-grained injection path is derived from the shallowest layer of the backbone network. It adjusts the size and number of channels of the feature map output by the shallowest layer of the backbone network through upsampling and convolution. The adjusted feature map is then directly fused to the input features of the intermediate layer detection head. The ultracoarse-grained injection path is derived from the deepest layer of the backbone network. It uses a dilated spatial pyramid pooling module to process the feature map output by the deepest layer of the backbone network. Through multiple parallel dilated convolutions with different dilation rates, it efficiently captures multi-scale contextual information to obtain the processed feature map without losing resolution. The processed feature map is then upsampled and directly fused to the input of the shallower layer detection head. The adaptive size filtering module in S3.1 can filter out slag stones with a size smaller than a set size threshold. The specific formula for the slag stone size is as follows: ; ; in: The actual width of the slag. This refers to the actual height of the slag and stone. The coordinates of the top-left pixel corner of the bounding box of the slag are given. The coordinates of the bottom right corner of the target bounding box (pixel coordinates). The focal length of the camera lens. The depth coordinates of the slag in the feature map.
7. The method for sampling muck at the tunnel face according to claim 6, characterized in that, In S3.4, the specific formula for rotation correction is as follows: ; in: As the initial x-coordinate, The x-coordinate is the standard pixel coordinate. The x-coordinate is the standard pixel coordinate. The offset angle around the camera's optical axis, measured by the IMU inertial measurement module; In S3.5, the specific formula for calculating the actual depth is as follows: ; in: Let be the vertical pixel coordinate of the center of the camera (1.2) image. The approximate depth of the center of the image from the camera (1.2) is measured by the laser rangefinder (1.5). The pitch angle of the current handheld slag positioning device (1) is given.
8. The method for sampling muck at the tunnel face according to any one of claims 4-7, characterized in that, S3.6 includes: S3.6.1 Establish the initial camera coordinate system, specifically: take the optical center of the lens of the camera (1.2) as the origin Oc, the extension direction of the optical axis of the camera (1.2) as the Zc axis of the initial camera coordinate system, and the Zc axis direction is the depth direction of the slag; take the horizontal rightward direction of the image of the camera (1.2) as the Xc axis of the initial camera coordinate system, and take the vertical upward direction of the image of the camera (1.2) as the Yc axis of the initial camera coordinate system; S3.6.
2. Based on the actual depth of the slag and the intrinsic parameter matrix of the camera (1.2), the standard pixel coordinates of the effective colored slag are transformed into three-dimensional coordinates in the initial camera coordinate system using the pinhole imaging principle. The specific formula is as follows: ; in: Let be the horizontal offset of the slag in the initial camera coordinate system. Let be the vertical offset of the slag in the initial camera coordinate system. The depth coordinates of the slag in the initial camera coordinate system.
9. The method for sampling muck at the tunnel face according to claim 8, characterized in that, S4 includes: S4.
1. Based on the three-dimensional coordinates of the slag, the horizontal rotation angle of the laser irradiation module (1.4) pointing towards the effectively colored slag is calculated. and pitch and rotation angle The specific formula is as follows: ; ; S4.2 The control terminal drives the horizontal rotation mechanism and the pitch rotation mechanism of the laser irradiation module (1.4) to complete the rotation of the corresponding angles based on the horizontal rotation angle and the pitch rotation angle, so that the laser beam is aligned with the three-dimensional coordinates of the effective colored slag stone.
10. The method for sampling muck at the tunnel face according to claim 9, characterized in that, In step S5, the calculation of the relative coordinates of the next effective colored slag based on the coordinates of the current handheld slag positioning device (1) specifically includes: Establish a new camera coordinate system at the current location; The coordinate difference ΔP between the new camera coordinate system and the initial camera coordinate system was recorded using the IMU inertial measurement module. , , ), and the rotation matrix between the new camera coordinate system and the initial camera coordinate system. ; Based on rotation matrix The relative coordinates of the next slag heap are calculated by taking its coordinates in the initial camera coordinate system. The specific formula is as follows: ; in: Let the X-axis coordinate of the next piece of slag be in the new camera coordinate system. Let the next piece of slag be the Y-axis coordinate in the new camera coordinate system. Let Z be the Z-axis coordinate of the next piece of slag in the new camera coordinate system.