A drilling three-dimensional imaging system based on binocular vision

CN122980876APending Publication Date: 2026-10-27HEBEI UNIV OF ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611036194.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-13
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]针对现有技术的不足,本发明提供了一种基于双目视觉的钻孔三维成像系统,解决了现有钻孔三维成像中光照不均匀、双目图像同步性差、姿态数据与图像时空错位以及扫描轨迹累积误差导致三维模型精度下降的问题

Benefits of technology

1、本发明通过环形等间距布置的多个发光单元配合闭环PWM亮度调节,使钻孔内壁在周向上获得均匀光照,避免点光源产生的局部阴影和亮度梯度,成像采集模块的两个成像单元通过同一触发脉冲实现硬件同步,配合同轴滑环在旋转状态下稳定传输图像信号,保证左右图像的时间差在微秒级,为立体匹配提供同步性好、光照一致的图像基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122980876A_ABST
    Figure CN122980876A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of downhole engineering detection and three-dimensional reconstruction, and discloses a borehole three-dimensional imaging system based on binocular vision, which comprises an imaging acquisition module, a light supplementing module, a posture acquisition module, a motion driving mechanism and a data processing terminal; the imaging acquisition module is provided with two symmetrical imaging units which are fixed in parallel in terms of optical axis and in terms of optical center distance; the light supplementing module is annular, a plurality of light emitting units are arranged at equal intervals in the circumferential direction, closed-loop brightness adjustment is realized through PWM signals and image brightness feedback, the posture acquisition module comprises an axial displacement sensor and a circumferential angle sensor, each frame of image is attached with corresponding axial position and circumferential angle values through a hardware synchronization mode, the motion driving mechanism comprises an axial driving unit and a circumferential driving unit, and drives the imaging acquisition module and the light supplementing module to move along the axial direction of the borehole and rotate around the axial line of the borehole. The system realizes synchronous acquisition of stereoscopic images and high-precision three-dimensional reconstruction under the conditions of illumination change and motion of the inner wall of the borehole.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of downhole engineering detection and three-dimensional reconstruction technology, specifically a borehole three-dimensional imaging system based on binocular vision. Background Technology

[0002] In engineering fields such as mining, tunneling, and geological exploration, the accurate detection of the geometry and surface defects of borehole inner walls is of great engineering significance. Existing three-dimensional imaging methods for boreholes mainly include structured light scanning, laser stripe projection, and monocular camera rotation scanning. Structured light scanning requires projecting a specific light pattern inside the borehole, but the surface of the borehole inner wall is rough and has large local curvature variations, making the light pattern easily deformed and difficult to decode. Laser stripe projection has high accuracy, but the equipment is large and expensive, and it is sensitive to water mist and dust inside the borehole. Monocular camera rotation scanning acquires a sequence of images of the borehole wall by rotating the camera and then stitches them together, but due to the lack of depth information, it can only obtain a two-dimensional unfolded image and cannot reflect the three-dimensional concave and convex structure of the inner wall. If the monocular motion reconstruction method is used to estimate the depth, the accuracy requirements of the motion trajectory are high, and the attitude error is easy to accumulate, resulting in prominent stitching distortion problems in deep holes.

[0003] Binocular vision technology acquires stereo image pairs using two cameras with fixed baselines, enabling the calculation of surface depth. It is relatively mature in 3D reconstruction of open spaces. However, there are several problems when directly applying binocular vision to the scene inside a borehole: the borehole space is narrow and the surface is an approximately cylindrical curved surface with poor and drastic lighting conditions. Ordinary point light sources will produce uneven illumination and local shadows, affecting the reliability of stereo matching; the imaging system performs a composite motion of axial movement and circumferential rotation inside the borehole, making it difficult to guarantee the synchronization of the left and right images. Moreover, pose information and image acquisition are often processed independently, resulting in inaccurate spatial pose when stitching depth maps; in addition, there is a lack of effective closed-loop correction methods for the cumulative error of the spiral trajectory during continuous scanning, causing the geometric accuracy of the final 3D model to decrease with increasing borehole depth. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a borehole 3D imaging system based on binocular vision, which solves the problems of uneven illumination, poor synchronization of binocular images, spatiotemporal misalignment of attitude data and images, and decreased accuracy of 3D models caused by cumulative errors in scanning trajectories in existing borehole 3D imaging.

[0005] To achieve the above objectives, the present invention is implemented through the following technical solution: a three-dimensional drilling imaging system based on binocular vision, comprising an imaging acquisition module, a supplementary lighting module, an attitude acquisition module, a motion drive mechanism, and a data processing terminal.

[0006] The imaging acquisition module features two symmetrically mounted imaging units with parallel optical axes, providing a fixed baseline constraint for stereo matching. The supplementary lighting module employs multiple equidistantly arranged luminous units in a ring, using PWM dimming and image average brightness feedback to achieve closed-loop brightness control, ensuring circumferential uniformity of illumination on the borehole inner wall surface. The attitude acquisition module integrates axial displacement and circumferential angle sensors, achieving synchronous acquisition of attitude data and image exposure time via hardware trigger signals. Each frame of the image includes corresponding axial position and circumferential angle values. The motion drive mechanism includes axial drive units and circumferential drive units, capable of independent or linked helical scanning, and is equipped with a coaxial slip ring to ensure continuous signal transmission during rotation. The data processing terminal performs camera calibration, image preprocessing, stereo matching, depth calculation, attitude linkage stitching, closed-loop error verification, and 3D surface reconstruction, transforming the binocular image sequence and attitude data acquired by the front end into a 3D model of the borehole inner wall.

[0007] Furthermore, the supplementary lighting module uses a ring-shaped printed circuit board as a carrier, with no fewer than 12 white LEDs mounted on the surface. The color temperature is close to that of sunlight, and the color rendering index is no less than 80. The processing unit of the data processing terminal analyzes the average brightness of the image in real time, and the control unit adjusts the duty cycle of the PWM signal accordingly. The response time is no more than 50ms, achieving rapid and stable brightness between frames.

[0008] Furthermore, the axial displacement sensor adopts an incremental encoder or a magnetostrictive displacement sensor, and the circumferential angle sensor adopts an absolute or incremental encoder; the control unit reads the current axial position and circumferential angle while sending the trigger pulse, and stores the data together with the image frame number and timestamp, so that each frame image strictly corresponds to the corresponding spatial pose, and the time alignment accuracy is at the microsecond level.

[0009] Furthermore, the axial drive unit uses a stepper motor to drive a ball screw and nut pair, while the circumferential drive unit uses a stepper motor via a reducer to drive the rotary platform. A coaxial slip ring is installed at the axis of the rotary platform to transmit image data, PWM signals, and sensor signals, supporting continuous multi-turn rotation. The motion drive mechanism automatically performs a zeroing operation upon system startup, using limit switches and photoelectric sensors to determine the zero position.

[0010] Furthermore, after the system starts, the data processing terminal first performs camera calibration, using Zhang Zhengyou's planar calibration method. It uses no less than 20 chessboard images with different poses to calculate the intrinsic parameters, distortion coefficients, rotation matrix and translation vector between the two imaging units. The calibration results are stored in the storage unit for subsequent distortion correction.

[0011] Furthermore, the image preprocessing includes distortion correction, illumination equalization, and noise removal in sequence; distortion correction is based on the calibrated distortion coefficients through inverse mapping and bilinear interpolation, illumination equalization uses contrast-limited adaptive histogram equalization, and noise removal uses Gaussian filtering.

[0012] Furthermore, the matching cost function in stereo matching is composed of a weighted sum of absolute difference, basic terms, surface constraint terms, and temporal constraint terms. At the same time, a dynamic disparity search interval guidance mechanism is introduced, which uses the axial position and circumferential angle of the current frame and the pre-stored nominal borehole diameter to estimate the theoretical disparity upper and lower limits of each pixel as the search boundary, thereby reducing the search space and suppressing mismatches.

[0013] Furthermore, depth calculation is based on the principle of binocular triangulation to convert subpixel-level parallax into depth values; pose linkage stitching constructs the camera pose matrix for each frame based on axial position and circumferential angle, and converts the depth map to the world coordinate system to generate a dense point cloud.

[0014] Furthermore, the closed-loop error verification step renders the initially generated triangular mesh model into a two-dimensional image using camera projection parameters, calculates the average absolute error with the original first-view image, and if the error is greater than a preset threshold, the iterative nearest-point algorithm is used to perform fine registration between each frame of point cloud and triangular mesh model, and the pose matrix is ​​updated until the reprojection error converges.

[0015] Furthermore, the point cloud optimization and surface reconstruction first removes statistical outliers from the dense point cloud, then uses voxel filtering to downsample, then estimates the normal vector, and finally uses the Poisson surface reconstruction algorithm to construct a triangular mesh model to obtain a three-dimensional surface model of the borehole inner wall.

[0016] Through the coordinated work of the above modules, the present invention can stably acquire synchronized images from the left and right perspectives and accurately acquire the spatial pose of each frame of the image under complex lighting and motion conditions on the inner wall of the borehole, and finally reconstruct a three-dimensional model of the inner wall of the borehole with high geometric accuracy and high texture fidelity.

[0017] This invention provides a three-dimensional drilling imaging system based on binocular vision. It has the following advantages: 1. This invention uses multiple light-emitting units arranged in a ring at equal intervals, combined with closed-loop PWM brightness adjustment, to ensure uniform illumination of the borehole inner wall in the circumferential direction, avoiding local shadows and brightness gradients caused by point light sources. The two imaging units of the imaging acquisition module achieve hardware synchronization through the same trigger pulse, and with the help of a coaxial slip ring, the image signal is stably transmitted in the rotating state, ensuring that the time difference between the left and right images is in the microsecond range, providing a good synchronous and consistent image foundation for stereo matching.

[0018] 2. This invention introduces a dynamic disparity search interval guidance mechanism during the stereo matching process. It uses the axial position and circumferential angle of the current frame and the pre-stored nominal borehole diameter to estimate the theoretical disparity upper and lower limits of each pixel as search boundaries, thereby narrowing the search range and eliminating obviously invalid matching candidates. The matching cost function includes both surface constraint terms and temporal constraint terms. It uses the geometric prior of the approximately cylindrical surface of the borehole inner wall and the disparity information of the previous frame to constrain the current matching, thereby improving the accuracy and robustness of matching and reducing the false matching rate.

[0019] 3. This invention strictly correlates the axial position and circumferential angle of each frame of image with the image data through a hardware synchronization mechanism. It constructs a camera pose matrix based on the attitude data to realize point cloud stitching. Then, it compares the rendered image with the original image through closed-loop error verification and uses the iterative nearest point algorithm to finely register each frame of point cloud to eliminate trajectory accumulation error. Finally, it generates a three-dimensional mesh model through statistical outlier removal, voxel filtering downsampling and Poisson surface reconstruction, so as to ensure the geometric accuracy and surface continuity of the three-dimensional reconstruction of the borehole inner wall. Attached Figure Description

[0020] Figure 1 This is a block diagram showing the overall composition of the present invention; Figure 2 This is a schematic diagram of the internal structure of the imaging acquisition module of the present invention; Figure 3 This is a schematic diagram of the supplementary lighting module of the present invention; Figure 4 This is a connection diagram of the attitude acquisition module of the present invention; Figure 5 This is a schematic diagram of the transmission structure of the motion drive mechanism of the present invention; Figure 6 This is a schematic diagram of the internal data flow of the data processing terminal of the present invention. Detailed Implementation

[0021] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] See attached document Figure 1 , Figure 1 This is a block diagram of a borehole three-dimensional imaging system based on binocular vision according to an embodiment of the present invention. The present invention provides a borehole inner wall three-dimensional imaging system, including: an imaging acquisition module, a supplementary lighting module, an attitude acquisition module, a data processing terminal, and a motion driving mechanism. The imaging acquisition module includes a first imaging unit and a second imaging unit. The first imaging unit and the second imaging unit have the same imaging parameters, are symmetrically installed on the same base, have parallel optical axes, and have a fixed optical center distance. The imaging acquisition module is connected to the data processing terminal through a signal transmission cable to transmit the acquired image data to the data processing terminal. The supplementary lighting module is fixedly connected to the imaging acquisition module and arranged around the imaging acquisition module. The supplementary lighting module includes multiple light-emitting units, which are arranged at equal intervals along a ring. The supplementary lighting module is electrically connected to the data processing terminal and is used to adjust the light emission brightness according to the instructions sent by the data processing terminal. The attitude acquisition module includes an axial displacement sensor and a circumferential angle sensor. The axial displacement sensor is installed on the axial moving part of the motion drive mechanism to acquire the axial position information of the imaging acquisition module. The circumferential angle sensor is installed on the rotating part of the motion drive mechanism to acquire the circumferential angle information of the imaging acquisition module. The attitude acquisition module is connected to the data processing terminal to send the axial position information and circumferential angle information to the data processing terminal. The motion drive mechanism includes an axial drive unit and a circumferential drive unit. The axial drive unit is used to drive the imaging acquisition module and the supplementary lighting module to move along the borehole axis, and the circumferential drive unit is used to drive the imaging acquisition module and the supplementary lighting module to rotate around the borehole axis. The motion drive mechanism is connected to the data processing terminal and is used to receive motion control commands sent by the data processing terminal. The data processing terminal includes a storage unit, a processing unit, and a control unit. The storage unit is used to store calibration parameters, acquired image data, and intermediate calculation data. The processing unit is used to execute image preprocessing, stereo matching, depth calculation, point cloud stitching, and 3D reconstruction algorithms. The control unit is used to send brightness adjustment commands to the supplementary lighting module and motion control commands to the motion drive mechanism.

[0023] See attached document Figure 2 , Figure 2 This is a block diagram of a borehole 3D imaging system based on binocular vision according to an embodiment of the present invention. The imaging acquisition module is the front-end image acquisition unit of the system, which is used to simultaneously acquire image data of the left and right views of the borehole inner wall. The imaging acquisition module includes a first imaging unit and a second imaging unit. The first and second imaging units use the same type of industrial CMOS image sensor with a resolution of no less than 1920×1080 pixels and a target surface size of 1 / 2.3 inch or 1 inch. The two imaging units have the same lens focal length, which can be selected from 2.8mm to 6mm. The field of view is no less than 80°×60° to ensure sufficient surface coverage when shooting at close range on the inner wall of the borehole. The lens adopts a low distortion optical design, and the factory distortion rate is controlled below 1%, but it still needs to be accurately calibrated through subsequent calibration. The first and second imaging units are symmetrically mounted on the same precision-machined aluminum alloy base. The optical center line connecting the two imaging units is located on the center line of the base. The distance between the two optical centers, i.e. the baseline distance, is fixed to a set value by mechanical positioning. This value is determined according to the range of drilling diameter, with a typical value of 30mm. This fixing structure ensures that the parallelism of the optical axis does not change during the acquisition process. The photosensitive planes of the two imaging units are on the same plane, and the optical axes are parallel to each other. The front end of the base is provided with an annular mounting groove for fixing the supplementary lighting module. The imaging acquisition module and the data processing terminal are connected via a high-speed data transmission cable. The output interface of each imaging unit is USB 3.0 or GigE. The data cable integrates signal lines and power supply lines. The hardware trigger input interfaces of the two imaging units are connected in parallel to the same trigger signal source. The trigger signal is issued by the control unit of the data processing terminal. The signal is a pulse with a rising edge and a pulse width of not less than 5μs. When the trigger pulse arrives, the two imaging units are exposed simultaneously and output a frame image. Through this hardware synchronization method, the time difference between the left and right images is less than 1μs, which meets the synchronization requirements of stereo matching during motion. The external front end of the imaging acquisition module is equipped with a detachable transparent protective cover. The protective cover is made of tempered glass or polycarbonate material with high light transmittance, with a thickness of 1mm to 2mm and a transmittance of not less than 90%. The protective cover is fixed to the imaging acquisition module by threads or buckles and is equipped with a sealing ring to prevent dust and water mist from entering the lens area from the drill hole. The outer surface of the protective cover can be cleaned or replaced regularly to meet the needs of long-term use. An adjustable mechanical aperture or a fixed aperture can be set between the image sensor and the lens to control the amount of light entering the camera to adapt to different brightness environments. The aperture value (F number) is adjustable in the range of 2.8 to 16. If a fixed aperture is used, exposure control is achieved by adjusting the brightness of the fill light module. The frame rate of the imaging acquisition module is set by the control unit of the data processing terminal through the trigger signal frequency. The typical value is 30fps, but it can also be adjusted in the range of 15fps to 60fps according to the motion speed. The matching relationship between the frame rate and the motion speed must ensure that the overlap area between adjacent frames is not less than 50% to ensure the continuity of posture linkage stitching. The raw image data acquired by the imaging acquisition module is in Bayer or YUV format. After being transmitted to the storage unit of the data processing terminal, it is converted into RGB format by the processing unit through de-mosaic processing. The conversion algorithm uses bilinear interpolation or adaptive interpolation, which are well-known technologies in digital image processing and will not be described in detail here. During the imaging process, in order to reduce image blurring caused by vibration, the imaging acquisition module is rigidly connected to the motion drive mechanism through the base, and vibration damping pads are set in the motion drive mechanism. In addition, the shutters of the first imaging unit and the second imaging unit can be set to global shutters to avoid the jelly effect produced by the rolling shutter in motion. The overall power supply of the imaging acquisition module is provided by the data processing terminal through a data cable. The typical power supply voltage is 5V or 12V, and the peak power consumption does not exceed 5W. The power supply circuit includes an overcurrent protection circuit to prevent short circuit damage to the sensor. With the above structure, the imaging acquisition module can stably acquire high-quality synchronous images of the borehole inner wall from the left and right perspectives, providing basic data for subsequent stereo matching. The parameter consistency of the two imaging units ensures the symmetry of the matching cost calculation, and the fixed baseline distance provides the physical geometric constraints required for depth calculation.

[0024] See attached document Figure 3 , Figure 3 This is a block diagram of a borehole 3D imaging system based on binocular vision according to an embodiment of the present invention. The supplementary lighting module is the auxiliary lighting unit of the system, used to provide a uniform and stable lighting environment during the acquisition of images of the borehole inner wall. The supplementary lighting module adopts a ring structure and is fixedly installed around the outer periphery of the imaging acquisition module. The main body of the supplementary lighting module is a ring-shaped printed circuit board. Multiple light-emitting units are soldered at equal intervals along the circumference of the printed circuit board. The light-emitting units are surface-mount white LEDs, and the power of a single LED does not exceed 0.5W. The total number of light-emitting units is not less than 12. Each light-emitting unit is evenly distributed on the ring plate, and the central angle between adjacent light-emitting units is equal to ensure that the illumination is evenly distributed in the circumferential direction. The color temperature of the light-emitting unit is set to 5000K to 6000K, which is close to natural sunlight and is beneficial to the color reproduction of color images. The color rendering index of the light-emitting unit is not less than 80, ensuring sufficient color discrimination capability for different colored surfaces. The light emission angle of each light-emitting unit is 120° to 140°. By selecting wide-angle LEDs, the light can cover a large illumination area within a close range on the inner wall of the drill hole, reducing the shadow area. The supplementary lighting module and the data processing terminal are electrically connected via a multi-core cable. The multi-core cable includes a power supply line, a PWM signal line, and a ground line. The power supply line provides a DC regulated power supply with a voltage of 12V. The PWM signal line is output by the control unit of the data processing terminal and is used to adjust the brightness of the light-emitting unit. The carrier frequency of the PWM signal is set to 1kHz to 5kHz to avoid visible flickering due to too low a frequency and reduced efficiency of the LED driver due to too high a frequency. The duty cycle of the PWM signal can be continuously adjusted within the range of 0% to 100%, and the correspondence between the duty cycle and the luminous intensity is approximately linear. The brightness adjustment process is as follows: The processing unit of the data processing terminal analyzes the acquired image in real time and extracts the average brightness value of the image. If the average brightness value is lower than the set lower limit, the control unit increases the PWM duty cycle to increase the light intensity. If the average brightness value is higher than the set upper limit, the control unit decreases the PWM duty cycle to reduce the light intensity. The goal of brightness adjustment is to make the average gray value of the image fall within the set gray target range. In addition to automatic adjustment, the control unit also supports receiving fixed duty cycle commands from external input for forced brightness setting in specific scenarios. The brightness adjustment response time of the supplementary lighting module does not exceed 50ms and can complete the adjustment within the image acquisition frame interval. The inner diameter of the annular structure of the supplementary lighting module matches the outer diameter of the lens of the imaging acquisition module. The annular structure is fitted onto the front end of the lens and is fixed to the aluminum alloy base of the imaging acquisition module by multiple fastening screws. The front surface of the supplementary lighting module (the light-emitting surface of the light-emitting unit) is flush with the front surface of the imaging acquisition module (the surface of the protective cover), or slightly protrudes by no more than 2mm. This installation position ensures that the light emitted by the light-emitting unit directly illuminates the inner wall surface of the drill hole, while preventing light from directly entering the optical path of the lens and causing glare. The ring-shaped printed circuit board of the supplementary lighting module has a heat dissipation structure below it. The heat dissipation structure is an aluminum heat sink or a thermally conductive silicone pad, which transfers the heat generated by the LED to the metal base of the imaging acquisition module. The heat is then dissipated outward through the metal base. This heat dissipation structure ensures that the junction temperature of the LED does not exceed 80°C under continuous operation, thus maintaining luminous efficiency and lifespan. The overall peak power consumption of the supplementary lighting module does not exceed 8W. A current-limiting resistor or constant current driver chip is connected in the power supply circuit to limit the current of each light-emitting unit to not exceed the rated value, so as to prevent the LED from being damaged due to excessive current. The constant current driver chip adopts a linear constant current or switching constant current scheme, and the switching frequency is coordinated with the PWM carrier frequency to avoid beat frequency interference. The supplementary lighting module is encased in a waterproof and dustproof housing made of engineering plastic or lightweight aluminum alloy. A sealing ring is provided between the housing and the imaging acquisition module. A wire outlet hole is provided on the side of the housing and is filled with sealant. This protective structure enables the supplementary lighting module to work normally in harsh drilling environments such as water mist and dust. Through the above structural setup, the supplementary lighting module provides stable, uniform, and adjustable illumination conditions for the imaging acquisition module. The ring layout eliminates the unidirectional shadows generated by point light sources when shooting near a plane, allowing the surface texture and defect features of the borehole inner wall to be clearly presented in the binocular image, providing a high-contrast, low-noise image foundation for subsequent stereo matching and depth calculation.

[0025] See attached document Figure 4 , Figure 4This is a block diagram of a borehole 3D imaging system based on binocular vision according to an embodiment of the present invention. The attitude acquisition module is the spatial position sensing unit of the system, which is used to acquire the axial position information and circumferential angle information of the imaging acquisition module in the borehole, and transmit this information to the data processing terminal. The attitude acquisition module includes an axial displacement sensor and a circumferential angle sensor. The axial displacement sensor is used to measure the displacement of the imaging acquisition module along the borehole axis, and the circumferential angle sensor is used to measure the angle of rotation of the imaging acquisition module around the borehole axis. The axial displacement sensor uses an incremental encoder or a magnetostrictive displacement sensor. The incremental encoder is installed at the end of the lead screw of the axial drive unit of the motion drive mechanism or at the moving end of the linear guide. It is connected to the lead screw shaft through a coupling and converts the rotational motion of the lead screw into a pulse signal output. The encoder resolution is not less than 1000 pulses per revolution. With a lead screw lead of 5mm, a displacement resolution of 0.005mm can be achieved. The magnetostrictive displacement sensor is installed at the fixed end of the motion drive mechanism. The movable magnetic ring is fixed on the moving platform of the imaging acquisition module. The sensor outputs an absolute position signal with a resolution of not less than 0.01mm and a range covering the drilling depth. The incremental encoder outputs three-phase signals of A, B, and Z. The displacement direction and cumulative displacement are obtained through an orthogonal decoding circuit. The processing unit of the data processing terminal receives the decoded displacement data and records it as the axial position corresponding to the current frame. The circumferential angle sensor uses either an absolute encoder or an incremental encoder. The absolute encoder is mounted on the output shaft of the rotary platform of the circumferential drive unit of the motion drive mechanism, outputting parallel or serial digital signals to directly read the current rotation angle. The resolution of the absolute encoder is no less than 4096 pulses per revolution, corresponding to an angle resolution of 0.088°. The incremental encoder is mounted on the rotating shaft of the circumferential drive motor, and the angle is obtained by counting and converting the pulses through the driver or processing unit. Since the circumferential motion may involve multiple revolutions, the incremental encoder needs to be used in conjunction with an initial zero-position calibration signal to realize the absolute angle calculation. The initial zero position is determined by a photoelectric limit switch mounted on the rotary platform. When the system starts, the motion drive mechanism automatically returns to the zero position to complete the calibration. The output signals of the axial displacement sensor and the circumferential angle sensor are transmitted to the storage unit of the data processing terminal through shielded cables. The signal transmission adopts RS-485 differential bus or CAN bus protocol, and the bus baud rate is not less than 115200bps to meet the real-time data update requirements under high frame rate conditions. Each sensor has a unique communication address. The control unit of the data processing terminal polls and reads the sensor data according to a fixed timing sequence, and the polling period does not exceed 10ms. The synchronization of attitude data and image data is achieved through hardware triggering. While sending a trigger pulse to the imaging acquisition module, the control unit of the data processing terminal reads the current axial position and circumferential angle from the attitude acquisition module and stores this set of data along with the trigger timestamp into the synchronization data buffer in the storage unit. Each frame of image data is stored with the corresponding axial position value and circumferential angle value, forming a one-to-one data association. To ensure time alignment accuracy, the control unit responds to the sensor data readout in an interrupt manner. The interrupt trigger source is the same signal line as the trigger pulse. Therefore, the delay between the sensor data readout time and the image exposure start time does not exceed 1μs. The axial displacement sensor and the circumferential angle sensor are powered by the data processing terminal through the same shielded cable. The power supply voltage is 5V or 12V and the power does not exceed 1W. The sensor contains a signal conditioning circuit and a level conversion circuit. The output waveform conforms to the RS-485 or CAN bus standard. The sensor shell is made of metal shielding and is connected to the grounding terminal of the data processing terminal through the cable shielding layer to resist electromagnetic interference in the borehole and ensure the reliability of data transmission. The installation location and protection measures of the attitude acquisition module are as follows: The axial displacement sensor is fixed to the fixed part of the motion drive mechanism by a mounting bracket, and does not directly contact the moving parts to avoid mechanical wear. The circumferential angle sensor is connected to the rotating platform shaft by a coupling. The coupling is made of elastic material to absorb shock. The sensor is equipped with a protective cover with a protection level of not less than IP65 to prevent dust and water mist from entering the borehole. The battery backup unit for incremental encoders or multi-turn encoders is installed inside the data processing terminal to maintain the multi-turn count of the encoder when the system is powered off. Through the above structure, the attitude acquisition module can provide the axial position and circumferential angle data of the imaging acquisition module in the borehole in real time and accurately. This data is closely related to the image data and provides the basis for the spatial pose calculation of the subsequent depth map stitching imaging acquisition module.

[0026] See attached document Figure 5 , Figure 5 This is a block diagram of a borehole 3D imaging system based on binocular vision according to an embodiment of the present invention. The motion drive mechanism is the mechanical motion execution unit of the system, which is used to drive the imaging acquisition module and the supplementary lighting module to achieve axial movement and circumferential rotation in the borehole, providing spatial traversal capability for the acquisition of multi-view image sequences. The motion drive mechanism includes an axial drive unit and a circumferential drive unit. The axial drive unit is responsible for moving the imaging acquisition module and the supplementary lighting module along the borehole axis, while the circumferential drive unit is responsible for rotating the imaging acquisition module and the supplementary lighting module around the borehole axis. The axial drive unit adopts a stepper motor driving a ball screw and nut pair structure. The stepper motor is a two-phase hybrid stepper motor with a step angle of 1.8° and a holding torque of not less than 1.0 Nm. The stepper motor is connected to the ball screw via a coupling, and the ball screw lead is set to 5 mm. The screw nut is fixed to the moving platform, on which the imaging acquisition module and the supplementary lighting module are installed. The stepper motor driver receives pulse signals and direction signals sent by the control unit of the data processing terminal. The frequency of the pulse signal determines the motor speed, and the number of pulses determines the electric current. The rotation angle of the machine is used to control the displacement and speed of the moving platform. The displacement resolution that the axial drive unit can achieve is: when the stepper motor has a microstepping of 16, the rotation angle corresponding to each pulse is 1.8° / 16=0.1125°, and the corresponding linear displacement of the lead screw is (0.1125° / 360°)×5mm≈0.00156mm. The actual position repeatability is ±0.01mm. The movement stroke is set according to the drilling depth, with a typical stroke of 2m to 30m. The stroke range protection is achieved by installing limit switches. The circumferential drive unit adopts a structure in which a stepper motor drives the rotating platform through gear reduction. The stepper motor is the same model as that of the axial drive unit. The reduction ratio of the reducer is set to 10:1 to 20:1. The output shaft of the reducer is fixedly connected to the rotating platform through a flange. An imaging acquisition module and a supplementary lighting module are installed on the rotating platform. The rotating platform is supported by crossed roller bearings and can withstand combined radial and axial loads. The angular resolution of the circumferential drive unit is as follows: when the reduction ratio is 10:1, the motor step angle is 1.8°, the microstepping is 16, and the output angle corresponding to each pulse of the rotating platform is (1.8° / 16) / 10≈0.01125°. The angular repeatability positioning accuracy is ±0.05°. The circumferential motion can achieve continuous multi-turn rotation, and the rotation speed range is 0.5rpm to 5rpm. The stepper motor drivers for both the axial drive unit and the circumferential drive unit are integrated into the control box inside the motion drive mechanism. The control box contains the stepper motor driver, power module, signal adapter board, and overcurrent protection circuit. The driver adopts microstepping technology and supports 16 to 256 microsteps. The appropriate microstepping level can be selected according to the required motion smoothness and speed. The driver is connected to the control unit of the data processing terminal through a differential signal interface (pulse, direction, enable). The interface level is 5V or 24V. In addition, the alarm signal output terminal of the driver is connected to the control unit to provide feedback on fault conditions such as overcurrent and overheating. The motion drive mechanism is equipped with a coaxial slip ring, which is installed at the rotation axis of the rotating platform. It is used to transmit image data signals from the imaging acquisition module, PWM signals from the supplementary lighting module, and sensor signals from the attitude acquisition module during rotation. The coaxial slip ring has no fewer than 12 channels, including several video signal channels, power supply channels, and signal channels. The rated current meets the total power consumption requirements of the system. The slip ring uses precious metal contacts and has a rotational life of no less than 1 million revolutions. The axial drive unit of the motion drive mechanism is equipped with a linear encoder or magnetic scale, which works in conjunction with the axial displacement sensor in the attitude acquisition module as a position feedback element. The output shaft of the circumferential drive unit is equipped with an encoder, which works in conjunction with the circumferential angle sensor in the attitude acquisition module as an angle feedback element. These feedback elements are used to confirm the actual position and angle and can realize closed-loop control. During closed-loop control, the control unit takes the difference between the target position and the feedback position as input and outputs the motor speed command through the PID regulator to compensate for motion errors caused by load changes or mechanical backlash. When the system starts up, the motion drive mechanism automatically performs a zeroing operation. The axial drive unit moves towards the limit switch and stops after touching the lower limit switch. This position is recorded as the axial zero position. The circumferential drive unit rotates towards the zero position mark and stops after the photoelectric sensor detects the zero position signal. This angle is recorded as the circumferential zero position. After the zeroing is completed, the control unit clears the readings of the axial displacement sensor and the circumferential angle sensor to zero. Subsequent movements are all referenced to this zero position. The motion drive mechanism is powered by an external DC power supply with a voltage of 24V or 48V and a maximum output power of no less than 200W. The power supply cable is connected to the control box through a waterproof connector. The overall protection level of the motion drive mechanism is no less than IP54, which is suitable for the high humidity and dust environment inside the borehole. For deep hole applications, the motion drive mechanism can adopt a segmented design, first lowering it to the bottom of the hole and then moving it upward from the bottom of the hole. All control and feedback signals between the motion drive mechanism and the data processing terminal are transmitted through a multi-core shielded cable. The cable length is configured according to the drilling depth, with a maximum of 50m. The cable contains differential signal pairs, power lines, and ground lines. Signal transmission adopts RS-422 or RS-485 differential standards to suppress common-mode interference during long-line transmission. With the above structure, the motion drive mechanism can precisely control the axial position and circumferential angle of the imaging acquisition module and the supplementary lighting module inside the borehole, realizing a spiral scanning motion path. The axial drive unit and the circumferential drive unit can move independently or in conjunction to achieve spiral scanning: when the axial drive unit moves at a constant speed, the circumferential drive unit rotates at a constant speed, so that the imaging acquisition module covers the entire inner wall surface of the borehole along the spiral trajectory, ensuring the overlapping area between adjacent spiral lines, and providing complete data support for subsequent image stitching and 3D reconstruction.

[0027] See attached document Figure 6 , Figure 6 This is a block diagram of a borehole 3D imaging system based on binocular vision according to an embodiment of the present invention. The data processing terminal is the core computing and control unit of the system, responsible for receiving signals from the imaging acquisition module, the supplementary lighting module, and the attitude acquisition module, executing algorithms such as image processing, stereo matching, and 3D reconstruction, and sending control commands to the supplementary lighting module and the motion drive mechanism. The data processing terminal includes a storage unit, a processing unit, and a control unit. The storage unit uses a solid-state drive with a capacity of no less than 512GB to store system calibration parameters, raw binocular image sequences, attitude data, intermediate calculation results, and the final 3D model file. The processing unit uses a high-performance central processing unit and can be optionally equipped with a graphics processor to accelerate computationally intensive algorithms. The control unit uses an industrial-grade microcontroller or a field-programmable gate array to output synchronous trigger signals, PWM dimming signals, and motion control pulses. After the system starts, the processing unit first performs camera calibration. The calibration adopts Zhang Zhengyou's planar calibration method. It uses no less than 20 chessboard images with different poses to calculate the intrinsic parameter matrix, distortion coefficient, rotation matrix and translation vector between the first and second imaging units respectively. The intrinsic parameter matrix includes focal length and principal point coordinates. The distortion coefficient adopts the fifth-order radial distortion model and the second-order tangential distortion model. After the calibration is completed, all parameters are stored in the storage unit for subsequent distortion correction. During image preprocessing, the processing unit sequentially performs distortion correction, illumination equalization, and noise removal on the original image. Distortion correction is based on the calibrated distortion coefficients and uses inverse mapping and bilinear interpolation algorithms to map each pixel in the original image to the corresponding position in the corrected image. Illumination equalization uses a contrast-limited adaptive histogram equalization algorithm, which divides the image into several sub-blocks, performs histogram equalization on each sub-block, and performs linear interpolation fusion on the sub-block boundaries. At the same time, cropping is used to prevent noise amplification. Noise removal uses Gaussian filtering with a filter kernel size of 5×5 and a standard deviation of 1.0. When the processing unit performs stereo matching, it calculates disparity using the preprocessed image. For each pixel in the first-view image, it searches for matching points along the epipolar direction in the second-view image. The matching cost function consists of three terms: absolute difference and basis term, surface constraint term, and temporal constraint term. The calculation window size for the absolute difference and basis term is set to 7×7 pixels. The surface constraint term uses the geometric prior of the borehole wall approximating a cylindrical surface to apply a smoothness constraint to the disparity value of the current pixel and its neighborhood, using the deviation of the current pixel's disparity from the disparity fitted by the local surface in the neighborhood as the cost. The temporal constraint term uses the difference between the disparity projected from the previous frame image after pose correction to the current frame coordinates and the candidate disparity of the current frame as the cost. The three costs are weighted and summed to obtain the total cost. The formula for calculating the total cost is as follows: ; In the formula: For absolute difference and basic cost; The cost of surface constraints; This is due to the cost of timing constraints; and The preset weight coefficients are set to 0.3 and 0.5 respectively. Within the set disparity search range (typically 0 to 100 pixels), the total cost is calculated for each disparity candidate value. The disparity value with the smallest total cost is selected as the optimal disparity. Then, a left-right consistency check is performed: the disparity is calculated for the left and right images respectively. If the difference between the left and right disparities is greater than 1 pixel, it is marked as an unreliable point and filled with the median of the neighborhood disparity. Finally, subpixel interpolation is performed on the disparities that pass the check, and the subpixel level disparity is obtained by parabolic fitting. The processing unit introduces a dynamic disparity search interval guidance mechanism during stereo matching. This mechanism uses the current frame axial position and circumferential angle provided by the attitude acquisition module, as well as the pre-stored nominal borehole diameter data, to estimate the theoretical disparity upper and lower limits of each pixel based on the geometric projection relationship. This interval is used as the boundary of the disparity search to exclude obviously impossible disparity candidates, reduce the search space, and suppress mismatches. After the disparity calculation is completed, the processing unit uses the principle of binocular triangulation to convert the disparity into depth. The depth calculation formula is as follows: ; In the formula: This is a depth value, in millimeters. The focal length of the first imaging unit is expressed in pixels. The baseline distance between the optical centers of the two imaging units, in millimeters; The depth map of the current frame is obtained by performing the above calculation on all pixels, which is the subpixel level parallax. When the processing unit performs attitude-linked stitching, it constructs the camera pose matrix for each frame of the image based on the axial position information and circumferential angle information recorded by the attitude acquisition module. Let the axial position of the current frame be... Circumferential angle is Then the rotation matrix Translation vector They are respectively: ; ; In the formula: the origin of the world coordinate system is set as the starting position of the bottom of the borehole. Along the borehole axis, for each pixel (u,v) and its depth in the depth map. First, the points are transformed into three-dimensional points in the camera coordinate system using the camera's intrinsic parameters. : ; In the formula: (u0, v0) are the coordinates of the principal point. , The focal length is the length in pixels, which is then converted into a 3D point in the world coordinate system using the pose matrix. By combining the three-dimensional points of all frames, a preliminary dense point cloud is obtained; When the processing unit performs closed-loop error verification, it renders the initially generated triangular mesh model into a two-dimensional image through camera projection parameters and calculates the mean absolute error with the original first-view image. If the error is greater than the preset threshold (typically 5 pixels), the iterative nearest point algorithm is used to perform fine registration between each frame of point cloud and triangular mesh model, update the corresponding rotation matrix and translation vector, and then re-execute the above point cloud generation and stitching steps until the reprojection error converges within the threshold range. When the processing unit performs point cloud optimization and surface reconstruction, it first performs statistical outlier removal on the dense point cloud, setting the number of neighborhood points to 50 and the standard deviation factor to 1.5 to remove sparsely distributed outliers. Then, it uses voxel filtering to downsample, setting the voxel mesh side length to 1mm to reduce the point cloud density while maintaining the geometry. Finally, it performs normal vector estimation on the optimized point cloud and uses the Poisson surface reconstruction algorithm to construct a triangular mesh model, setting the octree depth to 10 to obtain a three-dimensional surface model of the borehole inner wall. The control unit is responsible for outputting synchronous trigger pulses with a frequency set to 30Hz and a pulse width of 10μs. Simultaneously, it drives the imaging acquisition module to start exposure. After each frame trigger signal is issued, the control unit immediately reads the axial position and circumferential angle of the attitude acquisition module and stores the data in the storage unit. The control unit also dynamically adjusts the PWM duty cycle of the supplementary lighting module based on the average brightness value of the image fed back by the processing unit to achieve closed-loop brightness control. In addition, the control unit sends pulse and direction signals to the stepper motor driver of the motion drive mechanism to control the axial movement speed and circumferential rotation speed, and monitors the driver alarm signal in real time to ensure motion safety. The data organization structure of the storage unit is as follows: each frame image is named "frame_frame_number_L.jpg" and "frame_frame_number_R.jpg", and the corresponding pose data is stored in an independent text file. Each line contains the frame number, axial position, circumferential angle and timestamp. The depth map, disparity map, intermediate point cloud and other files generated by the processing unit during the calculation process are stored in the corresponding subdirectory according to the frame number. The final 3D model is saved in the root directory in OBJ or PLY format. Through the collaborative work of the aforementioned hardware and algorithms, the data processing terminal can efficiently transform the binocular image sequences and pose data acquired at the front end into accurate 3D models, completing the entire processing chain from image input to model output.

[0028] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A three-dimensional drilling imaging system based on binocular vision, characterized in that, include: The imaging acquisition module includes a first imaging unit and a second imaging unit. The first imaging unit and the second imaging unit have the same imaging parameters, are symmetrically mounted on the same base, have parallel optical axes, and have a fixed optical center distance. A supplementary lighting module is fixedly connected to the imaging acquisition module and is arranged around the imaging acquisition module in a circumferential manner. The supplementary lighting module includes multiple light-emitting units, which are arranged at equal intervals along a ring. An attitude acquisition module includes an axial displacement sensor and a circumferential angle sensor. The axial displacement sensor is used to acquire the axial position information of the imaging acquisition module, and the circumferential angle sensor is used to acquire the circumferential angle information of the imaging acquisition module. The motion drive mechanism includes an axial drive unit and a circumferential drive unit. The axial drive unit is used to drive the imaging acquisition module and the supplementary light module to move along the borehole axis, and the circumferential drive unit is used to drive the imaging acquisition module and the supplementary light module to rotate around the borehole axis. A data processing terminal includes a storage unit, a processing unit, and a control unit; The control unit is used to send brightness adjustment commands to the supplementary lighting module, motion control commands to the motion drive mechanism, and synchronization trigger signals to the imaging acquisition module; The processing unit is used to perform image preprocessing, stereo matching, depth calculation, pose-linked stitching, and 3D reconstruction algorithms.

2. The drilling three-dimensional imaging system based on binocular vision according to claim 1, characterized in that, The main body of the supplementary lighting module is a ring-shaped printed circuit board, and the multiple light-emitting units are surface-mount white LEDs, with no fewer than 12 LEDs, and each light-emitting unit is evenly distributed on the ring-shaped printed circuit board; the connection between the supplementary lighting module and the data processing terminal includes a PWM signal line, the processing unit performs real-time analysis on the acquired image to extract the average brightness value, and the control unit adjusts the duty cycle of the PWM signal according to the average brightness value to achieve closed-loop brightness control.

3. The drilling three-dimensional imaging system based on binocular vision according to claim 1, characterized in that, The axial displacement sensor uses an incremental encoder or a magnetostrictive displacement sensor, and the circumferential angle sensor uses an absolute encoder or an incremental encoder. While sending a trigger pulse to the imaging acquisition module, the control unit reads the current axial position and circumferential angle from the attitude acquisition module and stores this set of data along with the trigger timestamp into the storage unit to achieve hardware synchronization of attitude data and image data.

4. The three-dimensional drilling imaging system based on binocular vision according to claim 1, characterized in that, The axial drive unit adopts a stepper motor driving a ball screw and nut pair structure, and the circumferential drive unit adopts a stepper motor driving a rotating platform through gear reduction transmission; the motion drive mechanism is equipped with a coaxial slip ring for transmitting image data signals, PWM signals and sensor signals in the rotation state.

5. A three-dimensional drilling imaging system based on binocular vision according to claim 1, characterized in that, The axial drive unit adopts a stepper motor driving a ball screw and nut pair structure, and the circumferential drive unit adopts a stepper motor driving a rotating platform through gear reduction transmission; the motion drive mechanism is equipped with a coaxial slip ring for transmitting image data signals, PWM signals and sensor signals in the rotation state.

6. The three-dimensional drilling imaging system based on binocular vision according to claim 1, characterized in that, The image preprocessing includes performing distortion correction, illumination equalization, and noise removal on the original image in sequence; the distortion correction uses inverse mapping and bilinear interpolation algorithms based on the calibrated distortion coefficients, the illumination equalization uses a contrast-limited adaptive histogram equalization algorithm, and the noise removal uses Gaussian filtering.

7. The three-dimensional drilling imaging system based on binocular vision according to claim 1, characterized in that, In the stereo matching, the matching cost function is obtained by weighted summation of absolute difference, basic terms, surface constraint terms, and temporal constraint terms. The processing unit also introduces a dynamic disparity search interval guidance mechanism, which uses the current frame axial position and circumferential angle provided by the attitude acquisition module, as well as the pre-stored nominal borehole diameter data, to estimate the theoretical disparity upper and lower limits of each pixel as the boundary of the disparity search.

8. A three-dimensional drilling imaging system based on binocular vision according to claim 1, characterized in that, The depth calculation uses the binocular triangulation principle to convert parallax into depth. The attitude linkage stitching constructs the camera pose matrix of each frame image based on the axial position information and the circumferential angle information, and converts the depth map to the world coordinate system to obtain a dense point cloud.

9. A three-dimensional drilling imaging system based on binocular vision according to claim 1, characterized in that, The processing unit performs closed-loop error verification, renders the initially generated triangular mesh model into a two-dimensional image through camera projection parameters, and calculates the average absolute error with the original first-view image. If the error is greater than a preset threshold, the iterative nearest point algorithm is used to perform fine registration between each frame of point cloud and triangular mesh model, and the corresponding rotation matrix and translation vector are updated until the reprojection error converges within the threshold range.

10. A borehole 3D imaging system based on binocular vision according to claim 1, characterized in that, When the processing unit performs point cloud optimization and surface reconstruction, it first performs statistical outlier removal on the dense point cloud, then uses voxel filtering to downsample, then performs normal vector estimation, and finally uses the Poisson surface reconstruction algorithm to construct a triangular mesh model to obtain a three-dimensional surface model of the borehole inner wall.