Binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse

The binocular stereo matching algorithm through group-by-group SAD cost and feature reuse solves the problems of information loss and low matching accuracy in the existing technology, achieves more efficient and accurate stereo matching, and reduces coding combined with densely connected networks Information is lost during the decoding process, improving matching accuracy and efficiency.

CN114359589BActive Publication Date: 2024-09-10YANSHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111474482.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-03
Publication Date
2024-09-10
Estimated Expiration
2041-12-03

AI Technical Summary

Technical Problem

Existing binocular stereo matching algorithms are difficult to balance between matching accuracy and speed, and there are problems of information loss and large errors. In particular, deep learning-based methods suffer serious information loss during the encoding and decoding process, resulting in reduced matching accuracy.

Method used

A binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse is used to calculate similarity information through the group-by-group SAD method. Combined with a densely connected multi-scale cost reuse network, context information learning and encoding and decoding operations are performed to reduce Information is lost and matching accuracy is improved.

Benefits of technology

It improves the accuracy and efficiency of stereo matching, ensures higher matching accuracy and information retention without increasing time consumption, and provides more accurate cost and disparity predictions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114359589B
    Figure CN114359589B
Patent Text Reader

Abstract

The present invention discloses a binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse. The present invention proposes to use a group-by-group SAD method to calculate the cost. Subtraction can more clearly characterize the similarity between features. Regional subtraction takes into account information of surrounding pixels and context information, and can more clearly calculate the similarity between features. Compared with full correlation and group-by-group correlation, the accuracy of the cost is improved, and more accurate information is provided for a 3D aggregation part, thereby improving the accuracy of stereo matching. In addition, a feature reuse aggregation network based on dense connection is constructed, and the multi-size information of the cost aggregation part is reused using the principle of dense connection, thereby reducing the loss of information in the encoding and decoding process, and improving the effectiveness of the cost aggregation network to a certain extent. Without increasing time consumption, the efficiency of the aggregation network is improved, and the matching accuracy is further improved without increasing time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, in particular to a binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse. Background Art

[0002] In recent years, the binocular stereo matching principle has been widely used in visual processing such as autonomous driving, 3D reconstruction, and robot recognition. The main reason is that the stereo matching principle imitates the human eye and reconstructs multi-dimensional objects in reality, and can quickly restore the multi-dimensional objects in the photographs. However, when the same object is photographed by a horizontal camera, there will be a deviation in horizontal displacement compared to the actual object. The method based on deep learning can help to quickly match, but the matching accuracy is not high and needs to be improved.

[0003] At present, many network structures have been proposed for binocular stereo matching algorithms based on deep learning. Mayer introduced the full correlation method to calculate the similarity of left and right features in the end-to-end method. However, the full correlation method compresses the features of multiple channels into a single channel and can only construct the similarity cost volume of a single channel, resulting in the loss of a large amount of useful information. The cascade method proposed by Kendall attempts to solve the above problem. It stacks the left and right features together according to the channel dimension, which does retain a large amount of feature information, but does not calculate the similarity of the feature information. This results in the subsequent network structure requiring a large number of parameters to learn the similarity, which consumes a lot of time. Subsequently, Guo proposed a group-by-group correlation method to calculate the similarity of features, construct a group-by-group correlation cost volume, and combine the cascade method to construct a cascade cost volume. To a certain extent, it not only retains the feature information, but also calculates the similarity of the features. However, according to the principle of similarity, both full correlation and group-by-group correlation cannot accurately judge the similarity between features, and there are a lot of errors. For the constructed cost volume, Kendall proposed to use encoding and decoding to learn the input cascade cost volume, but there is a problem of insufficient information learning. Chang proposed to use a stacked hourglass network structure to repeatedly encode and decode the constructed cost volume, which improves the utilization rate of the cost volume. However, there are a lot of problems. When the volume of the cost volume decreases during the encoding process, a lot of information will be lost. When restoring the size during the decoding process, information will be lost. Continuous encoding and decoding processes will cause more and more serious information loss, which will lead to a decrease in matching accuracy.

[0004] In short, there is an urgent need for a binocular stereo matching algorithm that can ensure both matching speed and matching accuracy. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse to quickly and accurately achieve stereo matching of binocular images.

[0006] In order to solve the above technical problems, the technical solution adopted by the present invention is: a binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse, comprising the following steps:

[0007] S1, input left and right stereo images taken by two horizontally placed cameras;

[0008] S2, extracting unary features from the input left and right stereo images and constructing corresponding unary feature volumes;

[0009] S3, using the group-by-group SAD method to calculate the matching value of the extracted unary feature volume, and constructing a group-by-group SAD cost volume with similarity information;

[0010] S4, using a cost aggregation network based on densely connected multi-scale cost volume reuse to repeatedly learn context information on the constructed group-by-group SAD cost volume, and outputting a cost volume with accurate pixel similarity information;

[0011] S5. Restore the output cost volume to the original image size by upsampling operation, convert the original size cost volume obtained by upsampling into probability volume by using softmax function, and then calculate the predicted disparity value by using soft argmin function, output the predicted disparity map, and use Smooth L1 loss function to constrain the data in the network training process.

[0012] A further improvement of the technical solution of the present invention is that the binocular stereo image in step S1 includes a reference image and a target image.

[0013] A further improvement of the technical solution of the present invention is that: in the step S2, a weight-shared residual network module is used to extract unary features from the reference image and the target image respectively, extract multi-level unary features, and construct corresponding unary feature volumes.

[0014] A further improvement of the technical solution of the present invention is that the specific process of constructing the group-by-group SAD cost volume in step S3 is: dividing the unary feature volume into multiple groups along the channel dimension, and using the group-by-group SAD method to calculate the similarity of each group of features.

[0015] A further improvement of the technical solution of the present invention is that the calculation formula of the group-by-group SAD cost is:

[0016]

[0017] Among them, d represents the disparity value, g represents a group, Nc Indicates the number of channels, N g Indicates the number of groups, i=1,2,3,…N c / N g Represents the corresponding channel number.

[0018] A further improvement of the technical solution of the present invention is that the specific process of step S4 is:

[0019] S41, dividing the constructed group-by-group SAD cost into different scales, and learning the cost amounts of different scales: reducing the group-by-group SAD cost amount by continuous downsampling operations to reduce the cost amount of 1 / 4 size to the cost amount of 1 / 8 and 1 / 16 size;

[0020] S42, inputting the cost amounts of different sizes into the stacked hourglass module, and continuously inputting them into different hourglass modules: based on the dense connection of multi-scale cost amounts, inputting the cost amount of 1 / 4 size into the first pre-hourglass module for processing, and transmitting the information between the same sizes through short connections; downsampling the cost amount processed by the first pre-hourglass module to obtain a cost amount of 1 / 8 size, and then downsampling to obtain a cost amount of 1 / 16 size, inputting the cost amounts of different sizes in step S41 into the cost amounts of corresponding sizes in the encoding process of the hourglass module according to the corresponding sizes, supplementing the information, and then continuously upsampling the cost amounts through the decoding process, and the upsampling operation in the decoding process supplements the information of the cost amounts of the corresponding sizes of the downsampling operation in the encoding process through short connections;

[0021] S43, inputting the cost amount of the corresponding size in the encoding process of the first hourglass module into the encoding process of the second hourglass module, and at the same time inputting the cost amount of the corresponding size in the encoding process of the first hourglass module into the encoding process of the third hourglass module, and then inputting the cost amount of the corresponding size in the encoding process of the second hourglass module into the encoding process of the third hourglass module; when encoding, the second hourglass module receives the supply of the information of the first hourglass module, and supplies this information to the encoding process of the third hourglass module;

[0022] S44. Continuous encoding and decoding operations constitute a densely connected aggregation network of multi-scale cost volumes, continuously transmit corresponding information, and reuse context information to output cost volumes with accurate pixel similarity information.

[0023] A further improvement of the technical solution of the present invention is that the predicted disparity value in step S5 is obtained by a soft argmin function, and the formula is:

[0024]

[0025] Among them, d represents the disparity value, D represents the maximum disparity value, represents the predicted disparity, σ(·) represents the softmax function, and C d represents the cost amount;

[0026] The Smooth L1 loss function is:

[0027]

[0028] In the formula,

[0029]

[0030] Among them, λ ω represents the likelihood value of the ω-th disparity prediction, represents the ground truth disparity value, represents the predicted disparity value, and x represents the difference between the predicted disparity value and the true disparity value.

[0031] Due to the adoption of the above technical solution, the technical progress achieved by the present invention is:

[0032] The present invention proposes a new framework of an end-to-end binocular stereo matching algorithm based on deep learning. Compared with the previous method of calculating the cost by full correlation and group-by-group correlation, the present invention proposes a group-by-group SAD method to calculate the cost. Subtraction can more clearly express the similarity between features. The subtraction of regions takes into account the information of surrounding pixels and context information, and can more clearly calculate the similarity between features. Compared with full correlation and group-by-group correlation, the accuracy of the cost is improved, and more accurate information is provided for the 3D aggregation part, thereby improving the accuracy of stereo matching; and a densely connected feature reuse aggregation network is constructed, and the multi-size information of the cost aggregation part is reused by using the principle of dense connection, which reduces the loss of information in the encoding and decoding process, improves the effectiveness of the cost aggregation network to a certain extent, improves the efficiency of the aggregation network without increasing time consumption, and further improves the matching accuracy without increasing time. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 This is a flow chart of the binocular stereo matching method based on deep learning;

[0034] Figure 2 This is the principle diagram of the group-by-group SAD method. DETAILED DESCRIPTION

[0035] The present invention is further described in detail below in conjunction with embodiments:

[0036] like Figure 1As shown, the binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse includes the following steps:

[0037] S1. Input left and right stereo images obtained by two horizontally placed cameras: the left and right stereo images include a reference image and a target image. In this embodiment, the reference image is set as the left image and the target image is set as the right image. Since two images of the same object taken by two horizontal cameras result in a horizontal position deviation between the left and right images, a stereo matching process is required to find the horizontal difference between the left and right images and obtain a corresponding disparity map, and the corresponding depth map can be restored according to the disparity map.

[0038] S2. Extract unary features from the binocular stereo image and construct the corresponding unary feature volume: Use a weight-sharing residual network module to extract unary features from the reference image and the target image respectively, extract multi-level unary features, and construct the corresponding unary feature volume.

[0039] S3. Calculate the matching value of the extracted univariate feature volume using the group-by-group SAD method to construct a group-by-group SAD cost volume with similarity information; The specific process of constructing the group-by-group SAD cost volume: Divide the univariate feature volume into multiple groups along the channel dimension, and use the group-by-group SAD method to calculate the similarity of each group of features. In this embodiment, the univariate feature volume is divided into 40 groups along the channel dimension, and the group-by-group SAD method is used to calculate the similarity of each group of features. The SAD method is to calculate the sum of the absolute difference between each pixel in the reference image and the pixel in the target image within the predefined maximum disparity range for each pixel in the reference image within the area, and the area size is a 3×3 square;

[0040] The principle diagram of the group-by-group SAD method of this embodiment is as follows Figure 2 As shown in the figure, the corresponding principle is: under the predefined disparity value, a 3×3 rectangular box is set at the center of each pixel value in the reference image, and

[0041] Under the predefined disparity value, a 3×3 square is also set with each pixel in the target image as the center. The absolute value of each pixel value in the square in the reference image is subtracted from each pixel value in the square in the target pixel at the corresponding position, and then the absolute value of all pixels in the corresponding positions in the square are subtracted. Then all the absolute values ​​are added up to get the similarity of the center pixel in the square; the smaller the sum value in the corresponding area, the higher the matching degree of the center pixel; the higher the corresponding matching degree of the pixels around the center pixel, the more fully it can explain the matching of the center pixel; traversing this process to the predefined maximum disparity range of all pixels in the image, the matching values ​​of all channels under all disparities are obtained, and then the final 4D cost volume with similarity information is obtained.

[0042] The calculation formula for the group-by-group SAD cost is:

[0043]

[0044] Among them, d represents the disparity value, g represents a group, N c Indicates the number of channels, N g Indicates the number of groups, i=1,2,3,…N c / N g Represents the corresponding channel number.

[0045] The group-by-group SAD method is used to calculate the similarity of feature pixels in the image, obtain the matching value of each pixel with the pixel to be matched within the predefined disparity range, and construct a multi-channel group-by-group SAD cost.

[0046] S4. A cost aggregation network based on dense connection and multi-scale cost volume reuse is used to repeatedly learn the context information of the constructed group-by-group SAD cost volume, and output the cost volume with accurate pixel similarity information. The principle of dense connection is: the feature information input at the beginning is continuously input into the subsequent network in sequence to ensure that all information can be reused and reduce information loss;

[0047] The specific process is:

[0048] S41, dividing the constructed group-by-group SAD cost into different scales, and learning the cost amounts of different scales: reducing the group-by-group SAD cost amount by continuous downsampling operations to reduce the cost amount of 1 / 4 size to the cost amount of 1 / 8 and 1 / 16 size;

[0049] S42, inputting the cost amounts of different sizes into the stacked hourglass module, and continuously inputting them into different hourglass modules: according to the dense connection based on the multi-scale cost amount, inputting the cost amount of 1 / 4 size into the first pre-hourglass module for processing, and transmitting the information between the same sizes through the short connection; down-sampling the cost amount processed by the first pre-hourglass module to obtain a cost amount of 1 / 8 size, and then down-sampling to obtain a cost amount of 1 / 16 size, inputting the cost amounts of different sizes in step S41 into the cost amounts of corresponding sizes in the encoding process of the hourglass module according to the corresponding sizes, supplementing the information, and then continuously up-sampling the cost amounts through the decoding process, and the up-sampling operation in the decoding process supplements the information of the cost amounts of the corresponding sizes of the down-sampling operation in the encoding process through short connections;

[0050] S43, inputting the cost amount of the corresponding size in the encoding process of the first hourglass module into the encoding process of the second hourglass module, and at the same time inputting the cost amount of the corresponding size in the encoding process of the first hourglass module into the encoding process of the third hourglass module, and then inputting the cost amount of the corresponding size in the encoding process of the second hourglass module into the encoding process of the third hourglass module; when encoding, the second hourglass module receives the supply of the information of the first hourglass module, and supplies this information to the encoding process of the third hourglass module;

[0051] S44. Continuous encoding and decoding operations constitute a densely connected aggregation network of multi-scale cost quantities. Continuous corresponding information transmission can prevent the loss of information in the stacked hourglass module during the continuous encoding and decoding process, and reuse the context information to output the cost quantity with accurate pixel similarity information.

[0052] S5. First, the output cost volume is restored to the original image size by upsampling operation, and the original size cost volume obtained by upsampling is converted into a probability volume by using the softmax function. Then, the predicted disparity value is calculated by using the soft argmin function, and the predicted disparity map is output. The Smooth L1 loss function is used to constrain the data in the network training process.

[0053] The disparity value is obtained by the soft argmin function, the formula is:

[0054]

[0055] Among them, d represents the disparity value, D represents the maximum disparity value, represents the predicted disparity, σ(·) represents the softmax function, and C d Represents the cost volume.

[0056] The Smooth L1 loss function is:

[0057]

[0058] in,

[0059]

[0060] in, represents the predicted disparity value, λ ω represents the likelihood value of the ω-th disparity prediction, represents the ground truth disparity value, x represents the difference between the predicted disparity value and the true disparity value,

[0061] The present invention proposes a new framework of an end-to-end binocular stereo matching algorithm based on deep learning. Compared with the previous method of calculating the cost by full correlation and group-by-group correlation, the present invention proposes a group-by-group SAD method to calculate the cost. Subtraction can more clearly express the similarity between features. The subtraction of regions takes into account the information of surrounding pixels and context information, and can more clearly calculate the similarity between features. Compared with full correlation and group-by-group correlation, the accuracy of the cost is improved, and more accurate information is provided for the 3D aggregation part, thereby improving the accuracy of stereo matching; and a densely connected feature reuse aggregation network is constructed, and the multi-size information of the cost aggregation part is reused by using the principle of dense connection, which reduces the loss of information in the encoding and decoding process, improves the effectiveness of the cost aggregation network to a certain extent, improves the efficiency of the aggregation network without increasing time consumption, and further improves the matching accuracy without increasing time.

Claims

1. A binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse, characterized by: The steps include: S1, input left and right stereo images taken by two horizontally placed cameras; S2, extracting unary features from the input left and right stereo images and constructing corresponding unary feature volumes; S3, using the group-by-group SAD method to calculate the matching value of the extracted unary feature volume, and constructing a group-by-group SAD cost volume with similarity information; S4. A cost aggregation network based on densely connected multi-scale cost volume reuse is used to repeatedly learn context information on the constructed group-by-group SAD cost volume, and output a cost volume with accurate pixel similarity information; the specific process is: S41, dividing the constructed group-by-group SAD cost into different scales, and learning the cost amounts of different scales: reducing the group-by-group SAD cost amount by continuous downsampling operations to reduce the cost amount of 1 / 4 size to the cost amount of 1 / 8 and 1 / 16 size; S42, inputting the cost amounts of different sizes into the stacked hourglass module, and continuously inputting them into different hourglass modules: based on the dense connection of multi-scale cost amounts, inputting the cost amount of 1 / 4 size into the first pre-hourglass module for processing, and transmitting the information between the same sizes through short connections; downsampling the cost amount processed by the first pre-hourglass module to obtain a cost amount of 1 / 8 size, and then downsampling to obtain a cost amount of 1 / 16 size, inputting the cost amounts of different sizes in step S41 into the cost amounts of corresponding sizes in the encoding process of the hourglass module according to the corresponding sizes, supplementing the information, and then continuously upsampling the cost amounts through the decoding process, and the upsampling operation in the decoding process supplements the information of the cost amounts of the corresponding sizes of the downsampling operation in the encoding process through short connections; S43, inputting the cost amount of the corresponding size in the encoding process of the first hourglass module into the encoding process of the second hourglass module, and at the same time inputting the cost amount of the corresponding size in the encoding process of the first hourglass module into the encoding process of the third hourglass module, and then inputting the cost amount of the corresponding size in the encoding process of the second hourglass module into the encoding process of the third hourglass module; when encoding, the second hourglass module receives the supply of the information of the first hourglass module, and supplies this information to the encoding process of the third hourglass module; S44, the continuous encoding and decoding operations constitute a densely connected aggregation network of multi-scale cost volumes, continuously transmit corresponding information, and utilize the reuse of context information to output a cost volume with accurate pixel similarity information; S5. Restore the output cost volume to the original image size by upsampling operation, convert the original size cost volume obtained by upsampling into probability volume by using softmax function, and then calculate the predicted disparity value by using soft argmin function, output the predicted disparity map, and use Smooth L1 loss function to constrain the data in the network training process.

2. The binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse according to claim 1, characterized in that: In step S1, the left and right stereo images include a reference image and a target image.

3. The binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse according to claim 2, characterized in that: In the step S2, a weight-sharing residual network module is used to perform unary feature extraction on the reference image and the target image respectively, extract multi-level unary features, and construct corresponding unary feature volumes.

4. The binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse according to claim 3, characterized in that: The specific process of constructing the group-by-group SAD cost volume in step S3 is: dividing the unary feature volume into multiple groups along the channel dimension, and using the group-by-group SAD method to calculate the similarity of each group of features.

5. The binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse according to claim 4, characterized in that: The calculation formula of the group-by-group SAD cost is: Among them, d represents the disparity value, g represents a group, N c Indicates the number of channels, N g Indicates the number of groups, i=1,2,3,…N c / N g Represents the corresponding channel number.

6. The binocular stereo matching algorithm based on group-by-group SAD cost and feature reuse according to claim 1, characterized in that: The predicted disparity value in step S5 is obtained by the soft argmin function, and the formula is: Among them, d represents the disparity value, D represents the maximum disparity value, represents the predicted disparity, σ(·) represents the softmax function, and C d represents the cost amount; The Smooth L1 loss function is: In the formula, Among them, λ ω represents the likelihood value of the ω-th disparity prediction, represents the ground truth disparity value, represents the predicted disparity value, and x represents the difference between the predicted disparity value and the true disparity value.