CN112258635B - Three-dimensional reconstruction method and device based on improved binocular matching SAD algorithm - Google Patents
Three-dimensional reconstruction method and device based on improved binocular matching SAD algorithm Download PDFInfo
- Publication number
- CN112258635B CN112258635B CN202011154642.9A CN202011154642A CN112258635B CN 112258635 B CN112258635 B CN 112258635B CN 202011154642 A CN202011154642 A CN 202011154642A CN 112258635 B CN112258635 B CN 112258635B
- Authority
- CN
- China
- Prior art keywords
- sad algorithm
- improved
- matching
- dimensional reconstruction
- picture
- 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.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/40—Analysis of texture
- G06T7/49—Analysis of texture based on structural texture description, e.g. using primitives or placement rules
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/97—Determining parameters from multiple pictures
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Abstract
The invention relates to the technical field of image processing, in particular to a three-dimensional reconstruction method and device based on an improved binocular matching SAD algorithm. The three-dimensional reconstruction method based on the improved binocular matching SAD algorithm comprises the following steps: acquiring an original picture; the original picture comprises a first picture and a second picture which correspond to each other; based on the original picture, an initial parallax image is obtained through an improved SAD algorithm; the improved SAD algorithm is biased to the matching precision of the center pixels of the image blocks of the two pictures in the initial parallax image generation process; filling the hole of the initial parallax map to optimize the initial parallax map to obtain a final parallax map.
Description
Technical Field
The invention relates to the technical field of image processing, in particular to a three-dimensional reconstruction method and device based on an improved binocular matching SAD algorithm.
Background
The ever increasing number of hazardous chemicals produced and used places higher demands on the supervision of the safety of hazardous chemical stores. The three-dimensional reconstruction is carried out on the dangerous chemical warehouse, the environmental information around the dangerous chemical can be acquired accurately in real time, the visualization of the dangerous chemical warehouse environment is realized, and the real-time performance and the safety of monitoring and early warning are ensured. The binocular vision technology is not limited by the material of the object surface, can acquire even and dense scene three-dimensional information, has lower requirements on hardware and cost, and has a certain application prospect in the aspect of safety monitoring in a dangerous chemical library.
The effect and the precision of the three-dimensional reconstruction are directly determined by a matching algorithm, and the key step is to search homonymous points in two images, namely, three-dimensional matching is performed. The absolute error sum (sum of absolute differences, SAD) algorithm is a classical block matching algorithm, and is used as a typical algorithm of a real-time system, the algorithm is low in complexity, high in speed and good in instantaneity, and the obtained dense disparity map can be used for dense three-dimensional reconstruction. However, when the traditional SAD algorithm is applied to a more complex scene, a certain error is generated by directly summing the absolute values of the differences between the corresponding values of the two pixel blocks, the accuracy of the obtained result is insufficient, and a parallax image is hollow due to the change of parallax in a matching window, so that the reconstructed three-dimensional model is influenced.
Disclosure of Invention
In view of the above, the present application provides a three-dimensional reconstruction method and apparatus based on an improved binocular matching SAD algorithm, so as to solve the problems in the related art.
The invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides a three-dimensional reconstruction method based on an improved binocular matching SAD algorithm, including:
acquiring an original picture; the original picture comprises a first picture and a second picture which correspond to each other;
based on the original picture, an initial parallax image is obtained through an improved SAD algorithm; the improved SAD algorithm is biased to the matching precision of the center pixels of the image blocks of the two pictures in the initial parallax image generation process;
filling the hole of the initial parallax map to optimize the initial parallax map to obtain a final parallax map.
Alternatively, the improved SAD algorithm is to introduce a weighting coefficient of a two-dimensional Gaussian distribution with zero mean value on the basis of the original SAD algorithm, so that the matching precision of the central pixel of the image block is biased when matching is performed.
Optionally, the obtaining the initial disparity map through a modified SAD algorithm based on the original picture includes:
and solving whether the template image block in the first picture and the search image block in the second picture are matched or not based on the sum of absolute values of pixel value differences introduced with two-dimensional Gaussian weighting coefficients and measuring whether the two image blocks are matched or not so as to obtain an initial parallax image.
Optionally, the filling the hole of the initial disparity map fills the hole, including:
determining a hole existing in the initial disparity map;
and selecting a window to fill the holes by using texture information measured by GLCM for the pixel points with holes in the disparity map.
Optionally, the selecting the window for hole filling by using texture information of GLCM metric includes:
a gray level co-occurrence matrix is introduced to measure areas with different sizes of textures around the cavity, and Euclidean distance between adjacent areas is obtained;
selecting a region with the smallest Euclidean distance corresponding to the smallest size as a target region;
and solving a parallax average value of the target area and filling the cavity.
Optionally, the measuring the areas with different sizes of textures around the cavity by introducing the gray level co-occurrence matrix to obtain the euclidean distance includes:
sequentially selecting areas with different sizes;
selecting an angular second moment, entropy, contrast and correlation to form a four-dimensional feature vector for comprehensively describing texture attributes of regions in the image in the selected region;
based on the four-dimensional feature vector, euclidean distance between adjacent regions is determined.
Optionally, the adjacent areas are: the areas with different sizes are arranged according to the sizes of the areas, and the areas with adjacent size relations are adjacent areas.
In a second aspect, the present application provides a three-dimensional reconstruction apparatus based on an improved binocular matching SAD algorithm, including:
the acquisition module is used for acquiring an original picture; the original picture comprises a first picture and a second picture which correspond to each other;
the initial parallax image generation module is used for obtaining an initial parallax image through an improved SAD algorithm based on the original image; the improved SAD algorithm is biased to the matching precision of the center pixels of the image blocks of the two pictures in the initial parallax image generation process;
and the filling module is used for filling the hole of the initial disparity map so as to optimize the initial disparity map.
In a third aspect, the present application provides a three-dimensional reconstruction apparatus based on an improved binocular matching SAD algorithm, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program at least for executing the three-dimensional reconstruction method based on the improved binocular matching SAD algorithm as described in the first aspect of the application;
the processor is configured to invoke and execute the computer program in the memory.
In a fourth aspect, the present application provides a storage medium storing a computer program, which when executed by a processor, implements a three-dimensional reconstruction method based on the improved binocular matching SAD algorithm as described in the first aspect of the present application.
According to the technical scheme, the first picture and the second picture are shot through the preset camera device; after the original picture is acquired; based on the original picture, an initial parallax image is obtained through an improved SAD algorithm; the improved SAD algorithm is biased to the matching precision of the center pixels of the image blocks of the two pictures in the initial parallax image generation process; based on the flatness of the current image pickup device, the matching precision of the center pixels of the image blocks of the two pictures is biased, which accords with objective reality and can effectively improve the overall matching precision; filling the hole of the initial disparity map to optimize the initial disparity map. By means of the arrangement, the improved SAD algorithm is used for maintaining a good matching result in the parallax smoothing process, the texture information is utilized by the improved SAD algorithm to fill the holes, the hole area can be reduced well, the result is superior to that of the traditional SAD algorithm, and the improved SAD algorithm has good practicability.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a three-dimensional reconstruction method based on an improved binocular matching SAD algorithm according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a binocular vision model provided by an embodiment of the present invention;
fig. 3 is a schematic diagram of a gray co-occurrence matrix generation process according to an embodiment of the present invention;
fig. 4 is a flowchart of a three-dimensional reconstruction method based on an improved binocular matching SAD algorithm according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a three-dimensional reconstruction device based on an improved binocular matching SAD algorithm according to an embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a three-dimensional reconstruction device based on an improved binocular matching SAD algorithm according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, based on the examples herein, which are within the scope of the invention as defined by the claims, will be within the scope of the invention as defined by the claims.
Firstly, application scenes of the embodiment of the invention are described, and the ever-increasing production and use quantity of dangerous chemicals puts higher demands on the supervision of dangerous chemical storage safety. The three-dimensional reconstruction is carried out on the dangerous chemical warehouse, the environmental information around the dangerous chemical can be acquired accurately in real time, the visualization of the dangerous chemical warehouse environment is realized, and the real-time performance and the safety of monitoring and early warning are ensured. The binocular vision technology is not limited by the material of the object surface, can acquire even and dense scene three-dimensional information, has lower requirements on hardware and cost, and has certain application prospect in the aspect of safety monitoring in a dangerous chemical library.
The effect and the precision of the three-dimensional reconstruction are directly determined by a matching algorithm, and the key step is to search homonymous points in two images, namely, three-dimensional matching is performed. The absolute error sum (sum of absolute differences, SAD) algorithm is a classical block matching algorithm, and is used as a typical algorithm of a real-time system, the algorithm is low in complexity, high in speed and good in instantaneity, and the obtained dense disparity map can be used for dense three-dimensional reconstruction. However, when the traditional SAD algorithm is applied to a more complex scene, a certain error is generated by directly summing the absolute values of the differences between the corresponding values of the two pixel blocks, the accuracy of the obtained result is insufficient, and a parallax image is hollow due to the change of parallax in a matching window, so that the reconstructed three-dimensional model is influenced.
Examples
Fig. 1 is a flowchart of a three-dimensional reconstruction method based on an improved binocular matching SAD algorithm according to an embodiment of the present invention, where the method may be performed by a three-dimensional reconstruction device based on an improved binocular matching SAD algorithm according to an embodiment of the present invention. Referring to fig. 1, the method may specifically include the steps of:
s101, acquiring an original picture; the original picture comprises a first picture and a second picture which correspond to each other;
it should be noted that, the binocular vision technology performs three-dimensional reconstruction on the target based on the parallax principle, and compared with the manner of acquiring scene depth information by using a TOF camera, structured light, a laser radar and the like, the binocular vision technology is not limited by the material on the surface of an object, can acquire scene three-dimensional information which is uniform and dense, has lower requirements on hardware and cost, and has certain application prospects in the aspect of safety monitoring in a dangerous chemical library.
The principle of binocular stereoscopic vision is as follows: the binocular stereoscopic imaging model is generally two cameras placed in parallel, as shown in fig. 2, with two camera optical centers O l And O r The distance between the two cameras is the base line distance b, and the coordinates of a point p in the space on the left camera and the right camera are p respectively l (x l ,y l ) And p r( x r ,y r) The parallax d is defined as the difference in the positions of the corresponding points of a certain point in the two imaging planes: d=x l -x r 。
From the binocular vision model, ΔpO l O r ∽△pp l p r The method is based on the principle of triangle similarity:
wherein Z is C The depth of point b is represented, f represents the focal length of the camera, and the parallax value d and the depth value Z are known from the formula (1) C Inversely proportional, when the disparity value d is smaller, the depth value Z C The larger the point is, the farther the point is from the camera. Conversely, the closer the point is to the camera. In practical situations, two phases cannot be placed strictly side by side, and y is required to be corrected through an epipolar line l =y r Therefore, the search dimension can be reduced from two dimensions to one dimension, the complexity of matching is reduced, and the matching efficiency is improved. In step S101, the acquired picture is a picture taken by the image capturing device corresponding to the binocular position in the binocular vision model as illustrated in fig. 2.
S102, obtaining an initial parallax image through an improved SAD algorithm based on the original image; the improved SAD algorithm is biased to the matching precision of the center pixels of the image blocks of the two pictures in the initial parallax image generation process;
note that SAD is a gray-scale-based block matching algorithm in image stereo matching. The principle of the method is to calculate the sum of absolute values of pixel value differences in a template image block and a search image block, so as to measure whether the two image blocks are matched, and the definition of the method is as follows:
wherein d is the disparity value, P L (i, j) represents the gray value of a pixel in the template image block, P R (i, j) represents the gray value of the pixel within the search image block. The smaller the SAD matrix value calculated using equation (2), the more similar the two image blocks.
For complex scenes, the image blocks are matched by using the similarity degree of the difference value of the pixel points in the two pixel blocks, and once the pixel points of the continuous image blocks in the scene have similar pixel values, the matching inevitably generates errors. To improve the matching accuracy of two image blocks, for the SAD objective function, a weighting coefficient ω (i, j) of a two-dimensional Gaussian distribution with a mean value of zero is introduced:
where σ2 is the variance, σ2=0.5n is taken, n is the block radius.
The two-dimensional Gaussian distribution is a generalization of one-dimensional normal distribution to two dimensions. As shown in fig. 2, the projections of the two-dimensional gaussian distribution with zero mean on the XOZ plane and the YOZ plane are both a standard normal distribution, and the projection on the XOY plane is an ellipse.
Combining equation (3) with equation (2) results in a modified SAD algorithm, as shown in equation (5):
the improved SAD after Gaussian distribution is introduced is more focused on the matching precision of the center pixel of the image block, meets objective reality, and can effectively improve the overall matching precision. The Gaussian weights introduced by the algorithm can keep a good matching result in the parallax smoothing process.
S103, filling the hole of the initial disparity map to optimize the initial disparity map.
Specifically, after the initial disparity map is obtained by using the weighted SAD algorithm, it is found that when the disparity of the pixel points in the matching block changes, a hole is caused in the disparity map. In order to fill the cavity, a Gray-level Co-occurrence Matrix (GLCM) matrix is introduced into the scheme provided by the application to measure texture areas around the cavity, and then a proper window size is selected to calculate parallax average value for cavity filling.
Wherein the filling the hole of the initial disparity map comprises:
determining a hole existing in the initial disparity map;
and selecting a window to fill the holes by using texture information measured by GLCM for the pixel points with holes in the disparity map.
The steps are as follows: "selecting windows for hole filling using texture information of GLCM metric" includes:
a gray level co-occurrence matrix is introduced to measure areas with different sizes of textures around the cavity, and Euclidean distance between adjacent areas is obtained; wherein the adjacent areas are: the areas with different sizes are arranged according to the sizes of the areas, and the areas with adjacent size relations are adjacent areas.
Specifically, sequentially selecting areas with different sizes; selecting an angular second moment, entropy, contrast and correlation to form a four-dimensional feature vector for comprehensively describing texture attributes of regions in the image in the selected region;
based on the four-dimensional feature vector, euclidean distance between adjacent regions is determined.
Selecting a region with the smallest Euclidean distance corresponding to the smallest size as a target region;
and solving a parallax average value of the target area and filling the cavity.
Step S103 is further described below with reference to fig. 3 and 4:
GLCM describes the texture of an image by studying the spatially dependent characteristics of the gray scale. GLCM is denoted by G (i, j) (i, j=0, 1,2, … L-1), where L represents the gray level of the image, i and j represent the gray level of the pixel, d represents the distance between two pixels, and n represents the window size. θ is the direction of GLCM generation, typically taken at 0 °,45 °,90 ° and 135 °. Fig. 3 shows a gray matrix generation process of θ=0°, d=1: specifically, among the 14 texture features based on GLCM, an angular second moment (Angular Second Moment, ASM), entropy (ENT), contrast (CON) and Correlation (COR) are selected to form a four-dimensional feature vector for comprehensively describing the texture properties of the region in the image.
As shown in equation (6), the similarity of two neighboring texture region feature vectors (ASM 1, ENT1, CON1, COR 1) and (ASM 2, ENT2, CON2, COR 2) is described by the euclidean distance (Euclidean distance, ED):
the larger ED of the texture feature vectors of the two adjacent areas is, the larger the texture attribute difference of the two areas is, the larger the probability that the two areas do not belong to the same object is, and the parallax average value cannot be directly obtained and is assigned to the cavity position; if ED of texture feature vectors of two adjacent areas is closer to 0, the probability that the two areas belong to the same object is larger, and the average parallax can be assigned to the position of the cavity. The self-adaptive adjustment of the parallax filling window is carried out according to the image texture information, so that the parallax filling can be carried out correctly and effectively, and a good parallax image can be obtained. The specific steps are shown in fig. 4:
s401, obtaining an initial disparity map by using a weighted SAD algorithm;
s402, screening observation holes;
namely: and searching for a hole in the initial disparity map.
S403, determining the position of the cavity;
it should be noted that, in the scheme provided in the present application, each hole needs to be filled one by one, so the position of the hole that needs to be filled this time needs to be determined before each filling.
S404, calculating ASM, ENT, CON, COR by taking the hollow as a window with different radiuses;
s405, solving ED by using adjacent window radiuses;
s406, enabling a cavity to be provided by means of window average value determination of the minimum ED;
it should be noted that, for an ED corresponding to two adjacent windows, in practical application, the larger the ED of the texture feature vectors of the two adjacent regions, the larger the texture attribute difference of the two regions, the larger the probability that the two regions do not belong to the same object, and the parallax average cannot be directly obtained to be assigned to the hole position; if ED of texture feature vectors of two adjacent areas is closer to 0, the probability that the two areas belong to the same object is larger, and the average parallax can be assigned to the position of the cavity. Therefore, the probability that two adjacent windows corresponding to the minimum ED belong to each object at the same time is high, so that the empty hole part can be filled based on any one image texture information in the two adjacent windows corresponding to the minimum ED. The self-adaptive adjustment of the parallax filling window is carried out according to the image texture information, so that the parallax filling can be carried out correctly and effectively, and a good parallax image can be obtained.
S407, judging whether filling is completed or not;
further, if yes, go to step S408; if not, step S403 is executed. By the arrangement, after filling of one cavity is completed, filling of the other cavity can be performed until filling of the cavity is completed.
And S408, obtaining a final disparity map.
To sum up; the scheme that this application provided: after an initial disparity map is obtained by introducing a two-dimensional Gaussian distribution coefficient to weight an SAD matching algorithm, a window is selected by using texture information of GLCM measurement for pixel points with holes in the disparity map to fill the holes. Compared with the SAD algorithm, the disparity map obtained by the algorithm is more accurate, and can be used for preparing three-dimensional reconstruction of a later scene.
Fig. 5 is a schematic structural diagram of a three-dimensional reconstruction device based on an improved binocular matching SAD algorithm according to an embodiment of the present invention; referring to fig. 5, the three-dimensional reconstruction device based on the improved binocular matching SAD algorithm provided in the present application includes:
an obtaining module 501, configured to obtain an original picture; the original picture comprises a first picture and a second picture which correspond to each other;
an initial disparity map generating module 502, configured to obtain an initial disparity map through a modified SAD algorithm based on the original picture; the improved SAD algorithm is biased to the matching precision of the center pixels of the image blocks of the two pictures in the initial parallax image generation process;
and a filling module 503, configured to fill the hole of the initial disparity map, so as to optimize the initial disparity map.
Fig. 6 is a schematic structural diagram of a three-dimensional reconstruction based on an improved binocular matching SAD algorithm according to an embodiment of the present invention. Referring to fig. 6, the three-dimensional reconstruction device based on the improved binocular matching SAD algorithm provided in the present application includes:
a processor 601 and a memory 602 connected to the processor 601;
the memory 602 is configured to store a computer program at least for performing a three-dimensional reconstruction method based on a modified binocular matching SAD algorithm as described in any of the embodiments of the present application;
the processor is configured to invoke and execute the computer program in the memory.
The present application also provides a storage medium storing a computer program which, when executed by a processor, implements a three-dimensional reconstruction method based on the improved binocular matching SAD algorithm as described in any of the embodiments of the present application.
It is to be understood that the same or similar parts in the above embodiments may be referred to each other, and that in some embodiments, the same or similar parts in other embodiments may be referred to.
It should be noted that in the description of the present invention, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present invention, unless otherwise indicated, the meaning of "plurality" means at least two.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.
Claims (9)
1. A three-dimensional reconstruction method based on an improved binocular matching SAD algorithm, comprising:
acquiring an original picture; the original picture comprises a first picture and a second picture which correspond to each other;
based on the original picture, an initial parallax image is obtained through an improved SAD algorithm; the improved SAD algorithm is biased to the matching precision of the center pixels of the image blocks of the two pictures in the initial parallax image generation process;
filling the hole of the initial parallax map to optimize the initial parallax map to obtain a final parallax map;
the improved SAD algorithm is to introduce a weighting coefficient of a two-dimensional Gaussian distribution with a mean value of zero on the basis of the original SAD algorithm, so that the matching precision of the center pixel of the image block is biased during matching.
2. The three-dimensional reconstruction method based on the modified binocular matching SAD algorithm according to claim 1, wherein the obtaining an initial disparity map based on the original picture through the modified SAD algorithm comprises:
and solving whether the template image block in the first picture and the search image block in the second picture are matched or not based on the sum of absolute values of pixel value differences introduced with two-dimensional Gaussian weighting coefficients and measuring whether the two image blocks are matched or not so as to obtain an initial parallax image.
3. The three-dimensional reconstruction method based on the improved binocular matching SAD algorithm of claim 1, wherein said filling the holes of the initial disparity map with holes comprises:
determining a hole existing in the initial disparity map;
and selecting a window to fill the holes by using texture information measured by GLCM for the pixel points with holes in the disparity map.
4. The three-dimensional reconstruction method according to claim 3, wherein the selecting a window for hole filling using texture information of GLCM metric comprises:
a gray level co-occurrence matrix is introduced to measure areas with different sizes of textures around the cavity, and Euclidean distance between adjacent areas is obtained;
selecting a region with the smallest Euclidean distance corresponding to the smallest size as a target region;
and solving a parallax average value of the target area and filling the cavity.
5. The method for three-dimensional reconstruction based on improved binocular matching SAD algorithm as claimed in claim 4, wherein said introducing gray level co-occurrence matrix measures areas of different sizes of textures around the cavity to obtain euclidean distance, comprising:
sequentially selecting areas with different sizes;
selecting an angular second moment, entropy, contrast and correlation to form a four-dimensional feature vector for comprehensively describing texture attributes of regions in the image in the selected region;
based on the four-dimensional feature vector, euclidean distance between adjacent regions is determined.
6. The improved binocular matching SAD algorithm based three-dimensional reconstruction method of claim 4, wherein the neighboring areas are: the areas with different sizes are arranged according to the sizes of the areas, and the areas with adjacent size relations are adjacent areas.
7. A three-dimensional reconstruction device based on an improved binocular matching SAD algorithm, comprising:
the acquisition module is used for acquiring an original picture; the original picture comprises a first picture and a second picture which correspond to each other;
the initial parallax image generation module is used for obtaining an initial parallax image through an improved SAD algorithm based on the original image; the improved SAD algorithm is biased to the matching precision of the center pixels of the image blocks of the two pictures in the initial parallax image generation process;
the filling module is used for filling the hole of the initial parallax map so as to optimize the initial parallax map;
the improved SAD algorithm is to introduce a weighting coefficient of a two-dimensional Gaussian distribution with a mean value of zero on the basis of the original SAD algorithm, so that the matching precision of the center pixel of the image block is biased during matching.
8. A three-dimensional reconstruction apparatus based on an improved binocular matching SAD algorithm, comprising:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program at least for executing the three-dimensional reconstruction method based on the improved binocular matching SAD algorithm of any one of claims 1-6;
the processor is configured to invoke and execute the computer program in the memory.
9. A storage medium storing a computer program which, when executed by a processor, implements a three-dimensional reconstruction method based on a modified binocular matching SAD algorithm as claimed in any one of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011154642.9A CN112258635B (en) | 2020-10-26 | 2020-10-26 | Three-dimensional reconstruction method and device based on improved binocular matching SAD algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011154642.9A CN112258635B (en) | 2020-10-26 | 2020-10-26 | Three-dimensional reconstruction method and device based on improved binocular matching SAD algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112258635A CN112258635A (en) | 2021-01-22 |
CN112258635B true CN112258635B (en) | 2023-07-21 |
Family
ID=74262989
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011154642.9A Active CN112258635B (en) | 2020-10-26 | 2020-10-26 | Three-dimensional reconstruction method and device based on improved binocular matching SAD algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112258635B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116363219B (en) * | 2023-06-02 | 2023-08-11 | 中国科学技术大学 | Binocular fire source image synthesis method, device and readable storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110473217A (en) * | 2019-07-25 | 2019-11-19 | 沈阳工业大学 | A kind of binocular solid matching process based on Census transformation |
CN111179333A (en) * | 2019-12-09 | 2020-05-19 | 天津大学 | Defocus fuzzy kernel estimation method based on binocular stereo vision |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9270970B2 (en) * | 2010-10-27 | 2016-02-23 | Dolby International Ab | Device apparatus and method for 3D image interpolation based on a degree of similarity between a motion vector and a range motion vector |
CN103868460B (en) * | 2014-03-13 | 2016-10-05 | 桂林电子科技大学 | Binocular stereo vision method for automatic measurement based on parallax optimized algorithm |
CN106340036A (en) * | 2016-08-08 | 2017-01-18 | 东南大学 | Binocular stereoscopic vision-based stereo matching method |
KR101988551B1 (en) * | 2018-01-15 | 2019-06-12 | 충북대학교 산학협력단 | Efficient object detection and matching system and method using stereo vision depth estimation |
CN109249930B (en) * | 2018-08-10 | 2021-08-31 | 重庆大数据研究院有限公司 | Intelligent vehicle collision safety prediction method |
CN109961092B (en) * | 2019-03-04 | 2022-11-01 | 北京大学深圳研究生院 | Binocular vision stereo matching method and system based on parallax anchor point |
CN109815943B (en) * | 2019-03-18 | 2021-02-09 | 北京石油化工学院 | Hazardous chemical storage stacking picture sample generation method and system |
CN110567441B (en) * | 2019-07-29 | 2021-09-28 | 广东星舆科技有限公司 | Particle filter-based positioning method, positioning device, mapping and positioning method |
-
2020
- 2020-10-26 CN CN202011154642.9A patent/CN112258635B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110473217A (en) * | 2019-07-25 | 2019-11-19 | 沈阳工业大学 | A kind of binocular solid matching process based on Census transformation |
CN111179333A (en) * | 2019-12-09 | 2020-05-19 | 天津大学 | Defocus fuzzy kernel estimation method based on binocular stereo vision |
Also Published As
Publication number | Publication date |
---|---|
CN112258635A (en) | 2021-01-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10334168B2 (en) | Threshold determination in a RANSAC algorithm | |
Jordt-Sedlazeck et al. | Refractive structure-from-motion on underwater images | |
CN109461181A (en) | Depth image acquisition method and system based on pattern light | |
WO2021140886A1 (en) | Three-dimensional model generation method, information processing device, and program | |
US20090324059A1 (en) | Method for determining a depth map from images, device for determining a depth map | |
EP3841554A1 (en) | Method and system for reconstructing colour and depth information of a scene | |
EP3367334B1 (en) | Depth estimation method and depth estimation apparatus of multi-view images | |
Chen et al. | Transforming a 3-d lidar point cloud into a 2-d dense depth map through a parameter self-adaptive framework | |
CN113494893B (en) | Calibration method and device of three-dimensional laser scanning system and computer equipment | |
CN113205592B (en) | Light field three-dimensional reconstruction method and system based on phase similarity | |
CN111563921A (en) | Underwater point cloud acquisition method based on binocular camera | |
JP2013178656A (en) | Image processing device, image processing method, and image processing program | |
JP2014096062A (en) | Image processing method and image processing apparatus | |
Ahmadabadian et al. | Image selection in photogrammetric multi-view stereo methods for metric and complete 3D reconstruction | |
Gadasin et al. | Reconstruction of a Three-Dimensional Scene from its Projections in Computer Vision Systems | |
Shivakumar et al. | Real time dense depth estimation by fusing stereo with sparse depth measurements | |
CN114494589A (en) | Three-dimensional reconstruction method, three-dimensional reconstruction device, electronic equipment and computer-readable storage medium | |
CN115035235A (en) | Three-dimensional reconstruction method and device | |
CN112258635B (en) | Three-dimensional reconstruction method and device based on improved binocular matching SAD algorithm | |
CN113160416B (en) | Speckle imaging device and method for coal flow detection | |
GB2569609A (en) | Method and device for digital 3D reconstruction | |
EP3906530B1 (en) | Method for 3d reconstruction of an object | |
CN108053481A (en) | Generation method, device and the storage medium of three-dimensional point cloud normal vector | |
CN112525106A (en) | Three-phase machine cooperative laser-based 3D detection method and device | |
Wong et al. | 3D object model reconstruction from image sequence based on photometric consistency in volume space |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |