An electric sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring

CN122943947APending Publication Date: 2026-10-20HOHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611140961.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0007]本发明的目的是克服现有固定基线双目视觉系统在岸基水位监测中适应范围有限,以及可调基线结构与标定参数不同步导致测量结果不一致的问题,提供一种面向岸基水位监测的电动滑轨式可调基线双目视觉装置

Benefits of technology

[0048](1)实现了跨量程高精度测距的物理自适应:通过核心微处理器驱动单电机控制双向一体化丝杆对称调节双目相机的物理基线,使其能根据水面目标距离变化在短基线、中基线和长基线间动态调节,解决了固定基线双目无法兼顾近距离大公共视场与远距离高视差分辨率的内在矛盾。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

This invention discloses an electrically adjustable baseline binocular vision device for shore-based water level monitoring, comprising a support platform, an electrically adjustable slide rail assembly with a drive motor and a bidirectional integrated lead screw, a binocular camera assembly symmetrically mounted on left / right moving slides, and a baseline position detection module. The microprocessor adaptively shifts gears and controls the single motor to eliminate backlash based on the maximum / minimum parallax and quality feedback of the water surface feature area through a spatiotemporal dual hysteresis mechanism. After the slide is precisely positioned, the parameter call module retrieves a dedicated parameter set and, combined with the actual displacement feedback from the magnetic scale, corrects the extrinsic translation vector components in real time. By driving the single motor with the core microprocessor to control the bidirectional integrated lead screw, the physical baseline of the binocular camera is symmetrically adjusted, enabling dynamic adjustment between short, medium, and long baselines according to changes in the distance to the target on the water surface. This resolves the inherent contradiction that fixed-baseline binocular cameras cannot simultaneously handle a large common field of view at close range and high parallax resolution at long range.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of non-contact water level monitoring technology, specifically relating to an electric sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring. Background Technology

[0002] Water level is a crucial parameter in flood control scheduling, river management, urban flooding response, and levee hazard assessment. Traditional contact-type water level gauges, manual water gauges, and some fixed non-contact sensors are widely used in conventional monitoring stations. However, in scenarios involving temporary shore-based observations, complex water surfaces, long-distance deployment, and personnel safety constraints, these methods still have limitations, such as reliance on fixed infrastructure for installation, long deployment cycles, high maintenance risks, or difficulty in quickly adapting to on-site spatial conditions.

[0003] Binocular vision measurement can reconstruct three-dimensional spatial information of the water surface or target area by utilizing the parallax relationship between the images from the left and right cameras. It offers advantages such as non-contact operation, rich information content, and flexible deployment, making it suitable for emergency monitoring of shore-based water levels. However, most existing binocular vision systems employ a fixed baseline structure, meaning the physical distance between the left and right cameras remains constant after installation. In practical shore-based water level monitoring, a fixed baseline makes it difficult to simultaneously achieve near-range field-of-view overlap and long-range ranging accuracy.

[0004] Specifically, when the baseline is short, the common field of view of the left and right cameras in close-up scenes is large, which is beneficial for obtaining stable matching points. However, when observing at a distance, the target parallax decreases rapidly with increasing distance, and even a small pixel-level matching error can cause a large depth calculation error. When the baseline is long, the parallax resolution capability of distant targets is enhanced, but the overlapping area of ​​the left and right images will be significantly reduced in close-up scenes, which may lead to a reduction in effective matching points, discontinuous reconstruction areas, or even the inability to reconstruct stably.

[0005] Furthermore, changes in the baseline length of the binocular cameras will alter the extrinsic parameters, epipolar correction parameters, and 3D reprojection parameters between the left and right cameras. If the camera spacing is altered only through mechanical means while the software retains the original calibration parameters, inconsistencies will arise in image distortion correction, epipolar correction, parallax calculation, and 3D reconstruction results, thereby affecting the reliability of water level measurement results.

[0006] Therefore, the existing technology has at least the following shortcomings: First, fixed baseline binocular vision systems are difficult to adapt to both close-range large field of view and long-range high-precision measurement at the same time; second, if the adjustable mechanical structure lacks position detection and parameter linkage, inconsistencies between the mechanical baseline and the software calibration parameters are likely to occur; third, on-site temporary recalibration takes a long time, which is not conducive to the rapid deployment of shore-based emergency water level monitoring; fourth, there is a lack of baseline feedback adjustment mechanism based on image overlap rate, number of effective matching points and 3D reconstruction quality. Summary of the Invention

[0007] The purpose of this invention is to overcome the limitations of existing fixed baseline binocular vision systems in shore-based water level monitoring, as well as the inconsistency in measurement results caused by the asynchronous nature of the adjustable baseline structure and calibration parameters. This invention provides an electric sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] An electrically operated, adjustable baseline binocular vision device for shore-based water level monitoring includes:

[0010] Support platform, used for rigid installation on shore-based monitoring platform;

[0011] The electric slide rail assembly is rigidly fixed to the top of the support platform in the lateral direction. It includes a bidirectional integrated lead screw driven by a drive motor, and a left moving slide and a right moving slide symmetrically sleeved on the left and right transmission pairs of the bidirectional integrated lead screw.

[0012] A binocular camera assembly includes a left-eye camera and a right-eye camera, which are respectively rigidly fixedly mounted on the top of the left and right movable slides.

[0013] The baseline position detection module includes a magnetic scale fixed on the slide rail, and a left reading head and a right reading head fixed on the left and right moving slides respectively, for real-time detection of the physical displacement components of the two slides relative to the central geometric reference.

[0014] The limit protection module includes a home switch and an external limit switch installed on the electric slide rail assembly; and

[0015] The control module includes a core microprocessor, a motor driver, a calibration parameter storage module, and a parameter call module. The parameter call module and the calibration parameter storage module are both built into the core microprocessor. The core microprocessor is electrically connected to the left and right reading heads, the origin switch, the external limit switch, the motor driver, and the left and right eye cameras, respectively, to control the electric slide rail assembly to dynamically and adaptively switch the baseline position, and to perform three-dimensional reconstruction and output of the shoreline water level elevation using the synchronous images acquired by the left and right eye cameras.

[0016] Furthermore, the calibration parameter storage module pre-stores multiple discrete target baseline distances for the electric slide rail assembly, and each baseline distance is uniquely mapped to and bound to a set of binocular camera calibration parameters; the calibration parameter set includes at least the binocular camera intrinsic parameter matrix, distortion coefficients, and rotation matrix. and nominal translation vector When the control module confirms that the two slides have reached the target baseline position, it triggers the parameter calling module to access the calibration parameter storage module and retrieve the corresponding calibration parameter group.

[0017] Furthermore, after retrieving the calibration parameter set for the target baseline position, the parameter retrieval module further reads the actual physical displacement reported in real time by the left and right reading heads. and Internally, it performs dynamic fusion compensation calculation of the baseline translation vector to correct the nominal translation vector in the calibration parameter set:

[0018] The position error compensation amount caused by mechanical asymmetric motion is calculated using the actual physical displacement. and the position error compensation amount The compensation is superimposed onto the nominal translation vector components in the calibration parameter set to generate the real-time corrected actual translation vector components. It is then sent to the stereo matching algorithm to eliminate the interference of mechanical transmission errors on the accuracy of three-dimensional reconstruction of water level elevation.

[0019] Furthermore, when the core microprocessor receives the target shift instruction, its internal image processing thread automatically switches to data hold state to suspend the current 3D reconstructed image refresh processing logic; during the symmetrical movement of the two sliding tables driven by the drive motor, the core microprocessor controls the left and right cameras to pause synchronous image acquisition; and after the position is confirmed and the parameters are called, the core microprocessor resumes the synchronous acquisition of the left and right cameras and releases the image processing thread from its suspended state to restore the real-time calculation and output of the water level elevation.

[0020] Furthermore, the parameter call module only allows reading and enabling the corresponding calibration parameter group after receiving a confirmation signal of being in position. When the position error of any moving slide exceeds the allowable range, or the symmetry error of the left and right moving slides exceeds the allowable range, the control module determines the position, performs overall fine-tuning, or issues an alarm through the following combined strategy:

[0021] The core microprocessor first calculates the current overall mechanical baseline deviation, as well as the bilateral motion symmetry residuals;

[0022] Fully in position: When the overall mechanical baseline deviation is less than the allowable error, and the symmetry residual is less than the symmetry error, and this state is continuously met within the preset stable time, it is determined that both slides have accurately reached the target gear position; the control module controls the drive motor to stop and lock, and at the same time sends a position confirmation signal to the outside through the communication interface, triggering the system to call the camera intrinsic and extrinsic parameter calibration parameters linked to this gear position;

[0023] Overall fine-tuning and mechanical backlash elimination: If the overall mechanical baseline deviation is greater than the allowable error, but the symmetry residual is less than or equal to the symmetry error, it indicates that the movement pace on both sides is synchronized, but the whole has not yet moved to the position. The control module controls the drive motor to continue to approach the target position with preset low-speed fine-tuning pulses. If reverse movement occurs during the control process, the control module executes backlash elimination logic to eliminate the return error between the lead screw and the lead screw nut.

[0024] Asymmetric anomaly alarm: If the symmetry residual is greater than the symmetry error, the control module determines that there is an asymmetric fault in the current system; the core microprocessor immediately cuts off the enable signal of the drive motor and locks the motor, prohibits the system from enabling the linkage parameters of this gear, and outputs specific fault code information to the user terminal through the external communication interface to protect the mechanical structure from being twisted.

[0025] Furthermore, the backlash elimination logic is as follows: the control drive motor first overtravels and reverses to drive a preset number of pulses, and then reverses direction to press against the lead screw transmission surface, thereby eliminating overshoot or undershoot errors caused by the dead zone of mechanical transmission through unidirectional pressing.

[0026] Furthermore, the core microprocessor also runs a baseline level decision program based on image quality feedback; the decision program calculates the maximum disparity value within the stereo matching feature region. and minimum disparity value and compare it with the preset optimal high-precision parallax range. , Real-time comparison:

[0027] When detected When this occurs, the control module is triggered to execute a control command to switch to a longer baseline gear; when it detects... When this occurs, the control module is triggered to execute a control command to switch to a shorter baseline gear.

[0028] Furthermore, the baseline gear decision algorithm also includes a spatiotemporal dual-hysteresis shifting anti-oscillation unit; only when the maximum or minimum disparity value crosses the judgment boundary and exceeds the preset pixel hysteresis tolerance band, and the state is continuously and stably maintained for more than the preset time-limited switching delay threshold in the time dimension, is it allowed to issue a shifting control command to the control module.

[0029] Furthermore, the parameter call module runs a quality feedback evaluation program that evaluates the measurement quality at the current baseline level in real time using the following three quantitative indicators:

[0030] Effective match rate : Defined as the proportion of the number of pixels that successfully matched stereo and output a valid disparity value to the total number of pixels in the preset water surface reference area ROI;

[0031] Average matching confidence : Use uniqueness constraint checks and left-right consistency checks to eliminate mismatched points, and average the cost residuals of the remaining valid matching points;

[0032] Disparity histogram distribution interval: Statistically calculates all valid disparity values ​​within the ROI region. The distribution of the maximum disparity is extracted. and minimum disparity .

[0033] Furthermore, the core microprocessor also runs a time-domain filtered water level inversion program; the left and right cameras continuously acquire multiple frames of synchronized images under hardware synchronization trigger pulses; the water level inversion program fits the average relative depth value of the water surface through time axis mean smoothing filter, and combines the known installation elevation and downward angle to invert and calculate the absolute water level elevation value and output it.

[0034] The measurement method based on a binocular vision device includes the following steps:

[0035] Step S1: Observation distance estimation and initial input; After the device is started, the approximate observation distance or first frame image quality information of the current water surface area to be measured is obtained through on-site manual interaction input, external equipment estimation or preliminary image processing algorithm, and used as the initial reference for baseline selection.

[0036] Step S2: Determine the target baseline level; the core microprocessor matches and determines the optimal target baseline level in the current state from the preset mapping table based on the observation distance or image quality obtained in step S1.

[0037] Step S3: Drive control and mechanical slide rail reset; The control module sends the corresponding power pulse and direction command to the motor driver to control the drive motor to deflect and drive the two moving slides in the electric slide rail assembly to move symmetrically until they approach the theoretical physical position corresponding to the target baseline position.

[0038] Step S4: Baseline position detection and positioning confirmation; During the movement of the slide table, the left and right reading heads scan the magnetic scale in real time and report the physical displacement; The core microprocessor performs closed-loop judgment on the reported data to confirm that the position deviation of the two slide tables and the symmetry residual are within the preset tolerance zone, thereby completing the high-precision positioning confirmation.

[0039] Step S5: Dynamic linkage call of dedicated calibration parameter group; Under the dynamic linkage constraint of "the corresponding calibration parameter can only be called after the baseline position is detected; an alarm or readjustment is required if the position is not in place", the parameter call module accesses the calibration parameter storage module in a directional manner, indexes and reads the corresponding dedicated static calibration parameter group according to the current gear number, and uses the physical displacement amount fed back by the magnetic scale in real time to perform online error compensation correction on the translation vector component;

[0040] Step S6: Image distortion removal and epipolar correction; The core microprocessor restores the synchronous high-frequency acquisition of the left and right cameras, and uses the parameter group called and corrected in step S5 to perform lens distortion removal and epipolar parallelism geometric correction on the original left and right images.

[0041] Step S7: Stereo matching and disparity calculation; The system inputs the corrected dual images into the stereo matching algorithm, searches for corresponding feature points between the left and right rows of pixels, and calculates the dense, high-precision horizontal coordinate difference between corresponding left and right pixels, i.e., the disparity map;

[0042] Step S8: 3D reconstruction; using the updated 3D reprojection matrix Q, the pixel disparity map calculated in step S7 is converted into spatial 3D coordinates to obtain high-precision spatial 3D point cloud data representing the feature areas of the water surface, bank slope or visual target to be measured.

[0043] Step S9: Comprehensive feedback evaluation of reconstruction quality; the system extracts and statistically analyzes multi-dimensional quality indicators from the reconstructed point cloud and the matched image, specifically including calculating the image overlap rate, the number of effective matching points, and the maximum disparity. and minimum disparity And reconstruction residual indicators;

[0044] Step S10: Quality threshold convergence and closed-loop determination; the system determines whether the quality feedback index obtained in step S9 fully meets the preset high-precision quality threshold.

[0045] If the following conditions are met: it indicates that the current baseline position is in the optimal ranging range, the system directly enters step S11, performs time-domain filtered water level elevation inversion calculation, and outputs the final water level elevation result to the flood control monitoring terminal in real time, completing a single closed-loop measurement.

[0046] If the condition is not met, it indicates that the parallax attenuation at long distances or the overlap rate at close distances is insufficient. The system will automatically trigger the closed-loop control mechanism of "re-selecting or recommending adjustment of the baseline gear", and feed back the recommended target gear shifting command to step S2. The drive motor controls the slide rail to shift gears again until the quality indicators converge.

[0047] Compared with the prior art, the present invention has the following beneficial effects:

[0048] (1) Achieved physical self-adaptation for high-precision ranging across ranges: The physical baseline of the binocular camera is symmetrically adjusted by a single motor driven by the core microprocessor to control the bidirectional integrated screw, so that it can dynamically adjust between short baseline, medium baseline and long baseline according to the change of target distance on the water surface. This solves the inherent contradiction that fixed baseline binocular cameras cannot take into account both large common field of view at close range and high parallax resolution at long range.

[0049] (2) The interference of mechanical asymmetric displacement on three-dimensional reconstruction is eliminated: By introducing the dynamic fusion compensation logic of baseline translation vector on the basis of the multi-level baseline calibration parameter library, the physical displacement reported in real time by the magnetic grating ruler position detection module is used to correct the nominal translation vector component in the external parameters online. Even if the slide table has asymmetric load caused by jamming and wear during long-term operation, it can still generate high-precision actual translation vector components and input them into the stereo matching algorithm, thus eliminating the geometric interference of mechanical transmission error on the accuracy of three-dimensional reconstruction of water level elevation.

[0050] (3) Seamless linkage between hardware and software and elimination of on-site calibration: By establishing a one-to-one mapping and automatic linkage calling mechanism between multiple baselines and dedicated calibration parameter groups, the software processing parameters in the chip are automatically updated after the physical baseline is in place, which greatly shortens the response time of dynamic system reconstruction, eliminates the need for repeated on-site calibration in the field environment, and greatly improves the efficiency of temporary shoreline water level monitoring and flood control emergency deployment.

[0051] (4) Achieving intelligent decision-making and mechanical vibration protection in the critical zone with a fully closed loop: The system uses comprehensive quality feedback indicators such as effective matching rate, matching confidence and maximum / minimum parallax to guide shifting decisions, enabling the system to adapt to different complex hydrological conditions such as the near-shore high water season and the far-shore low water season; At the same time, the system introduces a time-space dual lag shifting anti-vibration mechanism, which effectively avoids the ineffective reciprocating oscillation of the drive motor caused by the shaking of the water surface wave edge, and extends the mechanical life of the field all-weather unattended monitoring system.

[0052] (5) Ensures system safety and high noise resistance under harsh field conditions: The limit protection mechanism of the combination of origin switch and external limit switch prevents mechanical overtravel, the single motor backlash elimination unit eliminates the dead zone of the lead screw return, and the time domain mean smoothing filter effectively suppresses the point cloud jump noise caused by wind and wave fluctuations, thereby improving the structural safety, data reliability and environmental stability of the device under open field operation conditions. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the structure of the electric sliding rail type adjustable baseline binocular vision device of the present invention;

[0054] Figure 2 This is a flowchart of the baseline adjustment and calibration parameter linkage calling process of the present invention;

[0055] Figure 3 This is a schematic diagram showing the correspondence between the multiple baselines and the dual-target positioning parameters of this invention;

[0056] Figure 4 This is a schematic diagram illustrating the application scenario of the present invention for shore-based water level monitoring. Detailed Implementation

[0057] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the following embodiments are merely illustrative of the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention. All equivalent substitutions or conventional modifications made based on the technical concept of the present invention should fall within the scope of protection of the present invention.

[0058] Example 1: Device Structure

[0059] like Figure 1 As shown, the electrically adjustable baseline binocular vision device of this embodiment includes a support platform 1, an electrically adjustable slide rail assembly 2, a left-eye camera 3, a right-eye camera 4, a baseline position detection module 5, a limit protection module 6, a control module 7, a calibration parameter storage module 8, a parameter recall module 9, and a drive motor 10. The support platform 1 is used to support the electrically adjustable slide rail assembly 2 and the binocular camera assembly above it, and can be connected to a tripod, shore support, vehicle platform, or temporary fixed base to meet the needs of temporary shore-based deployment and stable support.

[0060] The electric slide rail assembly 2 includes a linear guide rail, a bidirectional lead screw, a left moving slide 2-3, a right moving slide 2-4, and a drive motor 10. The left camera 3 is mounted on the left moving slide 2-3, and the right camera 4 is mounted on the right moving slide 2-4. The bidirectional lead screw includes left-hand and right-hand threaded sections with opposite directions of rotation. The left and right moving slides are connected to their respective threaded sections via lead screw nuts. When the drive motor 10 rotates the bidirectional lead screw, the left and right moving slides move synchronously in opposite directions along the linear guide rail, ensuring that the left camera 3 and the right camera 4 remain symmetrical relative to the central reference position of the electric slide rail assembly 2.

[0061] The control module 7 generates a slide movement command based on the target baseline gear position and sends the slide movement command to the motor driver. The slide movement command includes at least the target gear position number, target baseline length, target slide displacement, direction of movement, speed of movement, allowable position error, and maximum movement time. The motor driver controls the drive motor 10 to operate according to the slide movement command, thereby driving the left and right sliding slides to move synchronously in opposite directions.

[0062] In this embodiment, a magnetic scale is used to detect the positions of the left and right moving slides. The scale part 5-1 of the magnetic scale is fixedly installed on the fixed base of the electric slide rail assembly 2 along the linear guide rail direction. The left and right reading heads are fixedly installed on the left and right moving slides respectively, and move synchronously with the corresponding moving slides. The left and right reading heads read their respective positions relative to the scale part and send the detected left and right slide positions to the control module 7.

[0063] A left origin switch 5-4 and a right origin switch 5-5 are respectively set on one side of the linear guide rail near the minimum baseline position. The left origin switch 5-4 and the right origin switch 5-5 are normally closed Hall proximity sensors. The bottom of the left and right moving slides are respectively equipped with matching neodymium iron boron permanent magnet trigger plates.

[0064] Each time the system powers on and initializes, the core microprocessor of control module 7 automatically executes the origin reset program: controlling drive motor 10 to move the two side slides towards the inner center reference position at a preset first speed (low speed mode). When the permanent magnet trigger plates under the left and right slides respectively enter the magnetic field sensing range of the left and right origin switches 5-4 and 5-5, the output level of the two switches changes from high to low, triggering the core microprocessor to generate an external interrupt. Upon receiving the dual origin interrupt signals, the core microprocessor latches and clears the internal left and right high-frequency pulse counters. This establishes the absolute geometric reference for the slide movement, and sets the physical distance between the optical centers of the left eye camera 3 and the right eye camera 4 at this time as a known constant of the initial baseline. .

[0065] Left and right outer limit switches are respectively installed at the left and right outer limit positions of the linear guide. When any moving slide reaches the preset maximum stroke position and triggers the corresponding outer limit switch, the control module 7 immediately stops the drive motor 10 to prevent the moving slide from overtraveling.

[0066] The control module 7 includes a core microprocessor, a motor driver, a position detection interface, a digital input isolation circuit, a high-frequency counting interface, and an external communication interface. The core microprocessor, through its integrated high-frequency counting interface, is electrically connected to the digital signal output terminals of the left reading head 5-2 and the right reading head 5-3 in the baseline position detection module 5, respectively. The left reading head 5-2 and the right reading head 5-3 move with their corresponding sliding tables, scanning the scale section 5-1 of the magnetic scale fixed on the base in real time, and inputting quadrature pulse signals with a 90-degree phase difference to the high-frequency counting interface. The core microprocessor calculates the physical displacement of the left and right sliding tables relative to the origin position in real time by performing a quadruple frequency counting of the pulses, with the components denoted as follows: , Let the initial baseline be when both the left and right sliding tables are at the origin position. The distance the left-moving slide moves outward relative to its origin is... The distance the right-moving slider moves outward relative to its origin is... The current physical baseline for:

[0067]

[0068] When the sliding tables move symmetrically to the left and right, their target displacements are the same, that is:

[0069]

[0070] in, For the first The target baseline length corresponding to each target baseline level. and These represent the target displacements corresponding to the left and right moving slides, respectively.

[0071] Control module 7 compares the actual displacements of the left and right moving slides with the target displacements. Let the actual displacements of the left and right moving slides be respectively... and , No. The target displacements corresponding to the target baseline positions are respectively and Then the left and right position errors are respectively:

[0072]

[0073] When the left position error and right position error All are not greater than the allowable positional error And the symmetry error of the left and right moving slides satisfies:

[0074]

[0075] If the above conditions are met continuously within a preset stable time, the control module 7 determines that both the left and right moving slides have reached the target baseline position and generates a positioning confirmation signal. The parameter call module 9 only allows reading and enabling the corresponding calibration parameter group after receiving the positioning confirmation signal.

[0076] When the positional error of any moving slide exceeds the allowable range, or the symmetry error of the left and right moving slides exceeds the allowable range, because the system adopts a mechanical structure of a single drive motor 10 driving an integrated bidirectional lead screw, it is impossible to physically change the position of a single slide independently. Therefore, the control module 7 determines the position, performs overall fine-tuning, or issues an abnormal alarm through the following composite strategy:

[0077] The core microprocessor first calculates the current overall mechanical baseline deviation. and bilateral motion symmetry residuals .

[0078] Judgment Scenario 1 (Completely in Place): When the overall mechanical baseline deviation... And symmetrical residuals If this state is maintained for a preset stable time, it is determined that both sliding platforms have accurately reached the target gear. The control module 7 controls the drive motor 10 to stop and lock, and at the same time sends a position confirmation signal to the outside through the communication interface, triggering the system to call the camera's intrinsic and extrinsic parameter calibration parameters linked to this gear.

[0079] Judgment Scenario 2 (Overall Fine-tuning and Mechanical Backlash Elimination): If the overall mechanical baseline deviation... However, symmetrical residuals This indicates that the movement on both sides is synchronized, but the overall movement has not yet reached the target position. Control module 7 controls drive motor 10 to continue approaching the target position with preset low-speed fine-tuning pulses. If reverse movement occurs during the control process, in order to eliminate the mechanical backlash dead zone (backlash error) between the lead screw and the lead screw nut, control module 7 executes backlash elimination logic: it controls drive motor 10 to first drive in reverse for a preset number of pulses (such as 50 pulses) and then reverse to the same direction to press against the lead screw transmission surface, thereby eliminating the overshoot or undershoot error caused by the mechanical transmission dead zone through unidirectional pressing.

[0080] Judgment Scenario 3 (Asymmetric Anomaly Alarm): If the residual is symmetrical Since the bidirectional lead screw should theoretically maintain absolute symmetry under rigid linkage, the deviation here indicates an external anomaly. Control module 7 determines that the current system has an asymmetrical fault, namely "single-sided slide rail jamming, local wear of the lead screw, or a reading head step loss and disconnection." The core microprocessor immediately cuts off the enable signal (ENA low) of the drive motor 10 and locks the motor, prohibiting the system from enabling the linkage parameters of that gear. At the same time, it outputs specific fault code information to the user terminal through the external communication interface to protect the mechanical structure from being twisted.

[0081] The calibration parameter storage module 8 and parameter call module 9 can also be implemented by a storage program and a parameter call program in a host computer or edge computing terminal, used to store, read and enable the corresponding dual-target calibration parameter group according to the baseline position number.

[0082] The core microprocessor is electrically connected to the signal output terminals of the left origin switch 5-4, right origin switch 5-5, left outer limit switch 6-1, and right outer limit switch 6-2 via digital input isolation circuits, for real-time monitoring of the slide's edge state. The level signal output terminals of the left origin switch 5-4, right origin switch 5-5, left outer limit switch 6-1, and right outer limit switch 6-2 are respectively connected to the input terminals of the optocoupler isolation circuit. When any switch is triggered, the corresponding input level changes, and the core microprocessor captures this edge state by reading the general purpose input / output (GPIO) pin state or directly triggering an internal hardware interrupt.

[0083] The control output of the core microprocessor is electrically connected to the low-voltage control input of the motor driver, used to send drive pulse signals (PUL), direction signals (DIR), and enable signals (ENA). The power output of the motor driver is connected to the drive motor 10 via a cable, and the output shaft of the drive motor 10 is mechanically connected to a bidirectional lead screw. The motor driver amplifies the power of the received low-voltage control pulses to control the speed and number of rotations of the drive motor 10, thereby driving the bidirectional lead screw to synchronously move the two side slides inward or outward.

[0084] The core microprocessor establishes a bidirectional data communication connection with the host computer or edge computing terminal via a communication interface, thereby receiving the target baseline position command and uploading a confirmation signal upon confirmation of arrival. Simultaneously, the core microprocessor is electrically connected to the power supply and trigger board of the binocular cameras, ensuring absolute time synchronization of image acquisition from both cameras by outputting synchronous hardware trigger pulses (TTL level signals) to the external trigger interfaces of the left and right cameras (3 and 4).

[0085] Example 2: Establishment of a multi-baseline calibration parameter library

[0086] like Figure 3 As shown, this embodiment presets four baseline settings: 20 cm, 40 cm, 60 cm, and 80 cm. The above values ​​are only one implementation method for illustrative purposes; in actual applications, other settings can be set according to the camera focal length, field of view, slider length, and target ranging range.

[0087] During the calibration phase, the electric slide rail assembly 2 is first controlled to adjust the left and right cameras to the first baseline position, and the slide rail is locked or the motor is held in place. Then, multiple sets of synchronized images of the checkerboard, dotted board, or other calibration board at different postures and distances are acquired for dual-target calibration. The intrinsic parameters K1 and K2 of the left and right cameras, the distortion parameters D1 and D2 of the left and right cameras, the rotation matrix R of the left and right cameras, and the nominal translation vector are obtained at this position. Epipolar correction mapping parameters are used , And the three-dimensional reprojection matrix Q.

[0088] After completing the calibration of the first baseline position, the system sequentially switches to the second, third, and fourth baseline positions, repeating the acquisition of calibration images and the parameter solving process. The parameters obtained for each position are stored in the form of "position number - parameter group". For example, the 20 cm baseline position B1 corresponds to parameter group P1, the 40 cm baseline position B2 corresponds to parameter group P2, the 60 cm baseline position B3 corresponds to parameter group P3, and the 80 cm baseline position B4 corresponds to parameter group P4.

[0089] like Figure 3 The first in the calibration parameter library The parameter set corresponding to each baseline level can be represented as:

[0090] ;

[0091] Because baseline changes directly alter the translation vector, epipolar correction, and 3D reconstruction parameters, calibration parameters for different baseline settings are not shared. This allows for the retrieval of pre-calibrated parameter sets simply by selecting or automatically determining the desired setting during field use, avoiding the need for on-site recalibration.

[0092] In this embodiment, in order to make full use of the high-precision physical displacement feedback returned by the baseline position detection module 5 and eliminate the asymmetric cumulative position error caused by minor jamming and lead screw wear during long-term field operation of the mechanical slide rail, the parameter calling module 9 is specially equipped with a baseline translation vector dynamic fusion compensation solution logic before inputting the external parameters to the three-dimensional reconstruction module.

[0093] The specific formula for the dynamic compensation of the translation vector is as follows:

[0094] Let the initial physical geometric distance between the two cameras, pre-calibrated at the factory, be... The baseline translation vector corresponding to the current target gear is the static nominal translation vector. The component along the line connecting the two cameras (X-axis direction) is: When the slide stops, the baseline position detection module 5 reports in real time the actual physical displacement of the left-moving slide. The actual physical displacement of the right-moving slide is .

[0095] Because the variable baseline mechanical component exhibits slight asymmetric displacement deviations during actual operation, the parameter calling module 9 introduces a mechanical position error compensation amount. The nominal extrinsic parameters are corrected online and finally input into the actual extrinsic translation vector components in the stereo matching and depth calculation algorithm. for:

[0096] Wherein, the mechanical position error compensation amount The calculation formula is:

[0097] )

[0098] In the formula, This represents the theoretical baseline physical distance for the current target gear. After the parameter calling module 9 completes the dynamic fusion calculation and correction of the above extrinsic parameter translation vector, it sends the final generated actual extrinsic parameter matrix to the 3D reconstruction module, thereby realizing a real-time dynamic closed loop between the underlying hardware sensor positioning data and the upper-level software calibration parameters.

[0099] Example 3: Shoreline water level measurement process

[0100] like Figure 4 As shown, the device is deployed on the bank, bridge deck, embankment top, or other safe locations, with the left and right cameras facing the area of ​​water to be measured. The operator can input the approximate observation distance through the host computer software, or the system can determine the target baseline level based on historical ranging results, laser ranging results, initial parallax of the binoculars, image overlap rate, or other distance estimation results.

[0101] When the system starts up and no valid observation distance information has been obtained, the control module first selects a preset initial baseline setting. The initial baseline setting is preferably the shortest baseline setting or a medium-short baseline setting with a large common field of view, to increase the probability of effective overlap between the left and right images. After the initial baseline setting is set, the control module calls the calibration parameter group corresponding to that setting and controls the left and right cameras to acquire the first set of synchronized images.

[0102] To reduce the impact of water surface reflection, ripples, and weak texture on the initial matching results, the system prioritizes calculating the initial parallax, effective matching ratio, and image overlap rate in relatively static reference areas such as bank slopes, revetments, water gauges, bridge piers, or other areas with recognizable textures. Based on this, it obtains a rough observation distance or evaluates the applicability of the current baseline setting.

[0103] When the initial parallax is less than the preset minimum parallax, it indicates that the current baseline may be too short relative to the observation distance. The control module selects adjacent baseline settings for testing in ascending order of baseline length. When the image overlap rate is lower than the preset threshold, it indicates that the current baseline may be too long. The control module adjusts towards a shorter baseline. Thus, while meeting the image overlap requirements, the system prioritizes shorter baseline settings for closer targets and longer baseline settings for farther targets, balancing the common field of view and long-distance depth resolution.

[0104] When the system has obtained manually input distance, historical ranging results, laser ranging results, or other external distance information, the control module can directly determine the candidate baseline level based on the pre-established correspondence between the observation distance interval and the baseline level, and verify or adjust the candidate baseline level through image overlap rate, effective parallax, or reconstruction quality evaluation results.

[0105] After the baseline position is determined, the control module 7 puts the system into baseline switching mode, pausing image acquisition and current 3D reconstruction processing of the left and right cameras 3 and 4, or marking images acquired during baseline switching as invalid. Then, it sends a control command to the drive motor 10, which moves the moving slide in the electric slide rail assembly 2 to the target position. After the baseline position detection module 5 confirms that the moving slide has reached the corresponding baseline position, the parameter retrieval module 9 reads the parameter set corresponding to that baseline position from the calibration parameter storage module 8 and updates the image distortion correction, image geometric correction or epipolar correction, stereo matching, and 3D reconstruction modules. After the parameter update is complete, the left and right cameras 3 and 4 resume synchronous acquisition of water surface images. The system uses the updated parameters for image correction and performs stereo matching using a semi-global matching algorithm (SGM) based on Census transform to calculate the real-time disparity value d of the feature points. Then, it uses the 3D reprojection matrix Q to calculate the depth, obtaining the 3D point cloud data of the target area on the water surface in the camera coordinate system. .

[0106] In specific water level applications, the system can further combine water surface region segmentation, point cloud filtering, and plane fitting to obtain the spatial position representing the water surface and output the relative water level or the water level elevation combined with an external elevation benchmark. The core of this invention lies in the adjustable baseline structure of the binocular vision device and its linkage with calibration parameters. Region identification, point cloud filtering, and elevation conversion in water level inversion can utilize existing technologies or be configured according to site requirements. For example, the calculation steps can be as follows:

[0107] Step A: Under the hardware synchronization trigger pulse, the control module 7 controls the binocular camera to continuously acquire M frames (M=50 in this embodiment) of synchronous images at a sampling rate of 10Hz, and continuously calculates 50 sets of spatial feature point clouds.

[0108] Step B: After removing abrupt noise points that significantly deviate from the standard deviation mean using a statistical filter, the depth values ​​of the remaining valid point cloud are smoothed using the time dimension mean to fit a stable average relative distance to the water surface. .

[0109] Step C: Given the installation elevation of this device on the shore-based platform (i.e., the height of the camera's optical center relative to an absolute geographic elevation datum, such as the origin of the Yellow Sea elevation system), The downward tilt angle of the binocular camera's optical axis towards the water surface is θ. The host computer uses a coordinate system rotation transformation formula to convert the relative depth in the camera coordinate system. Converted to absolute elevation value, the final water level elevation The calculation formula is:

[0110]

[0111] After the host computer calculates the water level elevation, it outputs it to the flood control monitoring terminal in real time through an external communication interface, completing a complete precise closed-loop measurement of the shore-based water level baseline.

[0112] Example 4: Automatic Baseline Selection and Quality Feedback

[0113] In one automatic selection mode, the system selects the baseline level based on the observation distance Z and a preset distance range. For example, a 20 cm or 40 cm baseline is selected for the near distance range, and a 60 cm or 80 cm baseline is selected for the mid-to-far distance range. This is based on the depth relationship in binocular vision.

[0114]

[0115] In the formula, Z represents the target point depth, f represents the camera focal length, B represents the physical baseline between the optical centers of the left and right cameras, and d represents the parallax of corresponding points in the left and right images.

[0116] In binocular vision, the disparity between corresponding points on the left and right sides can be expressed as:

[0117]

[0118] in, and These represent the horizontal pixel coordinates of the same spatial point in the left and right images, respectively.

[0119] This relationship shows that, given a fixed focal length and parallax calculation accuracy, increasing the baseline length B helps improve the depth resolution of distant targets; however, an excessively large baseline will reduce the common field of view at close range. Therefore, the selection of the baseline needs to be a trade-off between field of view overlap and ranging accuracy.

[0120] In another automatic selection mode, the system acquires left and right images at the current baseline setting and calculates the image overlap rate, number of effective matching points, effective disparity ratio, median disparity, intra-point ratio in the point cloud, and reconstruction residual. The thresholds for each evaluation metric are determined through pre-experimentation based on camera resolution, focal length, baseline length, and target observation distance, and are stored along with the corresponding baseline setting. The specific calculation methods for these metrics are existing technology and will not be elaborated here. As one implementation method, the image overlap rate threshold can be set to 40%–80%, the minimum number of effective matching points can be set to 30–100, and the minimum effective disparity can be set to 2–5 pixels.

[0121] When multiple evaluation metrics yield inconsistent results, the system prioritizes determining whether the current baseline setting meets the basic conditions for image matching. If the image overlap rate is below a preset threshold or the number of effective matching points is below a preset threshold, the current baseline setting is deemed unusable, and the system adjusts towards a shorter baseline. If both the image overlap rate and the number of effective matching points meet the requirements, but the effective disparity is less than a preset minimum disparity or the reconstruction residual exceeds a preset threshold, the system adjusts towards a longer baseline. Therefore, when the image overlap rate meets the requirements but the disparity is too small, the system prioritizes testing adjacent longer baseline settings and re-evaluates the image overlap rate and reconstruction quality after switching.

[0122] Considering that water surface reflection, ripples, and weak texture may make it difficult to form stable matching points in water surface areas, the system prioritizes stereo matching and quality evaluation in relatively static reference areas with textured features, such as bank slopes, revetments, water gauges, bridge piers, fixed markers, or other such areas, rather than using the number of feature points in the water surface area as the sole criterion. Stereo matching can employ semi-global matching algorithms based on Census transform, block matching algorithms, or feature point matching algorithms, combined with epipolar constraints, left-right consistency checks, and mismatch removal to obtain effective matching results. When stable reference areas are lacking on-site, artificial markers can be set up to improve matching stability.

[0123] During system operation, the main control program performs semi-global matching (SGM) based on Census transform on the synchronized images acquired by the left eye camera 3 and the right eye camera 4. After stereo matching is completed, the parameter calling module 9 or the external computing unit automatically starts the quality feedback evaluation program to evaluate the measurement quality at the current baseline level in real time using the following three quantitative indicators:

[0124] Effective match rate Defined as the proportion of the number of pixels that successfully match stereo and output valid disparity values ​​to the total number of pixels in the preset water surface reference area (ROI).

[0125] Average matching confidence : Use uniqueness constraint checks and left-right consistency checks to eliminate mismatched points, and average the cost residuals of the remaining valid matching points.

[0126] Disparity histogram distribution interval: Statistically calculates all valid disparity values ​​within the ROI region. The distribution of the maximum disparity is extracted. and minimum disparity .

[0127] The baseline automatic selection strategy and state machine logic based on quality feedback are as follows:

[0128] When the system is at the aforementioned k-th baseline distance When the water level is relatively stable during operation, the effective matching rate is met. And average matching confidence The effective disparity values ​​are above the preset safety threshold, while the effective disparity values ​​are distributed within the preset optimal disparity range. , If the current baseline status is determined to be "excellent quality", the system will maintain the current position of the moving slide and continue to output the water level.

[0129] When the ambient water level experiences significant dynamic drift, the system automatically adjusts the baseline through the following two closed-loop feedback paths:

[0130] Path A (water level drops, distance increases):

[0131] When the water level drops during the dry season, the target observation distance increases. At this time, due to the increased target distance, the overall parallax values ​​of both the left and right images decrease synchronously. If the quality feedback assessment program detects the maximum parallax value within the current area... It is already below the preset lower limit of the optimal parallax range. This indicates that the current baseline is too short, resulting in a severe lack of parallax resolution. Continuing to measure will cause the depth calculation error to be magnified many times over.

[0132] At this moment, control module 7 immediately triggers the "large baseline switching command": controlling drive motor 10 to rotate, driving the left and right writing slides to open outwards symmetrically, seamlessly switching the current baseline to a longer baseline. (e.g., switching from 40 cm to 60 cm), thereby restoring the updated parallax value to the optimal parallax range. , ]Inside.

[0133] Path B (water level rises, distance decreases):

[0134] When the high-water season arrives or a sudden flood causes a rapid rise in water level, the target observation distance becomes shorter. At this time, the overall parallax values ​​of the left and right images will increase dramatically, and the overlap between the two cameras' fields of view will decrease significantly at close range. If the quality feedback assessment program detects the minimum parallax value in the current area... It has exceeded the preset upper limit of the optimal parallax range. or effective match rate This indicates that the fields of view of the two cameras have begun to diverge, resulting in a blind spot in close-range matching.

[0135] At this moment, control module 7 immediately triggers the "small baseline switching command": controlling drive motor 10 to rotate in the opposite direction, driving the left and right moving slides to move symmetrically inward, switching the current baseline to a shorter baseline. (e.g., switching from 40 cm to 20 cm) to increase the field of view overlap and forcibly reduce the overall parallax, ensuring that stereo matching does not fail.

[0136] Critical section anti-oscillation lock-up mechanism:

[0137] To prevent the drive motor 10 from malfunctioning when the water level fluctuates slightly in the critical region between the two baselines. and To address the issue of frequent and indiscriminate switching between gears, this invention introduces a time-space dual hysteresis loop (hysteresis time limit) mechanism into the control logic:

[0138] Control module 7 internally includes a switching delay counter and a trigger tolerance band. When the parallax or matching rate meets the switching conditions, the system does not immediately execute motor drive; instead, it must wait until the switching conditions are maintained stably for more than [time specified in the original text]. (In this embodiment) = 10 seconds) is the time criterion; at the same time, when calculating parallax changes, the following is introduced The hysteresis tolerance band of the pixels. Motor shifting is only allowed when the parallax crosses the critical point and exceeds the tolerance band. This mechanism successfully avoids ineffective reciprocating oscillations of the mechanical structure, significantly extending the service life of the shore-based all-weather unattended monitoring system.

[0139] like Figure 2 As shown, the core method steps of the control system of the electrically operated adjustable baseline binocular vision device for shore-based water level monitoring described in this invention include the following during actual operation and measurement:

[0140] Step S1: Observation distance estimation and initial input

[0141] After the system is started, it first obtains the approximate observation distance or first frame image quality information of the current water surface area to be measured through on-site manual interaction input, external equipment estimation, or preliminary image processing algorithms, and uses it as the initial benchmark for baseline selection.

[0142] Step S2: Determine the target baseline gear

[0143] Based on the observation distance or image quality obtained in step S1, the core microprocessor matches and determines the optimal target baseline level in the current state from a preset mapping table.

[0144] Step S3: Drive control and mechanical slide rail reset

[0145] The control module (7) sends the corresponding power pulse and direction command to the motor driver to control the drive motor (10) to deflect and drive the two moving slides in the electric slide rail assembly (2) to move symmetrically until they approach the theoretical physical position corresponding to the target baseline position.

[0146] Step S4: Baseline position detection and positioning confirmation

[0147] During the movement of the slide table, the left reading head (5-2) and the right reading head (5-3) scan the magnetic scale (5-1) in real time and report the physical displacement. The core microprocessor performs closed-loop judgment on the reported data to confirm that the position deviation of the two slide tables and the symmetrical residual are within the preset tolerance zone, thereby completing the high-precision positioning confirmation.

[0148] Step S5: Dynamic linkage and invocation of dedicated calibration parameter group

[0149] Under the dynamic linkage constraint of "the corresponding calibration parameters can only be called after the baseline position is detected; an alarm or readjustment is required if the position is not in place", the parameter calling module (9) accesses the calibration parameter storage module (8) in a directional manner, indexes and reads the corresponding exclusive static calibration parameter group (including the left camera intrinsic parameter K1, the right camera intrinsic parameter K2, the distortion parameters D1 and D2, the rotation matrix R, the translation vector T, the epipolar correction mapping parameter Map and the three-dimensional reprojection matrix Q) according to the current gear number, and uses the physical displacement fed back by the magnetic grating ruler in real time to perform online error compensation correction on the translation vector components.

[0150] Step S6: Image distortion correction and epipolar correction

[0151] The core microprocessor restores the synchronous high-frequency acquisition of the left eye camera (3) and the right eye camera (4), and uses the parameter group called and corrected in step S5 to perform geometric correction processing to remove lens distortion and make the epipolar lines parallel on the original left and right images.

[0152] Step S7: Stereo Matching and Parallax Calculation

[0153] The system inputs the corrected dual images into a stereo matching algorithm (preferably a semi-global matching algorithm SGM based on Census transform) to search for corresponding feature points between the left and right rows of pixels, and calculates the dense, high-precision horizontal coordinate difference between corresponding left and right pixel points, i.e., the disparity map.

[0154] Step S8: 3D Reconstruction

[0155] Using the updated 3D reprojection matrix Q, the pixel disparity map calculated in step S7 is transformed into spatial 3D coordinates to obtain high-precision spatial 3D point cloud data representing the feature areas of the water surface, bank slope, or visual target to be measured.

[0156] Step S9: Comprehensive Feedback Assessment of Reconstruction Quality

[0157] The system extracts and statistically analyzes multidimensional quality metrics from the reconstructed point cloud and the matched image, specifically including calculating the image overlap rate, the number of effective matching points, and the disparity distribution interval (maximum disparity). and minimum disparity Indicators such as reconstruction residuals.

[0158] Step S10: Quality threshold convergence and closed-loop determination

[0159] The system determines whether the quality feedback index obtained in step S9 fully meets the preset high-precision quality threshold:

[0160] If the following conditions are met: it indicates that the current baseline position is in the optimal ranging range, the system directly enters step S11, performs time-domain filtered water level elevation inversion calculation, and outputs the final water level elevation result to the flood control monitoring terminal in real time, completing a single closed-loop measurement.

[0161] If not satisfied: This indicates that the current baseline has become mismatched due to significant fluctuations in the environmental water level (long-distance parallax attenuation or insufficient close-distance overlap). The system will automatically trigger the closed-loop control mechanism of "re-selecting or recommending adjustment of the baseline gear", and feed back the recommended target gear shifting command to step S2. The drive motor controls the slide rail to shift gears again until the quality indicators converge.

[0162] Example 5: Effect Verification Example

[0163] In a controlled ranging validation test, the device was compared across four baseline settings—20 cm, 40 cm, 60 cm, and 80 cm—within an observation distance range of 2355 mm to 20310 mm. The test results showed that the short baseline exhibited better common field of view and matching stability at close range. However, as the distance increased, the 20 cm short baseline resulted in a significant increase in distance error due to parallax attenuation, while the 60 cm and 80 cm long baselines effectively reduced ranging error at long distances.

[0164] Test results show that within a close range of 2355 mm to 5000 mm, the system automatically switches to the 20cm short baseline setting. At this setting, the overlap rate of the common field of view of the left and right images is greater than 75%, stereo matching has no blind spots, and the absolute distance measurement error is controlled within [specific parameters]. Within mm; as the distance to the target on the water surface increases to over 15000 mm, the absolute distance measurement error of a 20 cm short baseline is drastically amplified due to parallax attenuation. mm, at which point the system automatically and smoothly switches to the 80cm long baseline setting through the aforementioned quality feedback procedure. By forcibly increasing the parallax resolution at a large distance cross section, the maximum absolute distance measurement error at 20310 mm is effectively compressed to Within mm. These test results fully demonstrate the significant technological advancement of this invention, which, through the coordinated adjustment of baseline length using both hardware and software parameters, simultaneously ensures both a common field of view and high-precision long-distance 3D reconstruction.

[0165] Other alternative implementations of the apparatus and method described in this invention include:

[0166] (1) The electric slide rail assembly may be made of ball screw, synchronous belt, rack and pinion, linear module, slide module or other structure that can achieve linear displacement.

[0167] (2) The drive motor can be a stepper motor, servo motor, DC motor or geared motor with encoder; the two cameras move relative to each other. In other embodiments, two independent drive motors can be used to drive the left and right moving slides respectively, and synchronous control can be performed according to the position feedback on both sides; or a structure in which one camera is fixed and the other camera moves can be used.

[0168] (3) The baseline position detection module can use an encoder, grating ruler, magnetic grating ruler, Hall sensor, proximity switch, limit switch or image-assisted ranging method.

[0169] (4) The calibration parameter storage module can be located in the host computer, embedded controller, edge computing terminal, local memory or cloud database.

[0170] (5) The baseline position can be a discrete position or a number of calibrated positions can be selected within a continuously adjustable range; as long as the target baseline and the corresponding parameters have a mapping, linkage or real-time calculation relationship, they are all implementation methods of the present invention.

[0171] (6) Quality feedback indicators can include image overlap rate, number of effective matching points, disparity range, proportion of points in the point cloud, reprojection error, plane fitting residual, or a combination of multiple indicators.

[0172] (7) In terms of ranging targets and application scenarios, the present invention is not limited to shore-based water level measurement, but can also be extended to geological landslide deformation monitoring, dam safety monitoring and other long-distance industrial ranging scenarios; in addition to natural textures (such as bank slopes, bridge piers, embankments and floating objects on the water surface), the target features of its three-dimensional matching can also be artificially set visual targets, conventional water gauges, artificial buoys, or the matching features can be established by projecting active laser dot matrix and grid texture onto the surface to be measured.

[0173] The undescribed parts of this invention are the same as or can be implemented using existing technology.

Claims

1. A motorized sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring, characterized in that, include: Support platform (1) is used for rigid installation on the shore-based monitoring platform; The electric slide rail assembly (2) is rigidly fixed to the top of the support platform (1) in the lateral direction. It includes a bidirectional integrated lead screw driven by a drive motor (10), and a left moving slide and a right moving slide symmetrically sleeved on the left and right transmission pairs of the bidirectional integrated lead screw. The binocular camera assembly includes a left eye camera (3) and a right eye camera (4) which are rigidly fixed to the top of the left and right sliding slides, respectively. The baseline position detection module (5) includes a magnetic grid ruler (5-1) fixed on the slide rail, and a left reading head (5-2) and a right reading head (5-3) respectively fixed on the left and right moving slides, for real-time detection of the physical displacement components of the two slides relative to the central geometric reference. The limit protection module (6) includes an origin switch and an outer limit switch installed on the electric slide rail assembly (2); as well as The control module (7) includes a core microprocessor, a motor driver, a calibration parameter storage module and a parameter call module (9). The parameter call module (9) and the calibration parameter storage module (8) are both built into the core microprocessor. The core microprocessor is electrically connected to the left and right reading heads, the origin switch, the external limit switch, the motor driver and the left and right eyes, respectively, to control the electric slide rail assembly (2) to dynamically and adaptively switch the baseline position, and to use the synchronous images collected by the left eye camera (3) and the right eye camera (4) to perform three-dimensional reconstruction and output of the shoreline water level elevation.

2. The electrically operated sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to claim 1, characterized in that: The calibration parameter storage module pre-stores multiple discrete target baseline distances for the electric slide rail assembly (2), and each baseline distance is uniquely mapped to and bound to a set of binocular camera calibration parameters; the calibration parameter set includes at least the binocular camera intrinsic parameter matrix, distortion coefficients, and rotation matrix. and nominal translation vector When the control module (7) confirms that the two slides have reached the target baseline position, it triggers the parameter calling module (9) to access the calibration parameter storage module (8) and retrieve the corresponding calibration parameter group.

3. The electrically operated sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to claim 2, characterized in that: After retrieving the calibration parameter set of the target baseline position, the parameter calling module (9) further reads the actual physical displacement reported in real time by the left reading head (5-2) and the right reading head (5-3). and Internally, it performs dynamic fusion compensation calculation of the baseline translation vector to correct the nominal translation vector in the calibration parameter set: The position error compensation amount caused by mechanical asymmetric motion is calculated using the actual physical displacement. and the position error compensation amount The compensation is superimposed onto the nominal translation vector components in the calibration parameter set to generate the real-time corrected actual translation vector components. It is then sent to the stereo matching algorithm to eliminate the interference of mechanical transmission errors on the accuracy of three-dimensional reconstruction of water level elevation.

4. The electrically operated sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to claim 3, characterized in that: When the core microprocessor receives the target shift instruction, its internal image processing thread automatically switches to the data holding state to suspend the current three-dimensional reconstruction image refresh processing logic; during the symmetrical movement of the two sliding tables driven by the drive motor (10), the core microprocessor controls the left eye camera (3) and the right eye camera (4) to pause synchronous image acquisition; and after the position is confirmed and the parameters are called, the core microprocessor resumes the synchronous acquisition of the left eye camera (3) and the right eye camera (4) and releases the suspended state of the image processing thread to restore the real-time calculation and output of the water level elevation.

5. A motorized sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to claim 3 or 4, characterized in that: The parameter call module only allows reading and enabling the corresponding calibration parameter group after receiving a confirmation signal of being in position. When the position error of any moving slide exceeds the allowable range, or the symmetry error of the left and right moving slides exceeds the allowable range, the control module determines the position, performs overall fine-tuning, or issues an abnormal alarm through the following combined strategy: The core microprocessor first calculates the current overall mechanical baseline deviation, as well as the bilateral motion symmetry residuals. Fully in position: When the overall mechanical baseline deviation is less than the allowable error, and the symmetry residual is less than the symmetry error, and this state is continuously met within the preset stable time, it is determined that both slides have accurately reached the target gear position; the control module controls the drive motor to stop and lock, and at the same time sends a position confirmation signal to the outside through the communication interface, triggering the system to call the camera intrinsic and extrinsic parameter calibration parameters linked to this gear position; Overall fine-tuning and mechanical backlash elimination: If the overall mechanical baseline deviation is greater than the allowable error, but the symmetry residual is less than or equal to the symmetry error, it indicates that the movement pace on both sides is synchronized, but the whole has not yet moved to the position. The control module controls the drive motor to continue to approach the target position with preset low-speed fine-tuning pulses. If reverse movement occurs during the control process, the control module executes backlash elimination logic to eliminate the return error between the lead screw and the lead screw nut. Asymmetric anomaly alarm: If the symmetry residual is greater than the symmetry error, the control module determines that there is an asymmetric fault in the current system; the core microprocessor immediately cuts off the enable signal of the drive motor and locks the motor, prohibits the system from enabling the linkage parameters of this gear, and outputs specific fault code information to the user terminal through the external communication interface to protect the mechanical structure from being twisted.

6. The electrically operated sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to claim 5, characterized in that: The backlash elimination logic is as follows: the control drive motor first overtravels and reverses to drive a preset number of pulses, and then reverses to the same direction and presses against the lead screw transmission surface, thereby eliminating overshoot or undershoot errors caused by the dead zone of mechanical transmission through unidirectional pressing.

7. The electrically operated sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to claim 3, characterized in that: The core microprocessor also runs a baseline level decision program based on image quality feedback; the decision program calculates the maximum disparity value within the stereo matching feature region. and minimum disparity value and compare it with the preset optimal high-precision parallax range. , Real-time comparison: When detected When the control module (7) is triggered, it executes a control command to switch to a longer baseline gear; when it detects When the control module (7) is triggered, it executes a control command to switch to a shorter baseline gear.

8. The electrically operated sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to claim 7, characterized in that: The baseline gear decision algorithm also includes a spatiotemporal dual hysteresis shifting anti-oscillation unit; only when the maximum or minimum parallax value exceeds the judgment boundary and exceeds the preset pixel hysteresis tolerance band, and the state is continuously and stably maintained for more than the preset time-limited switching delay threshold in the time dimension, is it allowed to issue a shifting control command to the control module (7).

9. The electrically operated sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to claim 7, characterized in that: The parameter call module runs a quality feedback evaluation program that evaluates the measurement quality at the current baseline level in real time using the following three quantitative indicators: Effective match rate : Defined as the proportion of the number of pixels that successfully matched stereo and output a valid disparity value to the total number of pixels in the preset water surface reference area ROI; Average matching confidence : Use uniqueness constraint checks and left-right consistency checks to eliminate mismatched points, and average the cost residuals of the remaining valid matching points; Disparity histogram distribution interval: Statistically calculates all valid disparity values ​​within the ROI region. The distribution of the maximum disparity is extracted. and minimum disparity .

10. A measurement method based on an electrically operated sliding rail type adjustable baseline binocular vision device for shore-based water level monitoring according to any one of claims 1-9, characterized in that: Includes the following steps: Step S1: Observation distance estimation and initial input; After the device is started, it first obtains the approximate observation distance or first frame image quality information of the current water surface area to be measured through on-site manual interaction input, external equipment estimation, or preliminary image processing algorithms, and uses it as the initial reference for baseline selection. Step S2: Determine the target baseline level; the core microprocessor matches and determines the optimal target baseline level in the current state from the preset mapping table based on the observation distance or image quality obtained in step S1. Step S3: Drive control and mechanical slide rail reset; The control module (7) sends the corresponding power pulse and direction command to the motor driver to control the drive motor (10) to deflect and drive the two sides of the electric slide rail assembly (2) to move symmetrically until they approach the theoretical physical position corresponding to the target baseline position. Step S4: Baseline position detection and positioning confirmation; During the movement of the slide table, the left reading head (5-2) and the right reading head (5-3) scan the magnetic scale (5-1) in real time and report the physical displacement; The core microprocessor performs closed-loop judgment on the reported data to confirm that the position deviation of the two slide tables and the symmetrical residual are within the preset tolerance zone, thereby completing the high-precision positioning confirmation. Step S5: Dynamic linkage call of dedicated calibration parameter group; Under the dynamic linkage constraint of "only after the baseline position is detected is the corresponding calibration parameter allowed to be called; alarm or readjustment when not in place", the parameter call module (9) accesses the calibration parameter storage module (8) in a directional manner, indexes and reads the corresponding dedicated static calibration parameter group according to the current gear number, and uses the physical displacement amount fed back by the magnetic scale in real time to perform online error compensation correction on the translation vector component; Step S6: Image distortion removal and epipolar correction; The core microprocessor restores the synchronous high-frequency acquisition of the left eye camera (3) and the right eye camera (4), and uses the parameter group called and corrected in step S5 to perform geometric correction processing to remove lens distortion and make the epipolar lines parallel on the original left and right images. Step S7: Stereo matching and disparity calculation; The system inputs the corrected dual images into the stereo matching algorithm, searches for corresponding feature points between the left and right rows of pixels, and calculates the dense, high-precision horizontal coordinate difference between corresponding left and right pixels, i.e., the disparity map; Step S8: 3D reconstruction; using the updated 3D reprojection matrix Q, the pixel disparity map calculated in step S7 is converted into spatial 3D coordinates to obtain high-precision spatial 3D point cloud data representing the feature areas of the water surface, bank slope or visual target to be measured. Step S9: Comprehensive feedback evaluation of reconstruction quality; the system extracts and statistically analyzes multi-dimensional quality indicators from the reconstructed point cloud and the matched image, specifically including calculating the image overlap rate, the number of effective matching points, and the maximum disparity. and minimum disparity And reconstruction residual indicators; Step S10: Quality threshold convergence and closed-loop determination; the system determines whether the quality feedback index obtained in step S9 fully meets the preset high-precision quality threshold. If the following conditions are met: it indicates that the current baseline position is in the optimal ranging range, the system directly enters step S11, performs time-domain filtered water level elevation inversion calculation, and outputs the final water level elevation result to the flood control monitoring terminal in real time, completing a single closed-loop measurement. If the condition is not met, it indicates that the parallax attenuation at long distances or the overlap rate at close distances is insufficient. The system will automatically trigger the closed-loop control mechanism of "re-selecting or recommending adjustment of the baseline gear", and feed back the recommended target gear shifting command to step S2. The drive motor controls the slide rail to shift gears again until the quality indicators converge.