High-precision binocular vision distance measurement method

Through the method of combining multi-scale pyramid and convolutional neural network, combined with multiple compensation technology, the problem of inaccurate disparity estimation and poor robustness of binocular visual ranging in complex scenes is solved, and high-precision and efficient binocular Visual odometry.

CN118485702BActive Publication Date: 2024-09-20CHENGDU ZHONGGUI RAILEQUIPMENT CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410926167.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-09-20
Estimated Expiration
2044-07-11

AI Technical Summary

Technical Problem

Existing binocular visual ranging technology suffers from inaccurate disparity estimation and poor robustness when dealing with complex scenes, especially when there are few textures or large illumination changes, and the high computational complexity makes it difficult to meet the needs of real-time applications.

Method used

Using a method that combines multi-scale pyramid technology and multi-layer convolutional neural network (CNN), preliminary disparity estimation is carried out through image enhancement, multi-scale pyramid construction and convolutional neural network feature extraction, and combined with structured light, filters, temperature and vibration compensation to improve the accuracy and stability of disparity estimation.

Benefits of technology

It significantly improves the accuracy and robustness of binocular visual ranging in complex environments, reduces the amount of calculation, enhances the accuracy of feature extraction and the stability of disparity estimation, and meets the needs of real-time applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118485702B
    Figure CN118485702B
Patent Text Reader

Abstract

The present invention belongs to the field of image processing technology, and specifically relates to a high-precision binocular vision ranging method. The method comprises: step 1: using a binocular vision image acquisition device to acquire a left view image and a right view image of a target; step 2: constructing multi-scale pyramids corresponding to an enhanced right view image and an enhanced left view image respectively, and obtaining corresponding multi-scale pyramid images; step 3: based on a left image feature map and a right image feature map, performing preliminary disparity estimation at the lowest resolution layer, and obtaining a disparity map; step 4: sequentially performing structured light compensation, filter compensation, temperature compensation and vibration compensation on the disparity map, and obtaining a compensated disparity map; step 5: based on the compensated disparity map, calculating the distance from the binocular vision image acquisition device to the target. A high-precision and robust binocular vision ranging method is proposed, which significantly improves the ranging capability and adaptability of the system in complex environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to a high-precision binocular vision ranging method. Background Art

[0002] Binocular vision ranging technology has become an important research direction in the field of computer vision and has been widely used in many application fields such as autonomous driving, robot navigation, and 3D reconstruction. The binocular vision ranging system simulates the parallax principle of human eyes, uses two cameras to simultaneously capture images of the same scene, and calculates the depth information of each point in the scene by analyzing the parallax of corresponding points in the image. This method has the advantages of non-contact, strong real-time performance, and high measurement accuracy. However, the existing binocular vision ranging technology still faces many challenges and problems in practical applications, which need further research and improvement.

[0003] At present, the research on binocular visual ranging technology mainly focuses on disparity estimation, feature extraction, image enhancement and multiple compensation. The existing technologies mainly include the following methods: Traditional binocular visual ranging methods mainly rely on the matching of feature points, such as feature extraction algorithms such as SIFT, SURF, and ORB. These algorithms calculate disparity by extracting significant feature points in the image and matching them in the left and right images. However, these methods often have matching errors when dealing with scenes with less texture or more repeated textures, resulting in inaccurate disparity estimation. In addition, these methods are sensitive to illumination changes and noise, and have poor robustness in practical applications. The block matching method searches for a fixed-size window in the left and right images to find the window pair with the highest similarity and calculate the disparity between them. This method is simple and intuitive, with a small amount of calculation, but it is easily affected by noise and occlusion when dealing with complex scenes, resulting in a decrease in the accuracy of disparity estimation. Common block matching algorithms include SSD (Sum of Squared Differences) and SAD (Sum of Absolute Differences). In recent years, optimization-based methods have gradually become the mainstream of disparity estimation. These methods construct energy functions to represent the cost of disparity estimation, and use global optimization techniques to find the disparity distribution with the minimum energy. Common optimization methods include GraphCuts, Belief Propagation, and Semi-Global Matching. These methods can improve the accuracy and robustness of disparity estimation to a certain extent, but the computational complexity is high and it is difficult to meet the needs of real-time applications. With the development of deep learning technology, disparity estimation methods based on convolutional neural networks (CNN) have gradually emerged. These methods can automatically learn high-level features in images through large-scale data training and achieve high-precision disparity estimation. Common deep learning models include DispNet, GC-Net, PSMNet, etc. These methods perform well in dealing with complex scenes and lighting changes, but have high requirements for computing resources and training data. Summary of the invention

[0004] In view of this, the main purpose of the present invention is to provide a high-precision binocular vision ranging method, and proposes a high-precision and robust binocular vision ranging method, which significantly improves the ranging capability and adaptability of the system in complex environments.

[0005] The technical solution adopted by the present invention is as follows: a high-precision binocular vision ranging method, the method comprising:

[0006] Step 1: Use a binocular vision image acquisition device to acquire a left view image and a right view image of the target; perform image enhancement on the left view image and the right view image to obtain an enhanced right view image and an enhanced left view image;

[0007] Step 2: construct multi-scale pyramids corresponding to the enhanced right view image and the enhanced left view image respectively to obtain corresponding multi-scale pyramid images; based on the multi-scale pyramid images, use a multi-layer convolutional network to extract features to obtain a left image feature map and a right image feature map;

[0008] Step 3: Based on the left image feature map and the right image feature map, perform preliminary disparity estimation at the lowest resolution layer to obtain a disparity map;

[0009] Step 4: Perform structured light compensation, filter compensation, temperature compensation and vibration compensation on the disparity map in sequence to obtain a compensated disparity map;

[0010] Step 5: Based on the compensated disparity map, calculate the distance from the binocular vision image acquisition device to the target.

[0011] Furthermore, let the left view image be And the right view image is ; Use the following formula to enhance the left view image and the right view image to obtain an enhanced right view image and an enhanced left view image:

[0012] ;

[0013] in, To enhance the left view image; To enhance the right view image; Represents the pixel coordinate position, is the X-axis coordinate, is the Y-axis coordinate; is the preset enhancement factor; is the pixel mean of the left view image; is the pixel mean of the right view image; is the pixel standard deviation of the left view image; is the pixel standard deviation of the right view image.

[0014] Furthermore, the number of layers of the multi-scale pyramid in step 2 ranges from 4 to 8; the multi-scale pyramid is a phase-consistency multi-scale pyramid, and the number of directions in each layer ranges from 2 to 6.

[0015] Furthermore, the multi-scale pyramid image corresponding to the left view image is enhanced Calculated using the following formula:

[0016] ;

[0017] in, To enhance the left view image corresponding to the Multi-scale pyramid images of layers; To enhance the left view image corresponding to the Layer Amplitude pyramid images in directions, To enhance the left view image corresponding to the Layer Amplitude pyramid images in directions; To enhance the left view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a cosine operation is performed on each pixel; To enhance the left view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a sine operation is performed on each pixel; It means that the image is regarded as a matrix and then its determinant is calculated;

[0018] Enhanced multi-scale pyramid image corresponding to the right view image Calculated using the following formula:

[0019] ;

[0020] in, To enhance the right view image corresponding to the Multi-scale pyramid images of layers; To enhance the right view image corresponding to the Layer Amplitude pyramid images in directions, To enhance the right view image corresponding to the Layer Amplitude pyramid images in directions; To enhance the right view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a cosine operation is performed on each pixel; To enhance the right view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a sine operation is performed on each pixel.

[0021] Further, suppose the enhanced left view image is The phase pyramid image of the layer is , calculated using the following formula:

[0022] ;

[0023] in, To enhance the left view image The phase gradient of the layer in the Y-axis direction; To enhance the left view image The phase gradient of the layer in the X-axis direction; is the modulo operation; To enhance the left view image Phase image of the layer;

[0024] Assume that the enhanced right view image is The phase pyramid image of the layer is , calculated using the following formula:

[0025] ;

[0026] in, To enhance the right view image, The phase gradient of the layer in the Y-axis direction; To enhance the right view image, The phase gradient of the layer in the X-axis direction; is the modulo operation; To enhance the right view image, Phase image of the layer; is scalar addition.

[0027] Further, suppose the enhanced left view image is The phase pyramid image of the layer is , calculated using the following formula:

[0028] ;

[0029] in, Represents a downsampling operation; is the Gaussian kernel; is convolution; To enhance the left view image Amplitude image of the layer; To enhance the left view image The amplitude gradient of the layer in the Y-axis direction; To enhance the left view image The amplitude gradient of the layer in the X-axis direction; suppose the enhanced right view image is in the The phase pyramid image of the layer is , calculated using the following formula:

[0030] ;

[0031] in, To enhance the right view image, Amplitude image of the layer; To enhance the right view image, The amplitude gradient of the layer in the Y-axis direction; To enhance the right view image, The amplitude gradient of the layer in the X-axis direction.

[0032] Furthermore, based on the multi-scale pyramid image, a multi-layer convolutional network is used to extract features and obtain the first The left image feature map of the layer is , No. The right image feature map of the layer is ; In step 3, use the following formula to perform preliminary disparity estimation at the lowest resolution layer to obtain the disparity map :

[0033] ;

[0034] in, is the disparity value, which indicates the displacement difference between the left image feature map and the right image feature map at the same pixel position; is the window size, which represents the local neighborhood used to calculate the difference during the disparity estimation process, defining the range of pixels considered around each pixel; is the lowest resolution layer, indicating the lowest resolution layer of the multi-scale pyramid; is the preset weight coefficient; For the The left image feature map of the layer; For the The right image feature map of the layer.

[0035] Furthermore, in step 4, scalar addition operations are performed on the disparity map respectively by using preset structured light compensation values, filter compensation values, temperature compensation values ​​and vibration compensation values, so as to perform structured light compensation, filter compensation, temperature compensation and vibration compensation on the disparity map in sequence and obtain a compensated disparity map.

[0036] Furthermore, in step 5, based on the compensated disparity map, the disparity value is obtained as , and then use the following formula to calculate the distance from the binocular vision image acquisition device to the target :

[0037] ;

[0038] in, The focal length of the device for binocular vision image acquisition; Get the baseline distance between the two cameras in the device for binocular vision images.

[0039] By adopting the above technical scheme, the present invention produces the following beneficial effects: the present invention uses multi-scale pyramid technology to decompose the image into multiple layers of different resolutions, so that the global information and local details of the image can be effectively captured and processed. The multi-scale pyramid technology generates a series of image layers with different resolutions by downsampling layer by layer, and can analyze and process image information at different scales. Combined with a multi-layer convolutional neural network (CNN), the present invention can extract rich feature information from these multi-scale pyramid images, including advanced features such as edges, textures, and shapes. The advantage of this combined method is that the convolutional neural network can automatically learn and extract complex features in the image through layer-by-layer convolution and pooling operations, making the feature extraction process more accurate and robust. The multi-scale pyramid provides a multi-level image representation, so that the system can take into account information of different scales and resolutions when processing complex scenes, thereby improving the effect of feature extraction and the accuracy of disparity estimation. In the disparity estimation process, the present invention uses the feature map extracted by the convolutional neural network for matching, and adopts a method of performing preliminary disparity estimation at the lowest resolution layer. This method can significantly reduce the amount of calculation and improve computational efficiency. At the same time, it utilizes the global structural information of low-resolution images to reduce the interference of detail noise, making the initial disparity estimation more stable and robust. Specifically, by performing disparity estimation at the lowest resolution layer, the system can quickly obtain a preliminary disparity map, providing good initial conditions for the subsequent refinement of the high-resolution layer. During the disparity estimation process, the matching cost function between feature maps is used, combined with the absolute difference and weighted square difference to ensure that the calculation of the disparity value is more accurate and reliable. This process makes full use of the features extracted by multi-scale analysis and deep learning, significantly improving the accuracy and stability of disparity estimation. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of a method flow of a high-precision binocular vision ranging method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] All features disclosed in this specification, or steps in all methods or processes disclosed, except mutually exclusive features and / or steps, can be combined in any manner.

[0042] Any feature disclosed in this specification (including any additional claims and abstract), unless otherwise stated, may be replaced by other alternative features that are equivalent or have similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

[0043] Example 1: Reference Figure 1 , a high-precision binocular vision ranging method, the method comprising:

[0044] Step 1: Use a binocular vision image acquisition device to acquire a left view image and a right view image of the target; perform image enhancement on the left view image and the right view image to obtain an enhanced right view image and an enhanced left view image;

[0045] Binocular vision image acquisition equipment usually consists of two cameras placed side by side. By simultaneously shooting the left and right images of the same target, it can simulate the visual effect of human eyes and thus obtain three-dimensional information. After obtaining the left and right images, image enhancement processing is performed to improve the contrast, clarity and detail performance of the image, so that the feature extraction and matching in the subsequent steps are more accurate. Image enhancement processing can be achieved through a variety of methods, including but not limited to histogram equalization, Laplace operator enhancement and Gamma correction. Histogram equalization adjusts the grayscale distribution of the image to enhance the contrast of the image and make the details more prominent; Laplace operator enhancement strengthens the edge of the image through the edge detection operator to make the structural information in the image more obvious; Gamma correction adjusts the brightness of the image to make the dark details clearer and the bright parts not overexposed. Through these image enhancement technologies, the quality of the image can be effectively improved, making the features in the image clearer and more recognizable, providing a good foundation for subsequent feature extraction and matching. In the process of image enhancement processing, other advanced image processing technologies, such as adaptive filtering and sharpening processing, can also be combined to further improve the image quality. Adaptive filtering can reduce noise while preserving image details by adjusting filtering parameters according to local image characteristics; sharpening processing can make image edges and details clearer by enhancing the high-frequency components of the image. By combining these image enhancement techniques, high-quality images can be obtained under different lighting conditions and in different environments, thus ensuring that the features extracted in subsequent steps have high robustness and accuracy.

[0046] Step 2: construct multi-scale pyramids corresponding to the enhanced right view image and the enhanced left view image respectively to obtain corresponding multi-scale pyramid images; based on the multi-scale pyramid images, use a multi-layer convolutional network to extract features to obtain a left image feature map and a right image feature map;

[0047] First of all, constructing a multi-scale pyramid is a classic image processing technique. By downsampling the original image layer by layer, a series of image layers with different resolutions are generated. Each layer of the image is a certain ratio of the previous layer of the image, so that the image can be analyzed and processed at multiple scales. The advantage of the multi-scale pyramid is that it can capture the global features and local details of the image at the same time, so that the feature extraction process can take into account information at different scales. For example, at the high-resolution level, subtle edge and texture information can be captured, while at the low-resolution level, the overall structure and large-scale shape features of the image can be extracted. Based on the multi-scale pyramid image, using multi-layer convolutional neural network (CNN) to extract features is an important method in modern computer vision. Convolutional neural network can automatically learn and extract complex features in images through a combination of a series of convolutional layers, pooling layers and activation functions. Specifically, the convolution layer slides on the image through the convolution kernel (filter) to extract the features of the local area; the pooling layer reduces the size of the feature map through downsampling operations while retaining important feature information; the activation function (such as ReLU) enables the network to learn more complex patterns through nonlinear transformations. In the present invention, the multi-scale pyramid images of the enhanced left-view image and the right-view image are respectively input into the convolutional neural network, and after multi-layer convolution and pooling operations, feature maps at different scales are extracted. These feature maps not only contain the spatial information of the image, but also contain high-level features such as edges, textures, shapes, etc. automatically learned through the convolutional network. In this way, information of different scales and different levels in the image can be effectively captured, providing rich feature data for subsequent disparity estimation. Compared with traditional feature extraction methods, the present invention adopts a combination of multi-scale pyramid and convolutional neural network, which has significant advantages. Traditional methods usually rely on manually designed feature extraction algorithms, such as SIFT, SURF, etc., which perform well in some cases, but are often sensitive to changes in the environment and parameters. The convolutional neural network can automatically learn features that adapt to different scenes and conditions in a data-driven manner, and has more robustness and generalization ability. In addition, the introduction of the multi-scale pyramid enables the feature extraction process to be carried out at different scales, effectively solving the scale change problem in the image. For example, in practical applications, the size and distance of objects may change significantly, and the multi-scale pyramid can analyze and process images at different scales to ensure the stability and accuracy of feature extraction. Convolutional neural networks can capture complex patterns and details in images through multi-level feature extraction and nonlinear transformation, improving the accuracy of feature matching. In the specific implementation process, the enhanced left-view image and right-view image are first constructed into a multi-scale pyramid, and the images at each scale level are processed by the convolutional neural network to extract the corresponding feature map.These feature maps will be used for feature matching and disparity estimation in subsequent steps. In this way, the present invention can not only extract high-quality image features in complex environments, but also improve the accuracy and robustness of binocular visual ranging through multi-scale analysis and deep learning.

[0048] Step 3: Based on the left image feature map and the right image feature map, perform preliminary disparity estimation at the lowest resolution layer to obtain a disparity map;

[0049] Disparity estimation is one of the key steps in binocular visual ranging. It determines the disparity, that is, the horizontal displacement of the same target in the two images, by comparing similar feature points in the left and right images. This process needs to solve two main problems: matching of feature points and calculation of disparity. In the process of feature point matching, the system needs to find corresponding feature point pairs in the left and right images. By searching for similar local areas in the left and right images, a pair of best matching points is found, and the disparity between them is calculated. The disparity is determined by the baseline distance between the left and right cameras and the focal length of the camera, reflecting the depth information of the target. Specifically, the larger the disparity, the closer the target is to the camera; conversely, the smaller the disparity, the farther the target is from the camera. In the present invention, the matching of feature points is performed at the lowest resolution layer, which has many advantages. First, preliminary disparity estimation is performed at a low-resolution level, which can significantly reduce the amount of calculation. As the resolution of the image is reduced, the number of pixels to be processed is reduced, thereby improving the calculation efficiency. Secondly, preliminary estimation at a low-resolution level can effectively eliminate noise and detail interference in the image, making feature matching more robust and stable. The low-resolution image retains the main structural information and filters out high-frequency noise, making the matching of feature points more accurate. In addition, preliminary disparity estimation at the low-resolution level can also provide good initial conditions for the refinement processing in the subsequent steps. By obtaining the disparity map at a coarser level, the system can perform further refinement processing at the subsequent high-resolution level to gradually improve the accuracy of disparity estimation. Commonly used methods in the disparity estimation process include block matching, phase correlation, and optimization methods based on energy minimization. In the block matching method, the system searches for a fixed-size window in the left image and the right image to find the window pair with the highest similarity and calculate the disparity between them. The phase correlation method uses the frequency domain information of the image to determine the disparity by calculating the phase difference. The optimization method based on energy minimization constructs a cost function to represent the error of feature matching and finds the best disparity estimate by minimizing the cost function. These methods have their own advantages and disadvantages, and the specific selection depends on the application scenario and computing resources. The present invention performs preliminary disparity estimation at the lowest resolution layer, effectively combining the advantages of block matching and optimization methods. By processing at the lowest level of the multi-scale pyramid, the system can quickly obtain a preliminary disparity map and provide initial conditions for subsequent multiple compensation and refinement processing. This method not only improves the computational efficiency, but also enhances the robustness and accuracy of disparity estimation. Compared with the prior art, the present invention significantly reduces the amount of calculation and improves the stability and accuracy of matching during the preliminary disparity estimation process by processing at a low-resolution level. This method effectively combines the features extracted by multi-scale pyramids and deep learning, and uses the rich information in the left and right view images to achieve efficient and high-precision disparity estimation.Through this innovative method, the present invention not only overcomes the problem of high computational complexity of traditional methods at high-resolution levels, but also provides a more robust and stable disparity estimation scheme, providing reliable technical support for high-precision binocular visual ranging.

[0050] Step 4: Perform structured light compensation, filter compensation, temperature compensation and vibration compensation on the disparity map in sequence to obtain a compensated disparity map;

[0051] First, structured light compensation is the introduction of structured light with known patterns, such as laser grids, stripes, or dots, into the disparity estimation. These structured light patterns can form clear marks in the image by projecting them into the measurement scene, and these marks appear in both the left and right images. By identifying the deformation of these structured light patterns, the system can accurately calculate the disparity and correct the disparity map. The advantage of structured light compensation is that it can significantly improve the accuracy of disparity estimation, especially in scenes with less texture or more repeated textures, where structured light provides additional reference information and reduces the probability of mismatching. By performing structured light compensation on the disparity map, the parallax error caused by complex scenes can be effectively eliminated and the accuracy of ranging can be improved. Secondly, filter compensation is to filter out unwanted light, such as ambient light and infrared light, by adding filters of specific wavelengths in front of the camera. These unwanted lights may interfere with the image and lead to inaccurate disparity estimation. Filter compensation reduces the interference of ambient light by selectively allowing light of specific wavelengths to pass, thereby improving the contrast and clarity of the image. This compensation technology is particularly suitable for scenes with complex lighting conditions, such as strong light or low light conditions outdoors. Through filter compensation, the consistency of image quality can be ensured, thereby ensuring the accuracy of the disparity map. Temperature compensation is to cope with the impact of temperature changes on the camera and its internal components. Temperature changes may cause changes in the focal length of the camera and thermal noise of the sensor, which in turn affects the image quality and the accuracy of disparity estimation. The image can be temperature compensated by real-time monitoring of the ambient temperature through a temperature sensor and combining it with the temperature response curve of the camera. The temperature compensation method usually includes digital signal processing and hardware correction. By adjusting the grayscale value and color balance of the image, the impact of temperature changes is eliminated to ensure the stability and accuracy of the disparity map. This compensation technology is particularly important in scenes with large temperature differences, such as rapid switching between indoor and outdoor environments. Temperature compensation can effectively reduce the ranging error caused by temperature changes. Finally, vibration compensation is to cope with the tiny vibrations and displacements that the camera may suffer during the measurement process. These vibrations may come from the external environment or the mechanical movement of the measuring device itself, which will affect the stability of the image and thus affect the accuracy of the disparity estimation. Vibration compensation usually uses gyroscopes and accelerometers to monitor the camera's motion status in real time, and combines image stabilization algorithms to dynamically correct the image. Vibration compensation methods include image registration and motion estimation, which ensure the accuracy and stability of the disparity map by adjusting the camera's displacement in real time during image processing. This technology is particularly widely used on mobile platforms, such as drones and self-driving cars. Through vibration compensation, a stable disparity map can be obtained during movement to ensure the reliability of ranging. The comprehensive application of these technologies, such as structured light compensation, filter compensation, temperature compensation, and vibration compensation, can significantly improve the accuracy and stability of the disparity map.Each compensation technology has its own unique application scenarios and advantages. Through combined application, it can cover the distance measurement needs in various complex environments and ensure the high accuracy and robustness of the binocular vision distance measurement method. Compared with the prior art, the multiple compensation strategy proposed in the present invention not only improves the accuracy of distance measurement, but also enhances the adaptability of the system in various environments, thereby achieving more reliable high-precision binocular vision distance measurement.

[0052] Step 5: Based on the compensated disparity map, calculate the distance from the binocular vision image acquisition device to the target.

[0053] Example 2: Assume the left view image is And the right view image is ; Use the following formula to enhance the left view image and the right view image to obtain an enhanced right view image and an enhanced left view image:

[0054] ;

[0055] in, To enhance the left view image; To enhance the right view image; Represents the pixel coordinate position, is the X-axis coordinate, is the Y-axis coordinate; is the preset enhancement factor; is the pixel mean of the left view image; is the pixel mean of the right view image; is the pixel standard deviation of the left view image; is the pixel standard deviation of the right view image.

[0056] Specifically, first of all, standardization is the first step of the image enhancement formula. The purpose of standardization is to adjust the pixel value distribution of the image to a state with a mean of zero and a standard deviation of one. By subtracting the mean of the image from each pixel value and then dividing it by the standard deviation of the image, the brightness offset caused by illumination changes or differences in camera equipment is eliminated. Standardization can effectively balance the brightness in the image, making the grayscale value of the image more concentrated and enhancing the contrast of the image. This processing method can not only improve the visual effect of the image, but also provide a more consistent basis for subsequent feature extraction, reducing the interference of illumination changes on the feature extraction process. Secondly, the image enhancement formula introduces an enhancement term based on Gaussian distribution. The role of the Gaussian distribution term is to adjust the contrast and detail performance of the image through an exponential function. Specifically, this Gaussian distribution term is adjusted according to the difference between the pixel value and the image mean, so that the bright and dark parts of the image are enhanced to varying degrees. When the pixel value is far away from the image mean, the value of the exponential function will decrease, thereby enhancing these areas more strongly; conversely, for areas close to the image mean, the enhancement effect is weaker. In this way, the bright and dark details of the image are highlighted, and the overall contrast of the image is improved. The preset enhancement coefficient is a key parameter in the formula. By adjusting the value of the enhancement coefficient, the intensity of image enhancement can be controlled. The larger the enhancement coefficient, the more significant the contrast and detail enhancement effect of the image; the smaller the enhancement coefficient, the relatively weaker the enhancement effect. By reasonably setting the enhancement coefficient, the image can be optimized according to specific application requirements to achieve the best visual effect and feature extraction effect. This image enhancement method has significant advantages over traditional methods. Traditional image enhancement methods, such as histogram equalization and contrast stretching, can improve the contrast of the image to a certain extent, but often introduce problems of over-enhancement or loss of details. The method of the present invention combines standardization processing and Gaussian distribution enhancement, which not only retains the original details of the image, but also further optimizes the contrast and detail performance of the image, so that the robustness of the image in complex environments is greatly improved. In addition, this method also has advantages in computational complexity. The computational complexity of standardization processing and Gaussian distribution enhancement is relatively small, which can reduce computational overhead while ensuring the image enhancement effect. This is of great significance for application scenarios that require real-time image processing, such as autonomous driving and robot vision. By implementing the image enhancement algorithm on hardware, the real-time processing capability of the system can be effectively improved to meet the application requirements of high precision and high efficiency. Through the standardization processing and Gaussian distribution enhancement of the image, the present invention realizes multi-level optimization of the image. In the standardization processing stage, the brightness distribution of the image is balanced, and the contrast and consistency are enhanced; in the Gaussian distribution enhancement stage, the details and layering of the image are significantly improved. The combination of the two enables the image to maintain high quality and high robustness in various complex environments, providing a solid foundation for subsequent feature extraction and matching.

[0057] Embodiment 3: The number of layers of the multi-scale pyramid in step 2 ranges from 4 to 8; the multi-scale pyramid is a phase-consistency multi-scale pyramid, and the number of directions in each layer ranges from 2 to 6.

[0058] Specifically, the multiscale pyramid is an image processing technology that generates a series of image layers with different resolutions by downsampling the original image layer by layer. Each layer of the image is a reduced version of the previous layer of the image, so that the image can be analyzed and processed at different scales. In this embodiment, the number of layers of the multiscale pyramid ranges from 4 to 8 layers, which means that the image will be decomposed into 4 to 8 layers of different resolutions. This decomposition method enables both the global information and local details of the image to be effectively captured and processed. The key to the multiscale pyramid is that the information at different levels can complement and verify each other. At the high-resolution level, the image has rich details and texture information, and small-scale features can be captured; at the low-resolution level, the overall structure and large-scale features of the image are more obvious, which can be used for global analysis and feature matching. Through multi-scale analysis, the system can take into account both the global and local information of the image at the same time, and improve the accuracy and robustness of feature extraction. Secondly, the phase consistency multiscale pyramid further enhances the effect of image processing. Phase consistency is a feature extraction method based on local energy. By analyzing the phase information of the image at different scales and directions, consistent feature points are extracted. The phase consistency multi-scale pyramid performs multiple direction analysis in each layer, and the number of directions ranges from 2 to 6, which means that each layer of the image will be decomposed into 2 to 6 components in different directions. This method can capture the edge and texture features in different directions in the image and improve the accuracy of feature extraction. The advantage of phase consistency is that it is highly robust to illumination changes and noise. Traditional feature extraction methods, such as gradient-based edge detection, are prone to failure under illumination changes and large noise. Phase consistency can maintain a stable feature extraction effect under illumination changes and noise interference by analyzing local energy. This is of great significance for binocular visual ranging in complex environments. In the specific implementation process, the construction of the phase consistency multi-scale pyramid requires multi-scale and multi-directional filtering of the image. Each layer of the image is first downsampled by Gaussian filtering, and then Gabor filters are applied in different directions for directional decomposition. Gabor filter is a linear filter that can effectively extract edge and texture features in the image. By applying Gabor filters at different scales and directions, the system can extract feature points with phase consistency in the image. These feature points play a key role in subsequent feature matching and disparity estimation. By combining multi-scale analysis and phase consistency feature extraction, the image processing method of this embodiment shows excellent performance in complex environments. The multi-scale pyramid enables both global information and local details of the image to be effectively captured, while the phase consistency feature extraction ensures the stability and accuracy of feature extraction. This method not only improves the accuracy of image processing, but also enhances the robustness of the system under illumination changes and noise interference.Compared with the prior art, the multi-scale pyramid and phase consistency feature extraction method proposed in the present invention has significant technical advantages. Traditional feature extraction methods are prone to failure under illumination changes and noise interference, while the present invention effectively improves the robustness and accuracy of feature extraction through multi-scale and multi-directional analysis. In addition, the flexible setting of the number of layers and directions of the multi-scale pyramid enables the system to be optimized according to specific application requirements, further enhancing the adaptability and practicality of the method.

[0059] Example 4: Enhance the multi-scale pyramid image corresponding to the left view image Calculated using the following formula:

[0060] ;

[0061] in, To enhance the left view image corresponding to the Multi-scale pyramid images of layers; To enhance the left view image corresponding to the Layer Amplitude pyramid images in directions, To enhance the left view image corresponding to the Layer Amplitude pyramid images in directions; To enhance the left view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a cosine operation is performed on each pixel; To enhance the left view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a sine operation is performed on each pixel; It means that the image is regarded as a matrix and then its determinant is calculated;

[0062] Enhanced multi-scale pyramid image corresponding to the right view image Calculated using the following formula:

[0063] ;

[0064] in, To enhance the right view image corresponding to the Multi-scale pyramid images of layers; To enhance the right view image corresponding to the Layer Amplitude pyramid images in directions, To enhance the right view image corresponding to the Layer Amplitude pyramid images in directions; To enhance the right view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a cosine operation is performed on each pixel; To enhance the right view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a sine operation is performed on each pixel.

[0065] Specifically, the construction of the multi-scale pyramid is to perform multi-level downsampling on the image so that the image can be analyzed at different scales. In this embodiment, the multi-scale pyramid is constructed for the enhanced left view image and the right view image respectively, and each layer of the image is decomposed in multiple directions. Specifically, the first layer of the enhanced left view image is Layer multi-scale pyramid image and enhance the right view image Layer multi-scale pyramid image They are calculated by formulas. These formulas combine the information of the amplitude pyramid image and the phase pyramid image. In each layer of the multi-scale pyramid, the amplitude pyramid image and phase pyramid image of the image in different directions are expressed as and as well as and By weighted summing these amplitude and phase information, a phase congruence image can be obtained. The calculation formula of the phase congruence image comprehensively considers the amplitude and phase information of adjacent levels and directions. Layer and The weighted summation of the amplitude pyramid images of each layer is performed, and the contribution of phase consistency is calculated by combining the corresponding phase information. The core of this part is to calculate the contribution of phase consistency by weighting the amplitude pyramid images of each layer. and phase pyramid image Cosine transform and sine transform are performed to extract the features of phase consistency. Specifically, the cosine and sine transforms involved in the formula respectively calculate the phase angle information in the phase pyramid image, so that the phase information in each direction can be effectively integrated. Secondly, the denominator in the formula sums the absolute values ​​of the amplitude pyramid images at adjacent levels and directions. This process ensures that the amplitude information in different directions and at different levels is fully considered, so as to obtain an overall phase consistency measure. In this way, the formula not only combines the information in various directions, but also takes into account the results of multi-scale analysis, making the calculation of phase consistency more accurate and stable. Multi-scale pyramid image of enhanced right-view image The calculation of is similar to that of the enhanced left view image, which is also achieved by combining the amplitude and phase information in different directions and at different levels. By weighted summation of the amplitude pyramid image and the phase pyramid image, and combining the cosine and sine transforms of the phase information, the enhanced right view image can be obtained in the first Phase consistency multi-scale pyramid image on the layer. This phase consistency calculation method has significant technical advantages. First, it combines multi-scale analysis and multi-directional phase information, so that the details and features in the image can be captured more comprehensively. Secondly, by comprehensively considering the amplitude and phase information, the algorithm can maintain a stable feature extraction effect in a complex environment and has strong robustness. In addition, the phase consistency metric also shows good stability under illumination changes and noise interference, which is particularly important for the application of binocular visual ranging. Through this method, the multi-scale pyramid image of the enhanced left-view image and the right-view image not only retains the global structural information of the image, but also enhances the local details and texture features of the image. This provides a solid foundation for subsequent feature matching and disparity calculation, and improves the overall accuracy and reliability of binocular visual ranging. Example 4 By constructing a multi-scale pyramid of phase consistency and combining amplitude and phase information, the phase consistency multi-scale pyramid image of the enhanced left-view image and the right-view image on each layer is calculated. This method not only improves the image processing accuracy, but also enhances the system's adaptability in complex environments, providing reliable technical support for high-precision binocular visual ranging.

[0066] Embodiment 5: Assume that the enhanced left view image is The phase pyramid image of the layer is , calculated using the following formula:

[0067] ;

[0068] in, To enhance the left view image The phase gradient of the layer in the Y-axis direction; To enhance the left view image The phase gradient of the layer in the X-axis direction; is the modulo operation; To enhance the left view image Phase image of the layer;

[0069] Assume that the enhanced right view image is The phase pyramid image of the layer is , calculated using the following formula:

[0070] ;

[0071] in, To enhance the right view image, The phase gradient of the layer in the Y-axis direction; To enhance the right view image, The phase gradient of the layer in the X-axis direction; is the modulo operation; To enhance the right view image, Phase image of the layer; is scalar addition.

[0072] Specifically, the multi-scale phase pyramids of the enhanced left and right images are obtained by calculating the phase gradients and phase information at different levels. This method ensures the consistency and stability of feature points in all directions by integrating phase information and phase gradients, thereby significantly improving the accuracy and robustness of image processing. First, the enhanced left image is Phase pyramid image of the layer Through the previous layer Phase image of Its phase gradient and The phase gradient represents the rate of change of the phase of the image in a specific direction, that is, the speed and direction of the phase change in the image. By calculating these phase gradients, it is possible to capture the tiny phase changes in the image, which is very important for extracting delicate features. Specifically, the phase gradient and Respectively represent the images in Axis and The phase gradients are obtained by performing differential operations on the phase image, indicating the phase change trend of the image in these two directions. The calculation of phase gradients is an important step in image processing. It can provide information about the phase changes in the image, which plays a key role in the subsequent phase update. Next, by combining these phase gradients with the phase image of the previous layer , calculate the new phase pyramid image. In the formula, the phase gradient is normalized to ensure that its value is within a reasonable range and avoid instability in the calculation. This normalization is usually in the form of square sum, that is, and In this way, the numerical stability of the phase gradient is guaranteed. Then, these normalized phase gradient values ​​are added to the phase image of the previous layer to obtain the updated phase image. This step is achieved through scalar addition, that is, the normalized phase gradient is added to the phase image of the previous layer pixel by pixel. In this way, the new phase image not only contains the phase information of the previous layer, but also combines the phase change trend of the current layer, ensuring the continuity and consistency of the phase information. In order to keep the phase value within a reasonable range, the modulo operation is used in the formula. , limiting the phase value to arrive The purpose of the modulo operation is to prevent the phase value from exceeding the predetermined range. By performing the modulo operation on the phase value, it is always kept within a cycle interval. This operation ensures the periodicity and consistency of the phase information and avoids calculation errors caused by numerical overflow. , and its calculation process is similar to that of the left view image. Its phase gradient and Calculate, and also through normalization and modulo operation, get the right view image in the The multi-scale phase pyramid image is a phase pyramid image of a layer. This process ensures the consistency and accuracy of the phase information of the left and right view images, providing a reliable basis for the subsequent disparity estimation. The advantage of the multi-scale phase pyramid method is that it can capture subtle changes in the image and propagate and update the phase information at multiple levels. Through the comprehensive calculation of the phase gradient, the multi-scale phase pyramid can effectively improve the accuracy and robustness of the phase information. This is of great significance for feature extraction and matching in binocular visual ranging, and can maintain high-precision ranging results in complex environments. In addition, the multi-scale phase pyramid method has strong robustness to illumination changes and noise. Traditional phase processing methods are prone to failure under conditions of illumination changes and large noise, while the multi-scale phase pyramid can maintain stable feature extraction effects under illumination changes and noise interference through the comprehensive calculation of the phase gradient. This enables the method to perform excellent performance in complex environments, such as outdoor strong light or low light environments, and can extract stable and accurate phase information. In practical applications, the multi-scale phase pyramid method can perform excellent performance in different lighting conditions and complex scenes. This method not only improves the contrast and detail performance of the image, but also enhances the adaptability of the system in complex environments. For application scenarios that require high precision and high robustness, such as autonomous driving and robot vision, the multi-scale phase pyramid method has low computational complexity implemented through hardware. It can reduce computational overhead while ensuring image enhancement effects and meet the needs of real-time processing.

[0073] Embodiment 6: Assume that the enhanced left view image is The phase pyramid image of the layer is , calculated using the following formula:

[0074] ;

[0075] in, Represents a downsampling operation; is the Gaussian kernel; is convolution; To enhance the left view image Amplitude image of the layer; To enhance the left view image The amplitude gradient of the layer in the Y-axis direction; To enhance the left view image The amplitude gradient of the layer in the X-axis direction; suppose the enhanced right view image is in the The phase pyramid image of the layer is , calculated using the following formula:

[0076] ;

[0077] in, To enhance the right view image, Amplitude image of the layer; To enhance the right view image, The amplitude gradient of the layer in the Y-axis direction; To enhance the right view image, The amplitude gradient of the layer in the X-axis direction.

[0078] Specifically, first, the left view image is enhanced in the first Amplitude pyramid image of the layer By Amplitude image of and its amplitude gradient and The amplitude gradient represents the rate of change of the amplitude of the image in a specific direction, that is, the speed and direction of the amplitude change in the image. By calculating these amplitude gradients, it is possible to capture the tiny amplitude changes in the image, thereby extracting more delicate feature information. In the formula and Respectively represent the images in Axis and The amplitude changes in the two axes. These gradients are obtained by performing differential operations on the amplitude image, indicating the change trend of the image in these two directions. The calculation of the amplitude gradient is an important step in image processing. It can provide information about the amplitude changes in the image, which plays a key role in the subsequent amplitude update. Next, by combining these amplitude gradients with the amplitude image of the previous layer , calculate the new amplitude pyramid image. In the formula, the amplitude image The square root of and Gaussian kernel Perform a convolution operation. The purpose of this step is to smooth the image, remove noise, and retain important amplitude information. Gaussian convolution is a commonly used filtering method in image processing. By smoothing the image, it can effectively reduce the impact of noise on the image and improve the image quality. Then, the smoothed amplitude image is combined with the phase gradient information, and a new amplitude image is calculated by the cosine function. This step utilizes the changing trend of the phase information, so that the new amplitude image not only contains the amplitude information, but also combines the phase change information, thereby improving the accuracy and robustness of the image features. Finally, through the downsampling operation Reduce the resolution of the image by half to generate a new amplitude pyramid image. The purpose of the downsampling operation is to reduce the size of the image while retaining important feature information, so that the multi-scale pyramid can effectively represent the features of the image at different resolutions. This operation ensures the continuity and consistency of the image in the multi-scale representation, providing a solid foundation for subsequent image processing and analysis. Amplitude pyramid image for enhanced right-view image , and its calculation process is similar to that of the left view image. and its amplitude gradient and Calculation is performed, and the right view image is obtained by Gaussian filtering and smoothing, phase gradient combination and downsampling. The multi-scale phase pyramid method can effectively improve the accuracy and robustness of amplitude information by comprehensively calculating the amplitude gradient. This is of great significance for feature extraction and matching in binocular vision ranging, and can maintain high-precision ranging results in complex environments.

[0079] Example 7: Based on the multi-scale pyramid image, a multi-layer convolutional network is used to extract features to obtain the first The left image feature map of the layer is , No. The right image feature map of the layer is ; In step 3, use the following formula to perform preliminary disparity estimation at the lowest resolution layer to obtain the disparity map :

[0080] ;

[0081] in, is the disparity value, which indicates the displacement difference between the left image feature map and the right image feature map at the same pixel position; is the window size, which represents the local neighborhood used to calculate the difference during the disparity estimation process, defining the range of pixels considered around each pixel; is the lowest resolution layer, indicating the lowest resolution layer of the multi-scale pyramid; is the preset weight coefficient; For the The left image feature map of the layer; For the The right image feature map of the layer.

[0082] Specifically, features are extracted from multi-scale pyramid images through multi-layer convolutional neural networks. For each layer of pyramid images of the left view image and the right view image, convolutional neural networks are used to process them respectively to generate corresponding feature maps. Through multi-level convolution and pooling operations, convolutional networks can extract high-level feature information in images, including edges, textures, and shapes. These feature information plays a vital role in disparity estimation because they can more accurately reflect the structure and content in the image. Next, preliminary disparity estimation is performed at the lowest resolution layer. The reason for selecting the lowest resolution layer in this step is that low-resolution images can significantly reduce the amount of calculation while retaining the global structural information of the image and reducing the interference of detail noise, thereby making disparity estimation more stable and robust. At the lowest resolution layer, the system compares the feature maps of the left and right images to determine the disparity value of each pixel. The core of disparity estimation is to match the displacement difference of feature points in the left and right images. In this process, the system searches for possible disparity values ​​in the local neighborhood of each pixel, calculates the matching cost corresponding to each disparity value, and selects the disparity value with the smallest cost as the preliminary disparity. The calculation of the matching cost consists of two main parts: absolute difference and weighted square difference. The absolute difference is used to directly measure the difference between the feature maps of the left and right images at different disparity values, while the weighted square difference further measures the difference through the square difference and weights it with the sum of the feature maps of the left and right images to better reflect the similarity between the image features. Specifically, the system compares the feature maps pixel by pixel, calculates the difference in feature values, and introduces a weight coefficient to balance the influence of different parts. This weight coefficient ensures that the difference between feature maps is reasonably handled in the calculation, making the matching process more accurate. Finally, by searching the local neighborhood of each pixel, the system can find the disparity value that minimizes the cost function, which reflects the displacement difference between the left and right images at the pixel position. The advantage of performing preliminary disparity estimation at the lowest resolution layer is not only its high computational efficiency, but also its ability to provide a stable and robust initial disparity map. This is very important for the subsequent refinement of the high-resolution layer. The preliminary disparity map provides a good starting point for further disparity refinement, ensuring the continuity and accuracy of the disparity estimation. In addition, the application of convolutional neural networks in feature extraction has significantly improved the accuracy of disparity estimation. Traditional feature extraction methods often rely on manually designed features, such as SIFT and SURF, which may not perform well in complex scenes. Convolutional neural networks, through deep learning, can automatically learn high-level features in images and have better generalization and robustness. By combining multi-scale pyramid images, the system can extract rich feature information at different resolutions and scales, making disparity estimation more accurate and stable.

[0083] Embodiment 8: In step 4, scalar addition operations are performed on the disparity map by using the preset structured light compensation value, filter compensation value, temperature compensation value and vibration compensation value, respectively, to achieve structured light compensation, filter compensation, temperature compensation and vibration compensation for the disparity map in sequence to obtain a compensated disparity map.

[0084] Specifically, first, structured light compensation is achieved by introducing a preset structured light compensation value and performing a scalar addition operation with the disparity map. Structured light is an active light source technology that can significantly enhance the accuracy of disparity estimation by projecting a light pattern of known pattern, such as a laser grid or stripes, in the measurement scene. In actual operation, structured light forms clear marks in the image, which appear in both the left and right view images. By identifying the deformation and displacement of these marks, accurate disparity values ​​can be calculated. The structured light compensation value is obtained in advance through experiments or calibration methods, and then added to the disparity map during the disparity map calculation process to correct errors caused by changes in lighting conditions or surface reflection characteristics. Next, filter compensation is achieved by adding preset filter compensation values. Filters are used to reduce the interference of ambient light and other unnecessary light sources on the image, which is particularly important outdoors or under complex lighting conditions. The filter compensation values ​​are also predetermined by experiments or calibration methods, and these values ​​can effectively correct errors in the disparity map caused by changes in lighting. In practical applications, filter compensation can significantly improve the contrast and clarity of the image, making the disparity estimation more accurate. Temperature compensation is achieved by performing scalar addition operations on the disparity map using a preset temperature compensation value. Temperature changes can cause changes in the physical properties inside the camera, such as slight changes in focal length, which directly affect the accuracy of the disparity estimation. The ambient temperature is monitored in real time by a temperature sensor, and the temperature compensation value is pre-determined in combination with the temperature response curve of the camera. In the process of calculating the disparity map, adding these temperature compensation values ​​can effectively correct the errors caused by temperature changes and ensure the accuracy and stability of the disparity map. Finally, vibration compensation is achieved by adding preset vibration compensation values. Vibrations usually come from the external environment or the mechanical movement of the device itself. These vibrations can cause slight changes in the position of the camera, thereby affecting the accuracy of the disparity map. In practical applications, the vibration state of the device is monitored in real time by an accelerometer and a gyroscope, and the vibration compensation value is pre-determined in combination with experimental data. In the process of calculating the disparity map, these vibration compensation values ​​are added to the disparity map in a scalar operation, which can effectively correct the errors caused by vibration and improve the stability and accuracy of the disparity estimation.

[0085] Embodiment 9: In step 5, based on the disparity map after compensation, the disparity value is obtained as follows: , and then use the following formula to calculate the distance from the binocular vision image acquisition device to the target :

[0086] ;

[0087] in, The focal length of the device for binocular vision image acquisition; Get the baseline distance between the two cameras in the device for binocular vision images.

[0088] Specifically, the parallax value It is obtained by performing multiple compensations on the disparity map. In step 4, the preliminary disparity map has been corrected through multiple compensation methods such as structured light compensation, filter compensation, temperature compensation and vibration compensation to eliminate the influence of the external environment on the disparity estimation. The compensated disparity map is more accurate and stable, providing a reliable disparity value. Next, the formula In Indicates the baseline distance between the two cameras in the binocular vision image acquisition device. The baseline distance refers to the horizontal distance between the two cameras, which is a known fixed value. The larger the baseline distance, the stronger the depth perception ability of the system, and the accuracy of the ranging will be improved accordingly. Indicates the focal length of the binocular vision image acquisition device, that is, the focal length of the camera. The focal length determines the viewing angle and imaging ratio of the camera and is another known fixed parameter. The longer the focal length, the larger the system's ranging range, but at the same time, the higher the parallax accuracy requirement. It is the difference in horizontal displacement of the target in the left and right images. The binocular vision system takes two images of the same scene at the same time and uses the parallax between the left and right cameras to calculate the depth information of the target. The larger the parallax value, the closer the target is to the camera; the smaller the parallax value, the farther the target is from the camera. The accurate calculation of the parallax value is the core of the entire ranging process. The accuracy of the parallax value is ensured by multiple compensation of the parallax map. Formula The derivation of is based on the principle of geometric triangulation. Assuming that the optical axes of the two cameras are parallel and located on the same horizontal line, the projection points of the target point in the left and right images are and , then the parallax According to the principle of similar triangles, the target distance can be obtained This formula explains the relationship between baseline distance, focal length and parallax. With the known baseline distance and focal length, as well as the calculated parallax value, the distance of the target can be directly calculated.

[0089] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that these specific embodiments are only illustrative, and those skilled in the art may omit, replace, and change the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, merging the above method steps so as to perform substantially the same functions in substantially the same manner to achieve substantially the same results is within the scope of the present invention. Therefore, the scope of the present invention is limited only by the appended claims.

Claims

1. A high-precision binocular vision ranging method, characterized in that: The method comprises: Step 1: Use a binocular vision image acquisition device to acquire a left view image and a right view image of the target; perform image enhancement on the left view image and the right view image to obtain an enhanced right view image and an enhanced left view image; Step 2: construct multi-scale pyramids corresponding to the enhanced right view image and the enhanced left view image respectively to obtain corresponding multi-scale pyramid images; based on the multi-scale pyramid images, use a multi-layer convolutional network to extract features to obtain a left image feature map and a right image feature map; Step 3: Based on the left image feature map and the right image feature map, perform preliminary disparity estimation at the lowest resolution layer to obtain a disparity map; Step 4: Perform structured light compensation, filter compensation, temperature compensation and vibration compensation on the disparity map in sequence to obtain a compensated disparity map; Step 5: Based on the compensated disparity map, calculate the distance between the binocular vision image acquisition device and the target; Enhanced multi-scale pyramid image corresponding to the left view image Calculated using the following formula: ; in, To enhance the left view image corresponding to the Multi-scale pyramid images of layers; To enhance the left view image corresponding to the Layer Amplitude pyramid images in directions, To enhance the left view image corresponding to the Layer Amplitude pyramid images in directions; To enhance the left view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a cosine operation is performed on each pixel; To enhance the left view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a sine operation is performed on each pixel; It means that the image is regarded as a matrix and then its determinant is calculated; Enhanced multi-scale pyramid image corresponding to the right view image Calculated using the following formula: ; in, To enhance the right view image corresponding to the Multi-scale pyramid images of layers; To enhance the right view image corresponding to the Layer Amplitude pyramid images in directions, To enhance the right view image corresponding to the Layer Amplitude pyramid images in directions; To enhance the right view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a cosine operation is performed on each pixel; To enhance the right view image corresponding to the Layer Phase pyramid images in all directions, Indicates that a sine operation is performed on each pixel.

2. The high-precision binocular vision ranging method according to claim 1, characterized in that: In step 1, let the left view image be And the right view image is ; Use the following formula to enhance the left view image and the right view image to obtain an enhanced right view image and an enhanced left view image: ; in, To enhance the left view image; To enhance the right view image; Represents the pixel coordinate position, is the X-axis coordinate, is the Y-axis coordinate; is the preset enhancement factor; is the pixel mean of the left view image; is the pixel mean of the right view image; is the pixel standard deviation of the left view image; is the pixel standard deviation of the right view image.

3. The high-precision binocular vision ranging method according to claim 2, characterized in that: The number of layers of the multi-scale pyramid in step 2 ranges from 4 to 8; the multi-scale pyramid is a phase-consistency multi-scale pyramid, and the number of directions in each layer ranges from 2 to 6.

4. The high-precision binocular vision ranging method according to claim 3, characterized in that: Assume that the enhanced left view image is The phase pyramid image of the layer is , calculated using the following formula: ; in, To enhance the left view image The phase gradient of the layer in the Y-axis direction; To enhance the left view image The phase gradient of the layer in the X-axis direction; is the modulo operation; To enhance the left view image Phase image of the layer; Assume that the enhanced right view image is The phase pyramid image of the layer is , calculated using the following formula: ; in, To enhance the right view image, The phase gradient of the layer in the Y-axis direction; To enhance the right view image, The phase gradient of the layer in the X-axis direction; is the modulo operation; To enhance the right view image, Phase image of the layer; is scalar addition.

5. The high-precision binocular vision ranging method according to claim 4, characterized in that: Assume that the enhanced left view image is The phase pyramid image of the layer is , calculated using the following formula: ; in, Represents a downsampling operation; is the Gaussian kernel; is convolution; To enhance the left view image Amplitude image of the layer; To enhance the left view image The amplitude gradient of the layer in the Y-axis direction; To enhance the left view image The amplitude gradient of the layer in the X-axis direction; suppose the enhanced right view image is in the The phase pyramid image of the layer is , calculated using the following formula: ; in, To enhance the right view image, Amplitude image of the layer; To enhance the right view image, The amplitude gradient of the layer in the Y-axis direction; To enhance the right view image, The amplitude gradient of the layer in the X-axis direction.

6. The high-precision binocular vision ranging method according to claim 5, characterized in that: In step 2, based on the multi-scale pyramid image, a multi-layer convolutional network is used to extract features to obtain the first The left image feature map of the layer is , No. The right image feature map of the layer is ; In step 3, use the following formula to perform preliminary disparity estimation at the lowest resolution layer to obtain the disparity map : ; in, is the disparity value, which indicates the displacement difference between the left image feature map and the right image feature map at the same pixel position; is the window size, which represents the local neighborhood used to calculate the difference during the disparity estimation process, defining the range of pixels considered around each pixel; is the lowest resolution layer, indicating the lowest resolution layer of the multi-scale pyramid; is the preset weight coefficient; For the The left image feature map of the layer; For the The right image feature map of the layer.

7. The high-precision binocular vision ranging method according to claim 6, characterized in that: In step 4, scalar addition operations are performed on the disparity map by using preset structured light compensation values, filter compensation values, temperature compensation values, and vibration compensation values, respectively, so as to perform structured light compensation, filter compensation, temperature compensation, and vibration compensation on the disparity map in sequence, and obtain a compensated disparity map.

8. The high-precision binocular vision ranging method according to claim 7, characterized in that: In step 5, based on the compensated disparity map, the disparity value is , and then use the following formula to calculate the distance from the binocular vision image acquisition device to the target : ; in, The focal length of the device for binocular vision image acquisition; Get the baseline distance between the two cameras in the device for binocular vision images.

Citation Information

Patent Citations

  • Binocular stereoscopic vision-based stereo matching method

    CN106340036A

  • Binocular vision-based power transmission line online detection method for patrol robot

    CN108734143A

  • Three-dimensional image depth detection method combining cross skeleton window and image pyramid

    CN115018934A

  • Target detection method for stereoscopic vision depth perception learning

    CN116883990A

  • Parking lot management and control method based on object activity prediction, and electronic device

    US20230222844A1