A parallax imaging conversion method
By constructing feature point gradient information and matching degree in the disparity imaging transformation method, the matching problems of texture lack and occluded areas in traditional methods are solved, thereby improving the generation accuracy and efficiency of disparity maps.
Patent Information
- Application Number
- CN202511278957.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-09
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2045-09-09
AI Technical Summary
Traditional parallax imaging conversion methods tend to have poor matching efficiency and accuracy in areas with lack of texture, repetitive textures, and occluded areas, which affects the accuracy and efficiency of parallax map generation.
By acquiring the feature points and main directions of the feature points in the left and right views, gradient information richness is constructed. Combining the matching degree and reference degree between feature points, the correspondence degree of pixel points is calculated to generate a disparity map.
It improves the accuracy and efficiency of stereo matching, reduces the mismatch rate in sparse texture areas, and enhances the generation quality of disparity maps.
Smart Images

Figure CN121012918B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of parallax imaging conversion technology, and specifically to a parallax imaging conversion method. Background Technology
[0002] In the field of stereo vision, disparity imaging transformation relies on disparity maps generated by a binocular camera system. Stereo matching is the core step in disparity map generation. Traditional methods typically employ local window matching algorithms: defining a neighborhood window for the target pixel in the left view, calculating the sum of the absolute differences in grayscale values between the target pixel and the candidate window in the right view, determining the matching point based on the maximum similarity, and calculating the disparity.
[0003] However, this matching process is susceptible to the effects of areas lacking texture, repeated textures, and occluded areas, resulting in poor matching efficiency and accuracy, which affects the accuracy and efficiency of disparity map generation in disparity imaging conversion. Summary of the Invention
[0004] To address the aforementioned technical problems, this application provides a parallax imaging conversion method to solve the existing issues.
[0005] The parallax imaging conversion method of this application adopts the following technical solution:
[0006] One embodiment of this application provides a parallax imaging conversion method, which includes the following steps:
[0007] Obtain grayscale images of the target scene in the left and right directions, denoted as the left view and the right view, respectively;
[0008] Feature points and their main directions in the left and right views are obtained through feature detection algorithms; gradient information richness of each feature point is constructed based on the gray-level differences of pixels in the neighborhood of each feature point.
[0009] Obtain the lines connecting each feature point to its preset number of neighboring feature points; based on the differences in feature parameters between all the lines corresponding to each feature point in the left view and all the lines corresponding to each feature point in the right view, combined with the differences in the main directions between each feature point in the left view and each feature point in the right view, as well as the differences in gradient information richness, construct the matching degree between each feature point in the left view and each feature point in the right view.
[0010] Based on the matching degree, the matching point of each feature point in another view is determined, and the reference degree between each feature point and its matching point is calculated by combining the gradient information richness.
[0011] Take any pixel in any view as the target pixel and any pixel in another view as the pixel to be matched; take the matching points of each neighboring feature point of the target pixel in the other view as the corresponding matching feature points of the pixel to be matched.
[0012] Obtain the lines connecting the target pixel to its neighboring feature points, and the lines connecting the pixel to be matched to its corresponding matching feature points; based on the difference in feature parameters between the lines corresponding to the target pixel and the lines corresponding to the pixel to be matched, and the difference in grayscale distribution within the local window of the target pixel and the local window of the pixel to be matched, and in conjunction with the reference degree, calculate the correspondence between the target pixel and the pixel to be matched.
[0013] Based on the correspondence, the matching pixel of the target pixel is obtained; based on the horizontal coordinate difference between the target pixel and its matching pixel, a disparity map is obtained, and a view transformation is performed to obtain a new visual image.
[0014] In one embodiment, the process of obtaining the gradient information richness is as follows:
[0015] In the formula, Let represent the gradient information richness of feature point q, where y represents the number of pixels in the neighborhood of feature point q whose grayscale value differs from that of feature point q; and Y represents the number of pixels in the neighborhood of feature point q. This represents the gray value of the i-th pixel in the neighborhood of feature point q; This represents the gray value of feature point q.
[0016] In one embodiment, the process of obtaining the matching degree is as follows:
[0017] The approximation of the distribution of neighboring feature points between feature point q and feature point w is constructed based on the difference in feature parameters between all the connecting lines corresponding to any feature point q in the left view and all the connecting lines corresponding to any feature point w in the right view.
[0018] The difference between the gradient information richness of feature point q and feature point w is calculated and denoted as the first difference. The normalized value of the angle between the principal directions of feature point q and feature point w is calculated. The approximation of the distribution of neighboring feature points is used as the numerator, and the product of the first difference and the normalized value is added to a preset minimum positive number as the denominator. The calculated ratio is used as the matching degree between feature point q and feature point w.
[0019] In one embodiment, the process of obtaining the approximation of the distribution of neighboring feature points is as follows:
[0020] The line segment obtained by connecting each feature point with its m-th neighboring feature point is used as the angle between the line segment and the preset 0° axis as the angle between the m-th line segment connecting each feature point; the length of the line segment is used as the distance between the m-th line segment connecting each feature point.
[0021] The approximation degree of the distribution of the nearest feature points is denoted as... , The expression is:
[0022] In the formula, M is the number of neighboring feature points of any feature point; This represents the normalized value of the absolute value of the difference between the angle between the m-th line connecting feature point q and the m-th line connecting feature point w. This represents the absolute value of the difference between the distance of the m-th line connecting feature point q and the distance of the m-th line connecting feature point w. It is a preset minimum positive number.
[0023] In one embodiment, the matching point is the feature point with the highest matching degree among all feature points in another view.
[0024] In one embodiment, the process of obtaining the reference degree is as follows:
[0025] Multiply the matching degree between each feature point and its matching point by the gradient information richness of each feature point to obtain the reference degree of each feature point.
[0026] In one embodiment, the process of obtaining the correspondence degree is as follows:
[0027] Based on the difference in feature parameters between the corresponding line of the target pixel and the corresponding line of the pixel to be matched, the neighborhood feature matching degree between the target pixel and the pixel to be matched is calculated in combination with the reference degree.
[0028] The reciprocal of the sum of the absolute differences between the local window of the target pixel and the local window of the pixel to be matched in the right view is calculated and denoted as the first reciprocal. The correspondence between the target pixel and the pixel to be matched is determined based on the neighbor feature matching degree and the first reciprocal.
[0029] In one embodiment, the expression for the proximity feature matching degree is:
[0030]
[0031] In the formula, B is the matching degree of the neighbor features between the target pixel and the pixel to be matched; U represents the number of neighbor feature points of the target pixel; This represents the reference degree of the u-th neighboring feature point of the target pixel; This represents the spatial distance between the target pixel and its u-th neighboring feature point; It represents the normalized value of the absolute value of the calculated result by subtracting the angle between the line connecting the target pixel and its u-th neighboring feature point and the line connecting the pixel to be matched x and its u-th counterpart matching feature point. This represents the absolute value of the result obtained by subtracting the distance between the target pixel and its u-th neighboring pixel from the distance between the pixel to be matched and its u-th matching feature point. It is an exponential function with the natural constant e as its base.
[0032] In one embodiment, the correspondence degree is the product of the neighbor feature matching degree and the first reciprocal.
[0033] In one embodiment, the process of obtaining the matching pixel is as follows:
[0034] Among all the pixels to be matched for the target pixel, select the pixel with the highest correspondence to the target pixel as the matching pixel for the target pixel.
[0035] This application has at least the following beneficial effects:
[0036] This application acquires feature points in the left and right views of a scene, analyzes grayscale changes in the neighborhood of each feature point to construct the gradient information richness of the feature points, and obtains the matching degree between each feature point in the left view and each feature point in the right view based on the differences in the local distribution of feature points in different views and the gradient information richness. This quantifies the intensity of gradient changes in the neighborhood of each feature point, effectively distinguishing strong representative features from invalid noise points and avoiding noise interference. Furthermore, it obtains the matching degree points and corresponding matching degrees of each feature point in the left view in the right view as reference degrees for each feature point, used to analyze the referenceability of matching results when matching subsequent pixels, improving matching accuracy and significantly enhancing stereo matching performance. When matching each pixel with pixels in another view, it constructs the spatial distribution features of each pixel and its neighboring feature points through angle and distance, enhances the uniqueness of matching by analyzing the similarity of the distribution features with neighboring feature points, and solves the problem of ambiguity in repeated textures. It also introduces a reference degree weighting mechanism, dynamically allocating reference weights based on the gradient richness and matching degree of feature points, making pixel matching in sparse texture areas more dependent on high-confidence feature points and reducing the mismatch rate in occluded areas. First, high-confidence feature point matching is performed. Then, the corresponding degree calculation guided by neighboring feature points is used to quickly locate the matching position of non-feature pixels, reducing redundant calculations. This improves the matching accuracy and efficiency of pixels, thereby improving the quality of disparity map generation. Attached Figure Description
[0037] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0038] Figure 1 A flowchart of a parallax imaging conversion method provided in this application;
[0039] Figure 2 This is a schematic diagram illustrating the process of obtaining the matching degree. Detailed Implementation
[0040] To further illustrate the technical means and effects adopted by this application to achieve the intended inventive objective, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a parallax imaging conversion method proposed in this application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0042] The following description, in conjunction with the accompanying drawings, details a specific scheme for a parallax imaging conversion method provided in this application.
[0043] One embodiment of this application provides a parallax imaging conversion method.
[0044] Specifically, the following parallax imaging conversion method is provided; please refer to [link / reference]. Figure 1 The method includes the following steps:
[0045] Step S1: Obtain grayscale images of the target scene in the left and right directions, denoted as the left view and the right view, respectively.
[0046] Select two identical cameras and securely mount them on a bracket, ensuring the baseline is fixed and approximately coplanarly aligned. Use a calibration board to calibrate the parameters of each camera, including intrinsic and extrinsic parameter calibration. Intrinsic parameter calibration determines the focal length, principal point, distortion coefficients, etc. Extrinsic parameter calibration determines the relative position and orientation between the cameras. Point the cameras at the target scene and configure them to synchronously trigger exposure using hardware or software, simultaneously capturing two images of the target scene, one on the left and one on the right. The acquired images are RGB images. In this application, a weighted grayscale method is used to convert the RGB images to grayscale, obtaining grayscale images. These two grayscale images are designated as the left and right views, respectively. Weighted grayscale conversion is a well-known technique and will not be elaborated upon here.
[0047] At this point, the acquisition of a pair of images with parallax is complete.
[0048] Step S2: Obtain feature points and their main directions in the left and right views using a feature detection algorithm; construct the gradient information richness of each feature point based on the grayscale differences of pixels in the neighborhood of each feature point.
[0049] The above steps complete the acquisition of views from different spatial locations within the same scene. Parallax imaging transformation typically refers to the process of processing and transforming a disparity map acquired using a binocular system to ultimately generate a new perspective image. In disparax imaging transformation, disparity map generation is the core step. It calculates the disparity value (i.e., the horizontal displacement of the corresponding point in the left and right views) of each pixel in the scene by analyzing a pair of images taken from different perspectives. This process is called stereo matching. Stereo matching is the core step in generating the disparity map; its goal is to find the corresponding matching pixel in the right (or left) view for each pixel in the left (or right) view.
[0050] Traditional algorithms define a small window around the target pixel in the left view and calculate the reciprocal of the sum of the absolute differences between the pixel grayscale values of this window and the local windows of candidate pixels in the right view as the similarity. The candidate pixel with the highest similarity is selected as the matching pixel, and the difference in their horizontal coordinates is the disparity value of that pixel. However, this matching process is easily affected. It is difficult to extract effective features in areas with missing textures, leading to mismatches; repeated texture areas can easily cause matching ambiguity; occluded areas cannot be matched correctly due to missing information, thus affecting the accuracy and efficiency of disparity map generation in disparity imaging conversion.
[0051] (1) The ORB (Oriented Fast and Rotated Brief) algorithm is used to detect the feature points and their principal directions in the left and right views, respectively. The ORB algorithm is a well-known technique, and its specific process will not be described in detail. The feature points in the left and right views can then be obtained.
[0052] It should be noted that this application only provides one feature detection method for the detection of feature points in the left and right views. There are many existing feature point detection methods, and implementers may also use other feature detection algorithms to detect feature points in the left and right views. This application does not impose any specific restrictions.
[0053] (2) For feature points, the gradient information of the feature point's neighborhood is first obtained. The richer the gradient information contained in the feature point's neighborhood, the more it can represent the key information in the image. When matching feature points in the left and right views, it is easier to match the corresponding feature points, and its reference value for other pixels is greater. Here, taking any feature point q in the left view as an example, a neighborhood of feature point q is constructed with feature point q as the center pixel. Preferably, in this embodiment, the size of the neighborhood is set to 3*3. In other embodiments of this application, the implementer can set the size of the neighborhood according to the actual situation.
[0054] Furthermore, the gradient information richness of feature point q is calculated, expressed as:
[0055] In the formula, Let represent the gradient information richness of feature point q, where y represents the number of pixels in the neighborhood of feature point q whose grayscale value differs from that of feature point q; and Y represents the number of pixels in the neighborhood of feature point q. This represents the gray value of the i-th pixel in the neighborhood of feature point q; This represents the gray value of feature point q.
[0056] The greater the gradient information richness, the more information the feature point contains in the image. This makes it easier to match the corresponding feature point when performing feature point matching in the left and right views, and its reference value for matching other pixels is also greater. Conversely, the smaller the gradient information richness, the less information the feature point contains in the image. This makes it more difficult to match the corresponding feature point when performing feature point matching in the left and right views, and its reference value for matching other pixels is also smaller.
[0057] The gradient information richness of each feature point in the left and right views can be obtained by following the steps above.
[0058] Step S3: Obtain the connection between each feature point and its preset number of neighboring feature points; based on the feature parameter differences between all the connections corresponding to each feature point in the left view and all the connections corresponding to each feature point in the right view, combined with the differences between the main directions of each feature point in the left view and each feature point in the right view, as well as the differences in gradient information richness, construct the matching degree between each feature point in the left view and each feature point in the right view.
[0059] Because view acquisition is easily affected by external environmental interference, isolated noise points are generated. These isolated noise points also have relatively high gradient information richness. Therefore, when directly using the gradient information richness and local information of feature points for matching, isolated noise points will affect the accuracy and efficiency of feature point matching. Therefore, this application further obtains the local distribution of feature points and analyzes the matching degree between each feature point in the left view and each feature point in the right view. The specific process is as follows:
[0060] Taking feature point q as an example, firstly, the M nearest neighbor feature points of feature point q are obtained as the neighboring feature points of feature point q. Preferably, in this embodiment, the value of M is set to 10. As other embodiments of this application, implementers can set the value of M according to the actual situation.
[0061] Then, feature point q is connected to each of its neighboring feature points, and the angle between the resulting line segment and the 0° axis is obtained, denoted as the connecting angle. Specifically, the connecting angle is calculated as follows: with feature point q as the origin and the horizontal rightward direction as the 0° axis, the line segment connecting feature point q to each of its neighboring feature points is rotated clockwise around the origin. The angle traversed when the line segment rotates to the 0° axis is taken as the connecting angle between feature point q and each of its neighboring feature points, representing the distribution angle of neighboring feature points. The length of the line connecting feature point q to each of its neighboring feature points is obtained, denoted as the connecting distance between feature point q and each of its neighboring feature points. The connecting angle between each feature point and its m-th neighboring feature point is taken as the m-th connecting angle of each feature point, and the connecting distance between each feature point and its m-th neighboring feature point is taken as the m-th connecting distance of each feature point. The connecting angle and connecting distance between feature point q and each of its neighboring feature points are characteristic parameters of the connecting lines between feature point q and each of its neighboring feature points.
[0062] Finally, the matching degree between feature point q in the left view and any feature point w in the right view is calculated, expressed as:
[0063]
[0064]
[0065] In the formula, The degree of matching between feature point q in the left view and any feature point w in the right view; The absolute value of the difference between the gradient information richness of feature point q and feature point w is denoted as the first difference; This represents the normalized value of the angle between the principal directions of feature point q and feature point w; This is a preset, extremely small positive number, used to avoid the denominator being 0;
[0066] This represents the approximation of the distribution of neighboring feature points between feature point q and feature point w; M is the number of neighboring feature points for any feature point. This represents the normalized value of the absolute value of the difference between the angle between the m-th line connecting feature point q and the m-th line connecting feature point w. This represents the absolute value of the difference between the distance of the m-th line connecting feature point q and the distance of the m-th line connecting feature point w.
[0067] In this embodiment of the application, the normalization method for all angle values is to use the ratio of the angle value to 180° as the normalized value of the angle value;
[0068] Preferably, in the embodiments of this application, The value is set to 0.1. As another embodiment of this application, the implementer may set the value according to the actual situation. The value of .
[0069] The greater the angular difference between the principal directions of two feature points, the smaller the approximation of the gradient information, and the smaller the matching degree between the two feature points. and The larger the value, the smaller the similarity in the distribution of neighboring feature points between the two feature points, and the lower the matching degree between the two feature points; the larger the matching degree, the greater the probability that the feature point in the left view and the feature point in the right view are the same feature point. The smaller the matching degree, the less likely that the feature point in the left view and the feature point in the right view are the same feature point.
[0070] Step S4: Based on the matching degree, determine the matching point of each feature point in another view, and combine the gradient information richness to calculate the reference degree between each feature point and its matching point.
[0071] (1) According to the above steps, the matching degree between each feature point in the left view and each feature point in the right view can be obtained. For each feature point in the left view, taking feature point q as an example, the feature point with the largest matching degree in the right view is obtained as the matching point of feature point q. It should be noted that if there are multiple feature points with the largest matching degree in the right view, the feature point with the smallest spatial distance can be obtained as the matching point of feature point q. For example, if the matching degree between feature point q and feature points b and c in the right view is the largest, the coordinate information of q, b, and c in the image is obtained respectively. Based on the coordinate information, the spatial distance between q and b and the spatial distance between q and c are obtained respectively. The feature point with the smallest spatial distance is selected as the matching point.
[0072] (2) Based on the above steps, the matching points of each feature point in the left view have been obtained. Taking feature point q as an example, the reference degree of each feature point in subsequent matching is constructed based on the matching status of the feature points. The expression is:
[0073] In the formula, The reference degree of feature point q; This indicates the gradient information richness of feature point q; This represents the degree of matching between feature point q and its matching point.
[0074] A higher reference degree indicates a higher matching accuracy of the feature point, and more accurate reference information it provides when matching subsequent pixels, meaning a higher reference weight. Conversely, a lower reference degree indicates a lower matching accuracy of the feature point, and less accurate matching reference information it provides when matching subsequent pixels, meaning a lower reference weight.
[0075] Step S5: Take any pixel in any view as the target pixel and any pixel in another view as the pixel to be matched; take the matching points of each neighboring feature point of the target pixel in the other view as the corresponding matching feature points of the pixel to be matched.
[0076] Taking any pixel z in the left view as the target pixel, and the U feature points closest to the target pixel z as the neighboring feature points of the target pixel, preferably, in this embodiment, U is set to 5. In other embodiments of this application, the implementer can set the value of U according to the actual situation. The target pixel can then be matched using the assistance of the neighboring feature points, obtaining the matching pixel. The specific process is as follows:
[0077] Let any pixel x in the right view be the pixel to be matched. Then, obtain the matching points of each neighboring feature point of the pixel x and the target pixel z in the right view as the corresponding matching feature points of the pixel x.
[0078] Step S6: Obtain the lines connecting the target pixel and its neighboring feature points, and the lines connecting the pixel to be matched and its corresponding matching feature points; based on the feature parameter differences between the lines corresponding to the target pixel and the lines corresponding to the pixel to be matched, and the gray-level distribution differences within the local windows of the target pixel and the local windows of the pixel to be matched, and in conjunction with the reference degree, calculate the correspondence between the target pixel and the pixel to be matched.
[0079] Using the target pixel z as the origin, obtain the angle and distance between the line connecting the target pixel z and each of its neighboring pixels; using the pixel x to be matched as the origin, obtain the angle and distance between the line connecting the pixel x to be matched and each of its corresponding matching feature points.
[0080] The correspondence between the target pixel and the pixel to be matched can then be obtained, expressed as:
[0081]
[0082]
[0083] In the formula, XS represents the correspondence between the target pixel and the pixel to be matched; XS is the reciprocal of the sum of the absolute differences between the local window of the target pixel and the local window of the pixel to be matched in the right view, denoted as the first reciprocal.
[0084] B represents the matching degree of the neighbor features between the target pixel and the pixel to be matched; U represents the number of neighbor feature points of the target pixel; This represents the reference degree of the u-th neighboring feature point of the target pixel; This represents the spatial distance between the target pixel and its u-th neighboring feature point; It represents the normalized value of the absolute value of the calculated result by subtracting the angle between the line connecting the target pixel and its u-th neighboring feature point and the line connecting the pixel to be matched x and its u-th counterpart matching feature point. This represents the absolute value of the result obtained by subtracting the distance between the target pixel and its u-th neighboring pixel from the distance between the pixel to be matched and its u-th matching feature point. It is an exponential function with the natural constant e as its base. The local window for each pixel is a 3x3 neighborhood window centered on that pixel.
[0085] The smaller the spatial distance between neighboring feature points and the target feature point, the greater the weight of the reference value of the neighboring feature points should be; and The smaller the value of H, the more similar the data features near the target pixel in the left view are to the data features near the pixel to be matched in the right view. Therefore, the more likely the matching pixel in the right view is the same pixel as the target pixel in the left view, and the greater the correspondence between the target pixel and the pixel to be matched. A larger correspondence H indicates that the target pixel and the pixel to be matched are more likely to be the same pixel in different views; a smaller correspondence H indicates a lower probability that the target pixel and the pixel to be matched are the same pixel in different views.
[0086] Step S7: Obtain the matching pixel of the target pixel based on the correspondence; obtain the disparity map based on the horizontal coordinate difference between the target pixel and its matching pixel, and perform view transformation to obtain a new visual image.
[0087] Based on the above steps, the correspondence between the target pixel in the left view and each pixel to be matched in the right view can be obtained. Among all the pixels to be matched of the target pixel, the pixel with the highest correspondence with the target pixel is selected as the matching pixel of the target pixel. If there are multiple pixels with the highest correspondence, the pixel with the smallest spatial distance is selected.
[0088] The above steps complete the matching of each pixel in the left view with the pixel in the right view. The difference in horizontal coordinates between the pixel in the left view and the matching pixel in the right view is the disparity value of that pixel.
[0089] A disparity map is obtained by calculating the disparity values of all pixels in the left view. A new visual image is then obtained by performing a view transformation on the disparity map. Both the disparity map and the view transformation are well-known techniques, and the specific process will not be described in detail here.
[0090] A diagram illustrating the matching degree acquisition process is shown below. Figure 2 As shown.
[0091] In summary, this application embodiment acquires feature points in the left and right views of a scene, analyzes grayscale changes in the neighborhood of each feature point to construct the gradient information richness of the feature points, obtains the matching degree between each feature point in the left view and each feature point in the right view based on the differences in the local distribution of feature points in different views and the gradient information richness, quantifies the intensity of gradient changes in the neighborhood of feature points, effectively distinguishes strong representational features from invalid noise points, and avoids noise interference, and then obtains the matching degree points and corresponding matching degrees of each feature point in the left view in the right view as reference degrees for each feature point, which are used to analyze the referenceability of the matching results when matching subsequent pixels, improve matching accuracy, and significantly improve stereo matching performance. When matching each pixel with pixels in another view, the spatial distribution features of each pixel and its neighboring feature points are constructed by angle and distance, and the uniqueness of the matching is enhanced by analyzing the similarity of the distribution features with neighboring feature points, thus solving the problem of ambiguity in repeated textures. Furthermore, a reference degree weighting mechanism is introduced, which dynamically allocates reference weights based on the gradient richness and matching degree of feature points, making pixel matching in sparse texture areas more dependent on high-confidence feature points and reducing the mismatch rate in occluded areas. First, high-confidence feature point matching is performed. Then, the corresponding degree calculation guided by neighboring feature points is used to quickly locate the matching position of non-feature pixels, reducing redundant calculations. This improves the matching accuracy and efficiency of pixels, thereby improving the quality of disparity map generation.
[0092] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, the above description focuses on specific embodiments of this application. Additionally, the processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired results. In some implementations, multitasking and parallel processing are possible or may be advantageous.
[0093] The various embodiments in this application are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0094] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them; modifications to the technical solutions described in the foregoing embodiments, or equivalent substitutions of some of the technical features, do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A parallax imaging conversion method characterized by, The method comprises the following steps: Obtaining a left and right direction target scene image gray scale map, respectively denoted as left view and right view; Obtaining feature points and main directions of the feature points in the left view and the right view through a feature detection algorithm; constructing gradient information richness of each feature point based on gray scale difference of pixel points in a neighborhood of each feature point; Obtaining a connecting line between each feature point and a preset number of adjacent feature points; constructing a matching degree between each feature point in the left view and each feature point in the right view based on feature parameter difference between all connecting lines corresponding to each feature point in the left view and all connecting lines corresponding to each feature point in the right view, combining difference between the main directions of each feature point in the left view and each feature point in the right view, and difference between the gradient information richness; Determining a matching point of each feature point in another view based on the matching degree, and calculating a reference degree between each feature point and the matching point thereof based on the gradient information richness; Taking any one pixel point in any one view as a target pixel point, and taking any one pixel point in another view as a matching pixel point; taking matching points of each adjacent feature point of the target pixel point in another view as each control matching feature point of the matching pixel point; Obtaining a connecting line between the target pixel point and each adjacent feature point thereof, and a connecting line between the matching pixel point and each control matching feature point thereof; calculating a corresponding degree between the target pixel point and the matching pixel point based on feature parameter difference between the connecting line corresponding to the target pixel point and the connecting line corresponding to the matching pixel point, and gray scale distribution difference between a local window of the target pixel point and a local window of the matching pixel point, combining the reference degree; Obtaining a matching pixel point of the target pixel point based on the corresponding degree; obtaining a disparity map based on horizontal coordinate difference between the target pixel point and the matching pixel point thereof, and performing view transformation to obtain a new visual image.
2. A parallax imaging conversion method according to claim 1, wherein, The gradient information richness is obtained by: , wherein, is the gradient information richness of the feature point q, y represents the number of pixel points with different gray values from the gray value of the feature point q among all pixel points in the neighborhood of the feature point q except the feature point q; Y represents the number of pixel points in the neighborhood of the feature point q; represents the gray value of the i-th pixel point in the neighborhood of the feature point q; represents the gray value of the feature point q.
3. The parallax imaging conversion method of claim 1, wherein, The matching degree is obtained by: Constructing a neighborhood feature point distribution approximation degree between a feature point q and a feature point w based on feature parameter difference between all connecting lines corresponding to the feature point q in the left view and all connecting lines corresponding to the feature point w in the right view; Calculating difference between the gradient information richness of the feature point q and the feature point w, denoted as a first difference; Calculating a normalized value of an angle between the main directions of the feature point q and the feature point w; Taking the neighborhood feature point distribution approximation degree as a numerator, and taking a product of the first difference and the normalized value plus a preset minimum positive number as a denominator, to obtain a ratio value, and taking a calculation result of the ratio value as the matching degree between the feature point q and the feature point w.
4. A parallax imaging conversion method as claimed in claim 3, characterized in that, The neighborhood feature point distribution approximation degree is obtained by: Connecting each feature point with an mth adjacent feature point to obtain a line segment, taking an angle between the line segment and a preset 0° axis as an mth connecting line angle of each feature point; and taking a length of the line segment as an mth connecting line distance of each feature point. The approximation degree of the adjacent feature point distribution is denoted as , The expression of the approximation degree is: , wherein M is the number of neighboring feature points of any feature point; represents a normalized value of the absolute value of the difference between the mth line-connection angle of the feature point q and the mth line-connection angle of the feature point w; represents the absolute value of the difference between the mth line-connection distance of the feature point q and the mth line-connection distance of the feature point w, is a preset minimum positive number.
5. The parallax imaging conversion method of claim 1, wherein, The matching point is a feature point in another view with the largest matching degree of each feature point.
6. The parallax imaging conversion method of claim 1, wherein, The reference degree is obtained by: Multiplying the matching degree between each feature point and the matching point thereof by the gradient information richness of each feature point to obtain the reference degree of each feature point.
7. The parallax imaging conversion method of claim 1, wherein, The obtaining process of the correspondence degree is: Based on the feature parameter difference between the corresponding connecting line of the target pixel point and the corresponding connecting line of the pixel point to be matched, the adjacent feature matching degree of the target pixel point and the pixel point to be matched is calculated in combination with the reference degree; The reciprocal of the sum of the absolute values of the pixel gray value differences between the local window of the target pixel point and the local window of the pixel point to be matched in the right view is calculated, and is recorded as a first reciprocal; the correspondence degree of the target pixel point and the pixel point to be matched is determined based on the adjacent feature matching degree and the first reciprocal.
8. A parallax imaging conversion method as claimed in claim 7, characterized in that, The expression of the adjacent feature matching degree is: ; In the formula, B is the adjacent feature matching degree of the target pixel point and the pixel point to be matched; U represents the number of adjacent feature points of the target pixel point; represents the reference degree of the u-th adjacent feature point of the target pixel point; represents the spatial distance between the target pixel point and the u-th adjacent feature point thereof; represents the normalized value of the absolute value of the difference between the included angle of the line connecting the target pixel point and the u-th adjacent feature point thereof and the included angle of the line connecting the to-be-matched pixel point and the u-th control matching feature point; represents the absolute value of the difference between the connecting distance of the target pixel point and the u-th adjacent pixel point and the connecting distance of the to-be-matched pixel point and the u-th matching feature point; is an exponential function with the natural constant e as the base.
9. A parallax imaging conversion method as claimed in claim 7, characterized in that, The correspondence degree is the product of the adjacent feature matching degree and the first reciprocal.
10. The parallax imaging conversion method of claim 1, wherein, The obtaining process of the matching pixel point is: Among all the pixel points to be matched of the target pixel point, the pixel point to be matched with the largest correspondence degree of the target pixel point is selected as the matching pixel point of the target pixel point.
Citation Information
Patent Citations
Image feature extraction and matching method
CN111444948A
Stereo image processing device and method
US20100328427A1