CN113887624A - Improved feature stereo matching method based on binocular vision - Google Patents

Improved feature stereo matching method based on binocular vision Download PDF

Info

Publication number
CN113887624A
CN113887624A CN202111161114.0A CN202111161114A CN113887624A CN 113887624 A CN113887624 A CN 113887624A CN 202111161114 A CN202111161114 A CN 202111161114A CN 113887624 A CN113887624 A CN 113887624A
Authority
CN
China
Prior art keywords
point
pixel
points
feature
matching
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111161114.0A
Other languages
Chinese (zh)
Inventor
胡辽林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xian University of Technology
Original Assignee
Xian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xian University of Technology filed Critical Xian University of Technology
Priority to CN202111161114.0A priority Critical patent/CN113887624A/en
Publication of CN113887624A publication Critical patent/CN113887624A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an improved characteristic stereo matching method based on binocular vision, which comprises the steps of extracting characteristics of a preprocessed left image and a preprocessed right image, matching the characteristics, and screening to obtain accurate matching point pairs; the obtained sparse matching point pairs are used as seed points, a one-dimensional search space is established according to parallax continuity and polar constraint criteria, a fast zero-mean normalized cross-correlation coefficient simplified by an integral graph is used as a similarity measurement function, region growth is realized through a bidirectional matching strategy, matching accuracy is greatly improved, and algorithm complexity is reduced; the parallax precision is improved through sub-pixel fitting and weighted median filtering post-processing, and the phenomena of parallax step layering, noise and stripes are removed.

Description

Improved feature stereo matching method based on binocular vision
Technical Field
The invention belongs to the technical field of three-dimensional visual angles, and particularly relates to an improved characteristic stereo matching method based on binocular vision.
Background
Binocular stereo vision is a system that simulates the human visual system to construct the real world. The stereo matching is one of the core contents of binocular vision as the key of the technologies such as three-dimensional reconstruction, non-contact ranging and the like. The depth is acquired through the two-dimensional image, the method has the advantages of being simple to implement, low in cost, capable of measuring the distance under the non-contact condition and the like, can be used for navigation judgment and target pickup in a robot guidance system, can be used for part installation, quality detection and environment detection in an industrial automatic control system, and can be used for people stream detection, hazard alarm and the like in a security monitoring system.
The stereo matching method is divided into the following steps according to different matching elements and modes: the region matching is greatly influenced by affine and radiation distortion of an image, a constraint window is difficult to select, and mismatching is easy to generate at a discontinuous depth position; the feature matching is insensitive to the geometric transformation of the image, has strong anti-interference performance and small complexity, and has the defect that parallax results are sparse and need to pass the processes of interpolation, fitting and the like; the phase matching algorithm is very sensitive to rotation transformation and the singular point is unstable; the energy matching obtains the parallax by constructing a global energy function, cannot be used for a large deviation image, and has high complexity.
Binocular parallax is a depth cue, and when a stereoscopic icon is observed, the image positions are different due to the difference in viewing angle distance, so that a slight horizontal parallax is generated, which is called binocular parallax. And finding out the corresponding homonymous point of the image pair through matching, and then, the difference of the abscissa pixels among the homonymous points is called the parallax of the point. And describing the geometric relation between a plurality of projection points by a projection principle by means of a common area of the two images, and solving according to the characteristic information of the projection points. The final purpose of stereo matching is to obtain the parallax value of pixel points on an image by means of image processing and optimization theory knowledge; through years of research and accumulation, various excellent matching methods (such as global and local algorithms) continuously appear. A complete structural flow is needed for any matching algorithm, the matching process comprises correct registration features, correlation attributes among the features and stable construction, but the existing feature stereo matching method can only obtain sparse parallax, the poor texture matching rate is low, the parallax precision is insufficient, and the problems that the parallax continuous part is not smooth and is in a step shape are solved.
Disclosure of Invention
The invention aims to provide an improved characteristic stereo matching method based on binocular vision, which can improve the matching effect of a weak texture area and a depth discontinuity part and the overall parallax precision.
The invention adopts the technical scheme that a binocular vision-based improved characteristic stereo matching method is implemented according to the following steps:
step 1, collecting images of a certain object at different visual angles, and carrying out gray level processing on the two images to obtain two gray level images;
step 2, respectively carrying out feature extraction and feature matching on the two gray level images, and taking the successfully matched feature point pairs as seed point pairs;
step 3, performing parallax densification processing on the seed point pairs according to a parallax continuity criterion, and calculating parallax values of the seed point pairs after the parallax densification processing;
step 4, performing sub-pixel fitting processing on the parallax value to obtain a sub-pixel parallax value;
and 5, eliminating noise points and stripes in the sub-pixel parallax value by using weighted median filtering to obtain an accurate parallax value.
The invention is also characterized in that:
the specific process of performing gray scale processing on the two images in the step 1 is as follows:
converting the two view angle images into Gray level images through the process of weighted average of R, G and B components, using Gray (i, j) as the pixel value of the image after Gray level, wherein the Gray level pixel value of each view angle image is as follows:
Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j) (1)。
the specific process of the step 2 is as follows:
2.1, selecting any point on the gray level image, constructing a circle by taking the point as the center of the circle, and extracting pixel points meeting the formula (3) by utilizing image gray level difference detection around the features;
|I(p)-I(x)|<εd (3)
in formula (3), I (p) is the gray scale value of the center of the circle, I (x) is the gray scale value of the point on the circumference, epsilondIs a threshold value;
step 2.2, selecting a main direction of the feature point, taking the feature point as a center, the radius of the feature point is 6s, and s is a scale value of the feature point, constructing a circular field, counting Harr wavelet features in the horizontal direction and the vertical direction in the feature field, giving Gaussian weight to convolution response, obtaining the sum of the Haar wavelet responses in the horizontal direction and the vertical direction of all points in a 60-degree sector to obtain a vector, then performing rotation traversal, comparing to obtain the sector direction with the longest vector as the main direction of the feature point, after obtaining the main direction of the feature point, taking the main direction as an x axis, constructing a square region with the feature point as the center and the side length of 20s, dividing the square region into 4 × 4-16 sub-regions, and countingCalculating the Haar wavelet response of each subregion, and respectively recording the horizontal Haar wavelet response and the vertical Haar wavelet response as dx、dyCounting the sum of the responses of each sub-region and the sum of absolute values of the responses, and representing each sub-region as a four-dimensional feature vector V;
V=[∑dx,∑dy,∑|dx|,∑|dy|] (4)
and 2.3, realizing feature matching by adopting a FLANN-based K neighbor search algorithm, defining one image as a left image, defining the other image as a right image, searching for feature points of the left image, corresponding to nearest neighbor feature points and next nearest neighbor feature points of the right image, setting a threshold, and if the distance ratio of the nearest neighbor feature points to the next nearest neighbor feature points is not more than the threshold, receiving the matching point of the nearest neighbor and the feature points of the left image to form seed point pairs.
The method also comprises the step 2.4 of utilizing a random sampling consistency algorithm to carry out homography matrix mapping and eliminating mismatching, and specifically comprises the following steps:
utilizing a random sampling consistency algorithm to carry out homography matrix mapping to eliminate mismatching, randomly extracting 4 sample data from a seed point pair, wherein the samples cannot be collinear, taking the 4 sample data as interior points, calculating a transformation matrix H, testing other point pairs to estimate errors by using the transformation matrix H, setting a threshold, if the estimated errors are not greater than the set threshold, bringing the estimated errors into the interior points, otherwise, regarding the estimated errors as exterior points; carrying out iterative computation of the steps on the new inner points, and when the transformation matrix H is not changed or the iteration times are reached, obtaining the transformation matrix H which is the optimal parameter matrix;
the expression k for the number of iterations is expressed as:
Figure BDA0003289981980000041
in the formula (5), k is iteration number, p is confidence coefficient, 0.995 is taken, w is the proportion of newly-increased interior points, and m is the minimum sample number of the calculation matrix;
and (4) mapping the seed point pairs obtained in the step 2.3 through the optimal parameter matrix, and removing points without mapping relation.
The specific process of the step 3 is as follows:
taking seed point pairs on a left image and a right image as homonymous points, knowing that a homonymous point P of a left image is Q on the right image, according to parallax continuity constraint, searching eight points adjacent to the Q point, wherein the homonymous point of a certain point P1 in eight adjacent domains adjacent to the P point is necessarily near the Q point, according to an epipolar constraint criterion, namely the corresponding homonymous points are on the same polar line, firstly matching from left to right, if the homonymous point obtained after matching of the left image P1 is a right image Q1, matching from right to left by using Q1, and if the homonymous point in reverse matching is also P1, taking P1 and Q1 as a correct seed point pair, calculating the parallax of the correct seed point pair and bringing the correct seed point pair into a new seed point pair.
The specific process of the step 4 is as follows:
step 4.1, taking a certain same name point on the two gray level images as a target pixel, setting the size of a search window as W, searching the peripheral features of the target pixel, and calculating the matching cost of the target pixel and the peripheral features;
4.2, selecting a target pixel with the minimum matching cost, and calculating an integral pixel parallax value corresponding to the target pixel;
step 4.3, solving the matching cost corresponding to the adjacent pixel of the target pixel and the integer pixel parallax value corresponding to the adjacent pixel, and performing unitary quadratic curve fitting on the target pixel and the adjacent pixel by taking the integer pixel parallax value as an abscissa and the matching cost as an ordinate to obtain a fitting curve;
step 4.4, calculating the abscissa of the extreme point of the fitting curve to obtain the parallax value d of the sub-pixel levelsub
The specific process of the step 5 is as follows:
step 5.1, setting a filtering window, and establishing a combined histogram according to the gray value of a pixel point in the filtering window;
step 5.2, elements in the histogram represent the number of pixels of a certain characteristic value corresponding to a certain gray value in a window, association is established according to the affinity of the pixel points and the center point of the window and the weight, and the association function adopts a Gaussian function;
step 5.3, counting the weight sum of any gray value in the window;
and 5.4, accumulating and summing the total weight values of all gray values in the window, wherein the gray value of a pixel corresponding to half of the total sum is the median result of weighted median filtering, and a stereo matching result is obtained.
And 6, searching pixel points which are not zero in gray value of the shielding region point on the gray map in the four neighborhood directions and have the closest distance through traversal, comparing the gray values of the four closest pixel points, and selecting the pixel with the minimum gray value to replace the pixel of the shielded point or the hole point in the center.
The invention has the beneficial effects that:
(1) dense parallax can be obtained by realizing a small number of matching point pairs, and the defect that only a sparse parallax image can be obtained by feature matching is effectively overcome;
(2) by utilizing various constraint conditions and a bidirectional matching strategy, the accuracy of overall matching is improved, the matching effect of a weak texture region and a depth discontinuity part is enhanced, the calculation is simplified by utilizing an integral map, so that the redundancy process is reduced, the algorithm complexity is greatly reduced, and the parallax precision is improved by performing refinement post-processing while three-dimensional matching is performed; meanwhile, the method has stronger robustness.
Drawings
FIG. 1 is a flow chart of the improved binocular vision based feature stereo matching method of the present invention;
FIG. 2(a) is a feature matching result;
FIG. 2(b) shows the matching result after eliminating the mismatch;
FIG. 3 is a schematic diagram of region growing in accordance with an embodiment of the present invention;
FIG. 4 is a diagram of a search window according to an embodiment of the present invention;
FIG. 5 is a diagram illustrating the calculation of target area values of an integral map according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of curve fitting according to an embodiment of the present invention;
FIG. 7 is a comparison of the results of the refinement process of the disparity map according to the embodiment of the present invention;
FIG. 7(a) is an unprocessed image;
FIG. 7(b) is the median filtering result;
FIG. 7(c) shows the results of the process of the present invention;
FIG. 8(a) is an original left image of four groups of images selected by the present invention;
FIG. 8(b) is the original right image of four selected groups of images according to the present invention;
FIG. 8(c) is a left image obtained by graying four selected groups of images according to the present invention;
FIG. 8(d) is a right image obtained by graying four selected groups of images according to the present invention;
fig. 9(a) is a disparity map of the NCC method;
FIG. 9(b) is a parallax map of the BM method;
FIG. 9(c) is a disparity map of the SGBM method;
FIG. 9(d) is a disparity map of the DP method;
FIG. 9(e) is a disparity map of the method of the present invention;
fig. 10(a) is another original left image, Sawtooth;
FIG. 10(b) is an increase of 50cd/m2An original right image of luminance;
fig. 10(c) is a disparity map obtained by the method of the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
The invention discloses an improved characteristic stereo matching method based on binocular vision, and aims to solve the problems that only sparse parallax can be obtained by the characteristic stereo matching method, the matching rate of weak texture is low, the parallax continuity part is not smooth and is stepped due to insufficient parallax precision and the like. Finally, the parallax with higher accuracy and density is obtained, and the matching effect of the weak texture area and the depth discontinuity position and the integral parallax precision are improved; meanwhile, the method has strong robustness, can inhibit the influence of certain brightness difference and noise, and is implemented according to the following steps:
as shown in fig. 1:
1) image preprocessing:
acquiring images of a certain object at different visual angles, carrying out Gray level processing on the two images to obtain two Gray level images, converting the two visual angle images into Gray level images through a R, G and B component weighted average process, using Gray (i, j) as a pixel value after the images are grayed, wherein the grayed pixel value of each visual angle image is as follows:
Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j) (1);
the human eye has high sensitivity to green and low sensitivity to blue, and the weight parameters corresponding to the components are generally set to 0.229, 0.578 and 0.114.
In image capturing, the imaging quality of an image is affected due to interference of various factors. The gray level transformation aims to make more space for important image features, and when important textures in an image are not clear enough due to insufficient contrast, non-important information is contained, and contrast of a desired part is widened. The original image pixel f (i, j), the processed pixel g (i, j) of equation (2),
Figure BDA0003289981980000081
Figure BDA0003289981980000082
2) feature extraction and matching
Selecting any point on the gray level image, constructing a circle by taking the point as the center of the circle, and extracting pixel points satisfying the formula (3) by utilizing image gray level difference detection around the characteristics;
|I(p)-I(x)|<εd (3)
in formula (3), I (p) is the gray scale value of the center of the circle, I (x) is the gray scale value of the point on the circumference, epsilondIs a threshold value;
selecting the main direction of the feature point, taking the feature point as the center, the radius of the feature point is 6s, s is the scale value of the feature point, constructing a circular field, counting Harr wavelet features in the horizontal direction and the vertical direction in the feature field, giving Gaussian weight to convolution response, obtaining the sum of the Haar wavelet responses in the horizontal direction and the vertical direction of all points in a 60-degree sector to obtain a vector, then performing rotation traversal, and comparing to obtain the sector direction with the longest vector as the feature pointThe main direction of the characteristic point is obtained, the main direction is taken as an x axis, a square area with the characteristic point as the center and the side length of 20s is built, the square area is divided into 16 sub-areas with 4 multiplied by 4, the Haar wavelet response of each sub-area is calculated, and the horizontal and vertical Haar wavelet responses are respectively marked as dx、dyCounting the sum of the responses of each sub-region and the sum of absolute values of the responses, and representing each sub-region as a four-dimensional feature vector V;
V=[∑dx,∑dy,∑|dx|,∑|dy|] (4)
the method comprises the steps of realizing feature matching by adopting a FLANN-based K neighbor search algorithm, defining one image as a left image, defining the other image as a right image, searching for feature points of the left image corresponding to nearest neighbor feature points and next neighbor feature points of the right image, setting a threshold, and if the distance ratio of the nearest neighbor to the next neighbor is not greater than the threshold, receiving the matching point of the nearest neighbor and the feature points of the left image to form seed point pairs, wherein the matching result of the embodiment of the invention is shown in fig. 2 (a).
The random sampling consistency algorithm is utilized to carry out homography matrix mapping elimination mismatching, and the method specifically comprises the following steps:
utilizing a random sampling consistency algorithm to carry out homography matrix mapping to eliminate mismatching, randomly extracting 4 sample data from a seed point pair, wherein the samples cannot be collinear, taking the 4 sample data as interior points, calculating a transformation matrix H, testing other point pairs to estimate errors by using the transformation matrix H, setting a threshold, if the estimated errors are not greater than the set threshold, bringing the estimated errors into the interior points, otherwise, regarding the estimated errors as exterior points; carrying out iterative computation of the steps on the new inner points, and when the transformation matrix H is not changed or the iteration times are reached, obtaining the transformation matrix H which is the optimal parameter matrix;
the expression k for the number of iterations is expressed as:
Figure BDA0003289981980000091
in the formula (5), k is iteration number, p is confidence coefficient, 0.995 is taken, w is the proportion of newly-increased interior points, and m is the minimum sample number of the calculation matrix;
the seed point pairs are mapped through the optimal parameter matrix, and points without mapping relation are removed, and the removal result of the embodiment of the invention is shown in fig. 2 (b).
As can be seen from the results of fig. 2(a) and 2(b), the feature points detected by the post-preprocessing FAST algorithm are more comprehensive, and a uniform feature point matching result is obtained.
3) Parallax thickening
The accurate sparse point pairs subjected to feature matching are used as seed points, more points are merged into the seed points according to the principle of parallax continuity to perform parallax densification, and matching speed and accuracy are greatly improved.
As shown in fig. 3, the seed point pairs on the left image and the right image are used as the homonymous points, the homonymous point P of a certain point P of the left image on the right image is known as Q, according to the parallax continuity constraint, the homonymous point of a certain point P1 in the eight adjacent domains of the point P is necessarily near the point Q, eight adjacent points of the point Q are searched, and according to the epipolar constraint criterion, that is, the corresponding homonymous points are all on the same polar line, the search range is reduced from two dimensions to one dimension (three points), so that the matching complexity is reduced and the accuracy is improved. Firstly, matching from left to right, if the homonymous point obtained after matching of the left image P1 is a right image Q1, then matching from right to left by using Q1, and if the homonymous point matched reversely is also P1, then taking P1 and Q1 as a pair of correct seed point pairs, calculating the disparity of the correct seed point pairs and incorporating the disparity into a new seed point pair.
Taking a certain homonymous point on the two gray-scale images as a target pixel, setting the size of a search window as W, searching features around the target pixel, and setting the search window around the target pixel to calculate matching cost as shown in figure 4 (taking 4 multiplied by 4):
Figure BDA0003289981980000101
w in equation (6) represents the search window size,
Figure BDA0003289981980000102
representing the left and right images by xL、xRMean gray value of the search window W centered on IL(xL+i)、IR(xR+ i) is x for each of the left and right imagesL、xRThe gray value of the point within the search window W at the center.
The zero-mean normalization function is used for calculating the matching cost to repeatedly obtain the mean value of the gray values of the matching window, the process is complex, the complexity of the calculation of the matching cost is high, the calculation is simplified by converting the mean value to obtain an expression (7), the calculation is simplified by utilizing an integral graph, the redundancy steps are reduced to a great extent, and the matching time is reduced.
Figure BDA0003289981980000103
Formula (7)
Figure BDA0003289981980000104
And respectively representing the sum of gray values of all pixel points in the two image searching windows and the sum of squares of the gray values.
The integral image is generated by a common digital image, the size of the integral image is equal to that of the original image, and each pixel point stores the sum of gray values or the square sum of the gray values of a rectangular range determined by the upper left corner of the original image and the current pixel point. S (x, y) represents the sum of gray values of all pixel points in the original image window, (x, y) is the central point of the search window, J is the gray value of the corresponding point in the integral image, and the search radius k is 2.
As shown in fig. 5, can be obtained
Figure BDA0003289981980000111
After the improved region growing stereo matching, the invention not only makes up the defect that the feature point matching can only obtain sparse parallax, but also obtains a parallax image with better matching effect. At this time, the initial disparity map still has some problems, such as noise points, precision and the like, and further refinement processing is needed to optimize and correct the disparity map, so that a result with higher accuracy and better effect is obtained.
4) Refining treatment
Sub-pixel fitting processing is carried out on the parallax value to obtain sub-pixel parallax, so that parallax precision is improved, and transition of a parallax continuous area is smooth; the specific process is as follows:
selecting the minimum matching cost c0Calculating a whole pixel parallax value d corresponding to the target pixel;
finding the minimum matching cost c0Disparity matching cost c of corresponding pixels on the left and right sides1、c2And integer pixel disparity values d corresponding to adjacent pixels-1、d+1And performing unary quadratic curve fitting on the target pixel and the adjacent pixels by using the integer pixel parallax value as an abscissa and the matching cost as an ordinate to obtain a fitting curve, as shown in fig. 6.
Calculating the abscissa of the extreme point of the fitting curve to obtain the parallax value d of the sub-pixel levelsubThereby achieving the purpose of improving the parallax precision.
The method for eliminating noise points and stripes by adopting 5 multiplied by 5 weighted median filtering to prevent edge blurring specifically comprises the following steps: setting a filtering window of 5 multiplied by 5, and establishing a combined histogram according to the gray value of pixel points in the filtering window;
the elements in the histogram represent the number of pixels of a certain characteristic value corresponding to a certain gray value in a window, the abscissa of the histogram is the gray value, the ordinate is the certain characteristic value, the characteristic value can select brightness, gray value and the like, in the invention, the characteristic value is the gray value, the association is established according to the affinity of the pixel point and the center point of the window and the weight, and the association function adopts a Gaussian function;
counting the weight sum of any gray value in the window (namely the product sum of all elements in the histogram and the gray value weight corresponding to the elements in the histogram when the same gray value exists);
and accumulating and summing the total weight values of all gray values in the window, wherein the gray value of the pixel corresponding to half of the total is the median result of weighted median filtering, and a stereo matching result is obtained.
Filling the holes and the occlusion areas through a neighborhood disparity estimation algorithm, wherein the occlusion areas are generally close to the background part, and specifically comprise the following steps:
and traversing to find pixel points of the shielding region points on the gray map, wherein the gray values of the pixel points are not zero and are closest to the pixel points in the four neighborhood directions, comparing the gray values of the four closest pixel points, and selecting the pixel with the minimum gray value to replace the pixel of the shielded point or the hole point at the center.
Fig. 7 is a variation diagram of the refinement processing result of the disparity map in the embodiment of the present invention, where the unprocessed image in the enlarged region is shown in fig. 7(a), the median filtering result is shown in fig. 7(b), and the final processing result is shown in fig. 7(c), it can be seen that after sub-pixel enhancement and weighted median filtering processing, the transition of the disparity continuous region becomes smooth and gradual, noise fringes and a layering phenomenon caused by insufficient disparity precision are eliminated, and the precision requirement of disparity is satisfied. And occlusion areas and hollow points in the image are filled by a neighborhood parallax estimation value method, and the image is denser and considerable.
Selecting four groups of original images: venus, Bull, Conses, Teddy.
FIG. 8(a) is an original left image of four groups of images selected by the present invention; fig. 8(b) an original right image of four groups of images selected by the present invention, fig. 8(c) a left image obtained by graying four groups of images selected by the present invention, and fig. 8(d) a right image obtained by graying four groups of images selected by the present invention. The feature detection and matching results of the four sets of original left and right images are shown in table 1.
TABLE 1
Figure BDA0003289981980000131
The images in fig. 8(a) and 8(b) are processed by the following five methods to obtain disparity maps, which are respectively: NCC, BM, SGBM, DP and the method of the invention, wherein the disparity map of the NCC method is shown in fig. 9(a), the disparity map of the BM method is shown in fig. 9(b), the disparity map of the SGBM method is shown in fig. 9(c), the disparity map of the DP method is shown in fig. 9(d), and the processing result of the invention is shown in fig. 9 (e).
The error rates of the disparity maps obtained by the various methods are shown in table 2;
TABLE 2
Figure BDA0003289981980000132
As can be seen from the comparison results of fig. 9(a) -9 (e) and table 2, the matching effect of the other four stereo matching methods on edge details is poor, and more noise points and holes are generated; the accuracy of the NCC and DP algorithms has large defects, a large number of stripe regions and large-area texture errors occur, and the depth discontinuous region matching effect of the BM and SGBM algorithms is not ideal. According to the method, accuracy improvement and integral precision optimization of the depth discontinuous area are comprehensively considered, the obtained parallax result is better, the detail texture of the edge and the smoothness of the continuous area can be ensured during stereo matching, noise, stripes and shielding areas are removed, and the precision of the parallax map is improved.
In addition, the original left image Sawtoth shown in FIG. 10(a) is taken and added with 50cd/m to the right image thereof2The luminance is shown in fig. 10(b), and the parallax obtained by the method of the present invention is shown in fig. 10 (c).
The accuracy of the disparity map obtained by processing the original right image with different brightness by the method of the invention is shown in table 3.
TABLE 3
Figure BDA0003289981980000141
As can be seen from fig. 10(c) and table 3, the luminance difference between the left and right images is changed, and the left and right images with different luminance can still be matched to obtain the parallax in this method, and the parallax map maintains good quality, and the images are clear and dense without the phenomenon of region mismatching.
In the embodiment of the invention, the improved characteristic stereo matching method based on binocular vision is adopted, the characteristics of the preprocessed left and right images are extracted and subjected to characteristic matching, and then accurate matching point pairs are obtained through screening; the obtained sparse matching point pairs are used as seed points, a one-dimensional search space is established according to parallax continuity and polar constraint criteria, a fast zero-mean normalized cross-correlation coefficient simplified by an integral graph is used as a similarity measurement function, region growth is realized through a bidirectional matching strategy, matching accuracy is greatly improved, and algorithm complexity is reduced; the parallax precision is improved through sub-pixel fitting and weighted median filtering post-processing, and the phenomena of parallax step layering, noise and stripes are removed.

Claims (8)

1. An improved feature stereo matching method based on binocular vision is characterized by comprising the following steps:
step 1, collecting images of a certain object at different visual angles, and carrying out gray level processing on the two images to obtain two gray level images;
step 2, respectively carrying out feature extraction and feature matching on the two gray level images, and taking the successfully matched feature point pairs as seed point pairs;
step 3, performing parallax densification processing on the seed point pairs according to a parallax continuity criterion, and calculating parallax values of the seed point pairs after the parallax densification processing;
step 4, performing sub-pixel fitting processing on the parallax value to obtain a sub-pixel parallax value;
and 5, eliminating noise points and stripes in the sub-pixel parallax value by using weighted median filtering to obtain an accurate parallax value.
2. The binocular vision-based improved feature stereo matching method according to claim 1, wherein the specific process of performing gray scale processing on the two images in the step 1 is as follows:
converting the two view angle images into Gray level images through the process of weighted average of R, G and B components, using Gray (i, j) as the pixel value of the image after Gray level, wherein the Gray level pixel value of each view angle image is as follows:
Gray(i,j)=0.299*R(i,j)+0.578*G(i,j)+0.114*B(i,j) (1)。
3. the binocular vision-based improved feature stereo matching method according to claim 1, wherein the specific process of the step 2 is as follows:
2.1, selecting any point on the gray level image, constructing a circle by taking the point as the center of the circle, and extracting pixel points meeting the formula (3) by utilizing image gray level difference detection around the features;
|I(p)-I(x)|<εd (3)
in formula (3), I (p) is the gray scale value of the center of the circle, I (x) is the gray scale value of the point on the circumference, epsilondIs a threshold value;
step 2.2, selecting a principal direction of the feature point, taking the feature point as a center, the radius of the feature point is 6s, and s is a scale value of the feature point, constructing a circular field, counting Harr wavelet features in the horizontal direction and the vertical direction in the feature field, giving Gaussian weight to convolution response, obtaining the sum of the Haar wavelet responses in the horizontal direction and the vertical direction of all points in a 60-degree sector to obtain a vector, then performing rotation traversal, comparing to obtain the sector direction with the longest vector as the principal direction of the feature point, after obtaining the principal direction of the feature point, taking the principal direction as an x axis, constructing a square region with the feature point as the center and the side length of 20s, dividing the square region into 4 × 4 to 16 sub-regions, calculating the Haar wavelet response of each sub-region, and respectively recording the horizontal Haar wavelet response and the vertical Haar wavelet response as dx、dyCounting the sum of the responses of each sub-region and the sum of absolute values of the responses, and representing each sub-region as a four-dimensional feature vector V;
V=[∑dx,∑dy,∑|dx|,∑|dy|] (4)
and 2.3, realizing feature matching by adopting a FLANN-based K neighbor search algorithm, defining one image as a left image, defining the other image as a right image, searching for feature points of the left image, corresponding to nearest neighbor feature points and next nearest neighbor feature points of the right image, setting a threshold, and if the distance ratio of the nearest neighbor feature points to the next nearest neighbor feature points is not more than the threshold, receiving the matching point of the nearest neighbor and the feature points of the left image to form seed point pairs.
4. The binocular vision-based improved feature stereo matching method according to claim 3, further comprising the step 2.4 of performing homography matrix mapping by using a random sampling consistency algorithm to eliminate mismatching, specifically comprising the steps of:
utilizing a random sampling consistency algorithm to carry out homography matrix mapping to eliminate mismatching, randomly extracting 4 sample data from a seed point pair, wherein the samples cannot be collinear, taking the 4 sample data as interior points, calculating a transformation matrix H, testing other point pairs to estimate errors by using the transformation matrix H, setting a threshold, if the estimated errors are not greater than the set threshold, bringing the estimated errors into the interior points, otherwise, regarding the estimated errors as exterior points; carrying out iterative computation of the steps on the new inner points, and when the transformation matrix H is not changed or the iteration times are reached, obtaining the transformation matrix H which is the optimal parameter matrix;
the expression k for the number of iterations is expressed as:
Figure FDA0003289981970000031
in the formula (5), k is iteration number, p is confidence coefficient, 0.995 is taken, w is the proportion of newly-increased interior points, and m is the minimum sample number of the calculation matrix;
and (4) mapping the seed point pairs obtained in the step 2.3 through the optimal parameter matrix, and removing points without mapping relation.
5. The binocular vision-based improved feature stereo matching method according to claim 1, wherein the specific process of the step 3 is as follows:
taking seed point pairs on a left image and a right image as homonymous points, knowing that a homonymous point P of a left image is Q on the right image, according to parallax continuity constraint, searching eight points adjacent to the Q point, wherein the homonymous point of a certain point P1 in eight adjacent domains adjacent to the P point is necessarily near the Q point, according to an epipolar constraint criterion, namely the corresponding homonymous points are on the same polar line, firstly matching from left to right, if the homonymous point obtained after matching of the left image P1 is a right image Q1, matching from right to left by using Q1, and if the homonymous point in reverse matching is also P1, taking P1 and Q1 as a correct seed point pair, calculating the parallax of the correct seed point pair and bringing the correct seed point pair into a new seed point pair.
6. The binocular vision-based improved feature stereo matching method according to claim 1, wherein the specific process of the step 4 is as follows:
step 4.1, taking a certain same name point on the two gray level images as a target pixel, setting the size of a search window as W, searching the peripheral features of the target pixel, and calculating the matching cost of the target pixel and the peripheral features;
4.2, selecting a target pixel with the minimum matching cost, and calculating an integral pixel parallax value corresponding to the target pixel;
step 4.3, solving the matching cost corresponding to the adjacent pixel of the target pixel and the integer pixel parallax value corresponding to the adjacent pixel, and performing unitary quadratic curve fitting on the target pixel and the adjacent pixel by taking the integer pixel parallax value as an abscissa and the matching cost as an ordinate to obtain a fitting curve;
step 4.4, calculating the abscissa of the extreme point of the fitting curve to obtain the parallax value d of the sub-pixel levelsub
7. The binocular vision-based improved feature stereo matching method according to claim 6, wherein the specific process of the step 5 is as follows:
step 5.1, setting a filtering window, and establishing a combined histogram according to the gray value of a pixel point in the filtering window;
step 5.2, elements in the histogram represent the number of pixels of a certain characteristic value corresponding to a certain gray value in a window, association is established according to the affinity of the pixel points and the center point of the window and the weight, and the association function adopts a Gaussian function;
step 5.3, counting the weight sum of any gray value in the window;
and 5.4, accumulating and summing the total weight values of all gray values in the window, wherein the gray value of a pixel corresponding to half of the total sum is the median result of weighted median filtering, and a stereo matching result is obtained.
8. The binocular vision-based improved feature stereo matching method according to claim 1, further comprising a step 6 of searching pixel points with non-zero gray values and closest distances in four neighborhood directions of a shielding region point on a gray map through traversal, comparing the gray values of the four closest pixel points, and selecting a pixel with the minimum gray value to replace a pixel with a center shielded point or a hole point.
CN202111161114.0A 2021-09-30 2021-09-30 Improved feature stereo matching method based on binocular vision Pending CN113887624A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111161114.0A CN113887624A (en) 2021-09-30 2021-09-30 Improved feature stereo matching method based on binocular vision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111161114.0A CN113887624A (en) 2021-09-30 2021-09-30 Improved feature stereo matching method based on binocular vision

Publications (1)

Publication Number Publication Date
CN113887624A true CN113887624A (en) 2022-01-04

Family

ID=79004798

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111161114.0A Pending CN113887624A (en) 2021-09-30 2021-09-30 Improved feature stereo matching method based on binocular vision

Country Status (1)

Country Link
CN (1) CN113887624A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115797439A (en) * 2022-11-11 2023-03-14 中国消防救援学院 Flame space positioning system and method based on binocular vision
CN116665034A (en) * 2022-11-11 2023-08-29 中国消防救援学院 Three-dimensional matching and flame space positioning method based on edge characteristics
WO2023179459A1 (en) * 2022-03-24 2023-09-28 张国流 Three-dimensional reconstruction method and device based on bionic stereo vision, and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023179459A1 (en) * 2022-03-24 2023-09-28 张国流 Three-dimensional reconstruction method and device based on bionic stereo vision, and storage medium
CN115797439A (en) * 2022-11-11 2023-03-14 中国消防救援学院 Flame space positioning system and method based on binocular vision
CN116665034A (en) * 2022-11-11 2023-08-29 中国消防救援学院 Three-dimensional matching and flame space positioning method based on edge characteristics
CN116665034B (en) * 2022-11-11 2023-10-31 中国消防救援学院 Three-dimensional matching and flame space positioning method based on edge characteristics

Similar Documents

Publication Publication Date Title
CN110569704B (en) Multi-strategy self-adaptive lane line detection method based on stereoscopic vision
CN106910242B (en) Method and system for carrying out indoor complete scene three-dimensional reconstruction based on depth camera
CN109961506B (en) Local scene three-dimensional reconstruction method for fusion improved Census diagram
CN113887624A (en) Improved feature stereo matching method based on binocular vision
CN104484648B (en) Robot variable visual angle obstacle detection method based on outline identification
CN110807809B (en) Light-weight monocular vision positioning method based on point-line characteristics and depth filter
CN108596975B (en) Stereo matching algorithm for weak texture region
CN107301664A (en) Improvement sectional perspective matching process based on similarity measure function
Lo et al. Joint trilateral filtering for depth map super-resolution
CN116309757B (en) Binocular stereo matching method based on machine vision
CN108876861B (en) Stereo matching method for extraterrestrial celestial body patrolling device
CN109559273B (en) Quick splicing method for vehicle bottom images
CN108010075B (en) Local stereo matching method based on multi-feature combination
CN107103610B (en) automatic detection method for suspicious region matched with satellite images in stereo mapping
CN115147709B (en) Underwater target three-dimensional reconstruction method based on deep learning
CN109658366A (en) Based on the real-time video joining method for improving RANSAC and dynamic fusion
Abd Manap et al. Disparity refinement based on depth image layers separation for stereo matching algorithms
CN111652790A (en) Sub-pixel image registration method
Chen et al. A color-guided, region-adaptive and depth-selective unified framework for Kinect depth recovery
Zhang et al. Local stereo matching: An adaptive weighted guided image filtering-based approach
Shen et al. Depth map enhancement method based on joint bilateral filter
CN117456114A (en) Multi-view-based three-dimensional image reconstruction method and system
CN117292076A (en) Dynamic three-dimensional reconstruction method and system for local operation scene of engineering machinery
CN116878524A (en) Dynamic SLAM dense map construction method based on pyramid L-K optical flow and multi-view geometric constraint
CN114199205B (en) Binocular Ranging Method Based on Improved Quadtree ORB Algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination