Pure machine vision ranging method and system
By employing a pure machine vision ranging method with dual-view multi-overall pitch angle calibration and consistency matching, the error problem of monocular vision in complex terrain is solved, achieving high-precision, low-cost, and low-computation real-time ranging, which is suitable for mobile platforms such as automobiles and robots.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 长沙银汉空间科技有限公司
- Filing Date
- 2026-02-27
- Publication Date
- 2026-04-24
AI Technical Summary
Existing monocular vision ranging methods have large errors in complex 3D terrain, rely on the planar assumption, cannot adapt to terrain changes, and require accurate camera intrinsic parameters and target prior size, which limits mass production applications.
A dual-view, multi-overall pitch angle calibration and consistency matching method is adopted. Calibration images are simultaneously acquired at different pitch angles using concentric arc markers, and a pixel-distance mapping relationship library is established. During real-time ranging, the pitch angles are traversed to select the optimal overall pitch angle to fuse the distance results, thus adapting to complex terrain.
It achieves real-time ranging with high precision, low cost, and low computational load, adapting to complex scenarios such as uphill, downhill, and uneven road surfaces. It requires no active sensors and complex calibration, making it suitable for mobile platforms.
Smart Images

Figure CN121916786A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental perception technology, and more specifically, to a pure machine vision ranging method and system applicable to mobile platforms such as automobiles, robots, and robot dogs. Background Technology
[0002] In fields such as autonomous driving and robot navigation, accurate distance measurement of obstacles ahead is a core requirement. Existing technologies include LiDAR, millimeter-wave radar, binocular vision, and monocular vision. LiDAR and millimeter-wave radar offer high accuracy but are expensive; binocular vision provides depth information but is complex to calibrate and computationally intensive; monocular vision is low-cost, but traditional solutions rely on planar assumptions, resulting in significant errors in complex 3D terrain. Furthermore, existing methods typically require precise camera intrinsic parameters and prior target dimensions, limiting mass production applications.
[0003] The inventors recognized that in the real three-dimensional world, the contact point between the target and the ground is often not on the tangential plane of the carrier's bottom. This height difference is determined by both the local terrain undulations at the carrier's location and the terrain undulations between the carrier and the target. For example, when the carrier is traveling on a flat road and the target is on an uphill section, the target contact point is higher than the carrier's tangential plane; similarly, when the carrier is traveling on the bottom of a concave road surface and the target is on an uphill section ahead, the target contact point may also be higher than the carrier's tangential plane; conversely, when the carrier is on a flat road surface and the target is on a downhill section, or when the carrier is on the top of a convex road surface and the target is on a downhill section ahead, the target contact point is lower than the carrier's tangential plane. Traditional monocular vision ranging methods based on single-plane calibration cannot adapt to such complex terrain, leading to significant errors. Therefore, a pure machine vision ranging scheme that can adapt to terrain changes, is computationally efficient, and requires no active sensors is needed. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a pure machine vision ranging method and system. Through dual-view multi-overall pitch angle calibration and consistency matching, it can adapt to complex three-dimensional terrain and achieve high-precision, low-cost, and low-computation real-time ranging.
[0005] The core concept of this invention lies in utilizing the equidistant property of concentric arc markings to simultaneously acquire calibration image pairs at different overall pitch angles, while maintaining a constant relative pitch angle difference between the two cameras. This establishes a pixel-distance mapping pair library corresponding one-to-one with the overall pitch angle. During actual ranging, the two cameras are fixedly mounted on a carrier with the same relative pitch angle difference, simultaneously acquiring images. All preset overall pitch angles are traversed, and the target distance is calculated at each overall pitch angle using the corresponding mapping pair, resulting in a pair of candidate distances. The optimal overall pitch angle is selected based on the consistency (e.g., the magnitude of the difference) of these two distances, where the virtual plane corresponding to this overall pitch angle is closest to the actual terrain plane where the target is located. The two distances at this overall pitch angle are then fused (e.g., averaged) as the final ranging result. This method requires no geometric calculations; terrain adaptation is achieved solely through table lookup and comparison, and no active sensors are needed.
[0006] It is important to note that in this invention, the first and second cameras must have a non-zero relative pitch angle difference. The physical principle is as follows: if the two cameras have the same pitch angle, then for any overall pitch angle θ, the distance maps obtained by the two cameras from the mapping database have the same geometric characteristics. This results in the first and second candidate distances calculated for the same target always being equal, with a constant difference of zero. Therefore, it is impossible to distinguish different overall pitch angles based on consistency, and thus impossible to determine the actual terrain plane where the target is located. Only when the two cameras have different pitch angles will the difference between candidate distances under different overall pitch angles exhibit a unique minimum value, enabling this method to achieve terrain-adaptive ranging.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A pure machine vision ranging method, comprising a calibration stage and a ranging stage.
[0009] Calibration Phase: Multiple concentric circular arc markers are pre-set on a flat surface. Each marker has a center point (e.g., the projection of the carrier's front axle center onto the ground) and a radius equal to the known actual distance. The first and second cameras are mounted on a support with a synchronously adjustable pitch angle, with a fixed non-zero relative pitch angle difference (e.g., the first camera's pitch angle is 10° higher than the second camera's). Calibration image pairs are simultaneously acquired at multiple preset overall pitch angles (e.g., from -45° to 45°, in 1° increments): at each overall pitch angle θ, both cameras simultaneously capture one frame, resulting in a pair of calibration images (I1_θ, I2_θ). The overall pitch angle θ corresponding to each pair of images is recorded. For each frame of calibration image, the centerline of the circular arc markers is extracted, and the coordinates of each pixel on the centerline and its corresponding distance value are recorded. A distance map (pixel-distance mapping table) at that overall pitch angle is generated using interpolation. Associate two distance maps (D1_θ, D2_θ) under the same overall pitch angle θ, store them together with θ in memory, and build a mapping relationship library.
[0010] Ranging Phase: The first and second cameras are rigidly fixed to the carrier with a fixed non-zero relative pitch angle difference (e.g., actual pitch angles of +5° and -5°, with a relative difference of 10°), and the image pairs (I1, I2) to be measured are acquired in real time. The target objects in the images are detected, and their contour edge pixel sets P1 and P2 are extracted. All preset overall pitch angles θ are traversed. For each θ, the corresponding first distance map D1_θ and second distance map D2_θ are retrieved from the mapping library. The minimum distance between pixels in P1 and P2 is queried to obtain the first candidate distance d1(θ) and the second candidate distance d2(θ). The absolute value of the difference between d1(θ) and d2(θ) is calculated. After traversal, the overall pitch angle θ with the smallest absolute difference is selected as the target overall pitch angle, and the average value of the corresponding d1(θ) and d2(θ) is output as the final ranging result.
[0011] Preferably, the preset overall pitch angle ranges from -45° to 45°, with a step size of 1°, for a total of 91 angles.
[0012] Preferably, the fixed non-zero relative pitch angle difference is any fixed value between 5° and 20°.
[0013] Preferably, the concentric arc markings have a ring width of 0.1 meters to 2 meters and use high-contrast colors.
[0014] Preferably, the target object contour extraction is achieved through edge detection or deep learning semantic segmentation.
[0015] The present invention also provides a pure machine vision ranging system, including an image acquisition module, a storage module, a target perception module and a distance calculation module, the specific structure of which is described in claim 10.
[0016] Compared with the prior art, the present invention has the following beneficial effects:
[0017] 1. Adaptable to complex terrain: Through multi-overall pitch angle calibration and consistency matching, no planar assumption is required. It can handle real-world scenarios such as uphill, downhill, and uneven road surfaces. Furthermore, different targets in the same image can independently match their respective optimal overall pitch angles.
[0018] 2. High precision and robustness: By finding the overall pitch angle that makes the dual-view ranging results most consistent, the error caused by terrain changes is effectively suppressed, and the accuracy is further improved after fusion.
[0019] 3. Pure machine vision: No active sensors such as LiDAR or millimeter-wave radar are required, resulting in extremely low hardware costs.
[0020] 4. Extremely simple calibration: No need for camera intrinsic and extrinsic parameter calibration, just lay out markers and acquire images.
[0021] 5. Low computational load: The ranging process only involves table lookup and comparison, making it suitable for embedded real-time operation.
[0022] 6. Does not rely on prior knowledge of the target: Directly measures the distance to the nearest point of the target, which meets the requirements for collision avoidance. Attached Figure Description
[0023] Figure 1 is a schematic diagram of concentric arc markings in an embodiment of the present invention.
[0024] Figure 2 is a schematic diagram of multiple overall pitch angles during the ranging stage in an embodiment of the present invention.
[0025] Figure 3 is a block diagram of the ranging system in an embodiment of the present invention.
[0026] Figure 4 is a flowchart of real-time ranging in an embodiment of the present invention. Detailed Implementation
[0027] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0028] Example 1: Calibration Process
[0029] As shown in Figure 1, on a flat calibration field, concentric semicircular rings (or other arcs) with radii of 1m, 2m, 3m, 5m, 8m, 10m, 15m, 20m, 30m, and 50m are drawn with a preset reference point O (e.g., the center of the front axle of a car) as the center. The rings are 0.2m wide, painted white, and their openings face point O. The first and second cameras are mounted on a bracket with synchronously adjustable pitch angles. The two cameras maintain a fixed relative pitch angle difference; for example, the pitch angle of the first camera is 10° higher than that of the second camera (i.e., first camera = θ + 5°, second camera = θ - 5°, relative difference 10°). During calibration, the bracket is tilted to change the reference angle θ of the two cameras from -45° to 45° in 1° increments. A calibration image pair is synchronously acquired at each θ, resulting in 91 pairs of calibration images, denoted as (I1_θ, I2_θ). The overall pitch angle θ corresponding to each pair of images is recorded.
[0030] For each frame of the calibration image, edge detection is used to extract the center line of the semicircular ring, and the coordinates (u,v) of each pixel on the center line and its corresponding known distance D are obtained to form known point pairs. Radial basis function interpolation is used to generate a distance map of the same size as the image, and the pixel values are stored in centimeters as the mapping relationship under the overall pitch angle. The two distance maps (D1_θ, D2_θ) under the same overall pitch angle θ are associated and stored together with θ in memory to form a mapping relationship pair library.
[0031] Example 2: Real-time Distance Measurement
[0032] As shown in Figure 2, the first and second cameras are rigidly fixed to the car with the same fixed relative pitch angle difference (10°). It is assumed that the actual pitch angle of the first camera is +5° and that of the second camera is -5° (i.e., a reference angle of 0°). During the car's movement, the two cameras acquire images of the front (I1 and I2) in real time at 30fps. Semantic segmentation is performed on I1 and I2 respectively to detect targets (such as object A) and extract their contour edge pixel sets P1 and P2. The minimum difference is initialized to infinity, and the optimal distance pair is empty.
[0033] Iterate through all preset overall pitch angles θ (-45° to 45°, in 1° increments): Read the first distance map D1_θ and the second distance map D2_θ corresponding to the overall pitch angle θ from the mapping relationship library; For each pixel in P1, query the distance value in D1_θ and take the minimum value d1(θ); For each pixel in P2, look up the distance value in D2_θ and take the minimum value d2(θ); Calculate diff(θ) = |d1(θ) - d2(θ)|; If diff(θ) < min_diff, then update min_diff = diff(θ) and record the optimal distance pair (d1,d2) = (d1(θ), d2(θ)).
[0034] After the traversal is complete, calculate d_final = (d1 + d2) / 2 as the final distance and output it to the obstacle avoidance module.
[0035] In this embodiment, if the target is located on a flat surface (such as object A), then d1(θ) and d2(θ) should be closest when θ is near 0°; if the target is located on an uphill section (such as object B, where the target contact point is higher than the carrier's tangent plane), then the optimal θ will be smaller (e.g., -10°) to make the two distances most consistent; if the target is located on a downhill section (i.e., the target contact point is lower than the carrier's tangent plane), then the optimal θ will be larger (e.g., +10°). This method can be applied independently to each target in the image, and different targets may correspond to different optimal θs, thus truly reflecting the complexity of the three-dimensional world. The specific ranging process is shown in Figure 4.
[0036] Example 3: System Structure
[0037] As shown in Figure 3, the system includes:
[0038] Image acquisition module 101: includes a first camera and a second camera, both of which are rigidly fixed to the carrier with a fixed non-zero relative pitch angle difference, and are connected to storage module 102 and target perception module 103.
[0039] Storage module 102: Used to store the multi-integral pitch angle mapping relationship library generated during the calibration phase.
[0040] Target perception module 103: processes images in real time and outputs target contour pixels.
[0041] Distance calculation module 104: Iterates through the preset overall pitch angle, obtains the corresponding distance map pair from the calibration module, calculates the candidate distance and difference under each θ, selects the optimal distance pair and takes the average value, and outputs it to the decision control unit 105.
[0042] Example 4: Multi-objective processing
[0043] For multiple targets in the same frame, the steps in Example 2 can be repeated to independently calculate the optimal θ and final distance for each target. Since different targets may be located in different terrains (e.g., pedestrians on a flat road and vehicles on a slope), independent optimization ensures the ranging accuracy of each target, which is impossible with traditional single-plane methods.
[0044] Example 5: Verification of Physical Principles
[0045] To verify the core principle that the two cameras must have different pitch angles, a comparative experiment can be conducted: Set both cameras to the same pitch angle (relative difference of 0°) and repeat the calibration and ranging procedures described above. The experimental results will show that for any target on any terrain, |d1(θ)-d2(θ)| at all overall pitch angles is close to 0, failing to form a unique minimum value, thus making it impossible to determine the target's plane. This comparative experiment further demonstrates that a non-zero relative pitch angle difference is a necessary technical feature for realizing this invention.
[0046] Further explanation regarding the target spatial location
[0047] It is important to emphasize that the target's vertical coordinate position in the image depends on the height difference Δh between the target's contact point and the tangent plane of the carrier's current location. When Δh > 0, the target is above the horizon in the image; when Δh < 0, the target is below the horizon. The sign and magnitude of Δh are jointly determined by the terrain undulations at the carrier's location, the terrain undulations at the target's location, and the terrain contour between the two. The method of this invention does not rely on prior judgments of Δh, but automatically matches the actual terrain by traversing virtual pitch angles and utilizing dual-view consistency, thus it is applicable to all scenarios where Δh is positive, negative, or zero.
[0048] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A pure machine vision ranging method, characterized in that, include: Calibration phase: Pre-mark multiple concentric arcs on a flat surface; The concentric arc mark is centered on the projection point of the preset reference point on the ground, and its radius is the known actual distance value corresponding to the mark. The first and second cameras are mounted on a bracket with a fixed non-zero relative pitch angle difference on a synchronously adjustable bracket. Under multiple preset overall pitch angles, calibration image pairs containing the concentric arc marks are acquired simultaneously to obtain calibration image pairs corresponding to each preset overall pitch angle; For each frame of calibration image, based on the geometric characteristics of the concentric arc mark, a mapping relationship between the pixel coordinates in the image and the actual physical distance is established; the two mapping relationships corresponding to the two frames of calibration images under the same overall pitch angle are associated to form a mapping relationship pair corresponding to the overall pitch angle, and a mapping relationship pair library corresponding one-to-one with each preset overall pitch angle is constructed. Distance measurement phase: The first and second cameras are fixedly mounted on the carrier with the fixed non-zero relative pitch angle difference, and the images of the target image pair are acquired in real time. Detect the target object in the first image to be tested and the second image to be tested respectively, and determine at least one target pixel point of the target object in each image; The multiple preset overall pitch angles are traversed. For each overall pitch angle, the corresponding first mapping relationship and second mapping relationship are obtained from the mapping relationship pair library according to the overall pitch angle. Based on the first mapping relationship, the first candidate distance corresponding to the target pixel in the first image to be tested is determined. Based on the second mapping relationship, the second candidate distance corresponding to the target pixel in the second image to be tested is determined. Based on the consistency between the first candidate distance and the second candidate distance, a target overall pitch angle is selected from the plurality of preset overall pitch angles; The distance between the target and the carrier is determined based on the first candidate distance and the second candidate distance corresponding to the overall pitch angle of the target.
2. The method according to claim 1, characterized in that, The step of selecting the overall pitch angle of the target based on the consistency between the first candidate distance and the second candidate distance includes: calculating the absolute value of the difference between the first candidate distance and the second candidate distance at each overall pitch angle, and selecting the overall pitch angle with the smallest absolute value of the difference as the overall pitch angle of the target.
3. The method according to claim 2, characterized in that, Determining the distance between the target and the carrier based on the first candidate distance and the second candidate distance corresponding to the overall pitch angle of the target includes: taking the average of the first candidate distance and the second candidate distance corresponding to the overall pitch angle of the target as the final distance.
4. The method according to claim 1, characterized in that, The preset overall pitch angle ranges from -45 degrees to 45 degrees, with a step size of 1 degree.
5. The method according to claim 1, characterized in that, The establishment of the mapping relationship further includes: extracting the center line of each concentric arc mark in the calibration image, recording the image coordinates of each pixel on the center line and its corresponding known actual distance value, and using an interpolation algorithm to calculate the actual physical distance corresponding to other pixels in the calibration image at the overall pitch angle based on the multiple pixels distributed on the center line, and generating a distance mapping map or pixel-distance lookup table that corresponds one-to-one with the image pixels.
6. The method according to claim 5, characterized in that, The pixels on the center line are distributed at different horizontal positions in the image, providing dense sampling covering the horizontal range of the image for the same known actual distance value; the dense sampling enables automatic correction of image geometric distortion caused by lens distortion or camera mounting deviation during the interpolation process.
7. The method according to claim 1, characterized in that, Determining at least one target pixel in the image of the target object includes: extracting the contour edge of the target object, and taking all pixels constituting the contour edge as the target pixel; the first candidate distance and the second candidate distance are the minimum values of the distances between all pixels of the corresponding contour edge.
8. The method according to claim 1, characterized in that, The preset reference point is the center of the front axle of the carrier.
9. The method according to claim 1, characterized in that, The carrier is a car, a robot, or a robot dog.
10. A pure machine vision ranging system for implementing the method of any one of claims 1 to 9, characterized in that, include: The image acquisition module includes a first camera and a second camera, which are rigidly fixed to the carrier with a fixed non-zero relative pitch angle difference, and are used to acquire the image pairs to be tested in real time. The storage module is used to store a pre-established mapping relationship library that corresponds one-to-one with each preset overall pitch angle and the actual physical distance; the mapping relationship library is obtained by processing calibration image pairs containing concentric arc marks during the calibration stage; The target perception module is connected to the image acquisition module and is used to process real-time image pairs to be tested, detect target objects in the first image and the second image to be tested respectively, and output at least one target pixel of the target object in each image; The distance calculation module, connected to the target perception module and the storage module, is used to traverse the multiple preset overall pitch angles, obtain the corresponding first mapping relationship and second mapping relationship from the mapping relationship pair library for each overall pitch angle, calculate the first candidate distance and the second candidate distance, select the target overall pitch angle based on the consistency of the two, and determine and output the final ranging result based on the first candidate distance and the second candidate distance corresponding to the target overall pitch angle.