Method, Apparatus and System for Three-Dimensional Reconstruction
Abstract
Disclosed in the present application are a method, apparatus and system for three-dimensional reconstruction. The method includes: acquiring a first image and a second image, wherein the first image and the second image are respectively obtained by means of different image collection devices collecting a predetermined code element image projected onto the surface of an object to be measured; acquiring a first target pixel point of each code element in the first image, and determining, in the second image, a matched pixel point for the first target pixel point of each code element in the first image; and determining the three-dimensional coordinates of the first target pixel point at least according to the predetermined pixel point coordinates of the first target pixel point in the first image and the predetermined pixel point coordinates of the matched pixel point in the second image, so as to complete three-dimensional reconstruction.
Claims
exact text as granted — not AI-modified1 . A method for three-dimensional reconstruction, comprising:
acquiring a first image and a second image, wherein the first image and the second image are respectively obtained by means of different image collection devices collecting a predetermined code element image projected onto the surface of an object to be measured, the predetermined code element image comprising a plurality of target code elements that are randomly distributed in a preset direction, and the target code elements being line segment stripes; acquiring a first target pixel point of each code element in the first image, and determining, in the second image, a matched pixel point for the first target pixel point of each code element in the first image; and determining the three-dimensional coordinates of the first target pixel point at least according to the predetermined pixel point coordinates of the first target pixel point in the first image and the predetermined pixel point coordinates of the matched pixel point in the second image, so as to complete three-dimensional reconstruction.
2 . The method as claimed in claim 1 , wherein determining, in the second image, the matched pixel point for the first target pixel point of each code element in the first image comprises:
determining the pixel point coordinates of the first target pixel point and a gray-scale value of the first target pixel point; determining a first region with a preset area in the first image, and taking a central point of the first region as the first target pixel point; determining a second region with the preset area from the second image, wherein the longitudinal coordinate of the center of the second region in the second image is the same as the longitudinal coordinate of the center of the first region in the first image; and determining, from the second region, matched pixel points matching the first target pixel point.
3 . The method as claimed in claim 2 , wherein determining, from the second region, matched pixel points matching the first target pixel point comprises:
determining the correlation coefficient of each pixel point in the second region one by one, the correlation coefficient being used for representing a correlation between a pixel point in the second region and the first target pixel point; and determining a pixel point having the maximum correlation coefficient in the second region as the matched pixel point.
4 . The method as claimed in claim 3 , wherein determining the correlation coefficient of each pixel point in the second region one by one comprises:
determining an average gray-scale value of all pixel points in the first region as a first average gray-scale value, and determining an average gray-scale value of all pixel points in the second region as a second average gray-scale value; and determining a correlation coefficient between each pixel point in the second region and the first target pixel point according to a difference between the gray-scale value of the first target pixel point in the first region and the first average gray-scale value and a difference between the gray-scale value of each pixel point in the second region and the second average gray-scale value.
5 . The method as claimed in claim 3 , wherein determining the pixel point having the maximum correlation coefficient in the second region as the matched pixel point comprises:
determining a pixel point having the maximum correlation coefficient in the second region as a candidate matched point; in cases where the candidate matched point overlaps the second target pixel point in the second image, determining the candidate matched point as the matched pixel point; and in cases where the candidate matched point does not overlap the second target pixel point in the second image, determining the second target pixel in a preset range around the candidate matched point as the matched pixel point.
6 . The method as claimed in claim 1 , wherein the method further comprises:
determining, on the basis of the length of the target code element, the width of the target code element, the spacing between the target code elements, and the pixel point coordinates of a central pixel point of the target code element, a target region where the target code element is located, wherein the pixel point coordinates of the central pixel point of the target code element are randomly generated in the region where the code element image is located; traversing all pixel points in the target region, and generating the target code element in the target region in cases where there is no described target code element in the target region, wherein the target code element at least comprises a line segment of a preset length and two end points corresponding to the line segment of the preset length; and generating the target code element at all the target regions within the code element image region.
7 . The method as claimed in claim 1 , wherein the method further comprises:
determining a first neighborhood code element set of any code element in the first image and a plurality of second neighborhood code element set of a plurality of candidate code elements in the second image; determining the number of matched neighborhood code elements in the plurality of second adjacent code element sets and the number of matched neighborhood code elements in the first neighborhood code element set, and determining, as a target second neighborhood code element set, a second neighborhood code element set having the maximum number of matched neighborhood code elements in the plurality of second neighborhood code element sets; and determining the candidate code element corresponding to the target second neighborhood code element set as the target code element.
8 . The method as claimed in claim 1 , wherein the method further comprises:
determining a plurality of first target pixel points in the first image and a plurality of second target pixel points in the second image; and matching the plurality of first target pixel points with the plurality of second target pixel points in the second image on a one-to-one basis.
9 . (canceled)
10 . A system for three-dimensional reconstruction, comprising:
at least two image collection devices, a projection device and a first processor, wherein
the projecting device is configured to project a predetermined code element image onto the surface of an object to be measured;
the at least two image acquisition modules are configured to acquire the predetermined code element images from the surface of the object to be measured, so as to obtain a first image and a second image; and
the first processor is configured to acquire a first target pixel point of each code element in the first image, and determine, in the second image, a matched pixel point for the first target pixel point of each code element in the first image; and is further configured to determine the three-dimensional coordinates of the first target pixel point at least according to the predetermined pixel point coordinates of the first target pixel point in the first image and the predetermined pixel point coordinates of the matched pixel point in the second image, so as to complete three-dimensional reconstruction.
11 . A non-transitory storage medium, comprising a stored program, when the program runs, a device where the non-transitory storage medium is located is configured to:
acquire a first image and a second image, wherein the first image and the second image are respectively obtained by means of different image collection devices collecting a predetermined code element image projected onto the surface of an object to be measured, the predetermined code element image comprising a plurality of target code elements that are randomly distributed in a preset direction, and the target code elements being line segment stripes; acquire a first target pixel point of each code element in the first image, and determine, in the second image, a matched pixel point for the first target pixel point of each code element in the first image; and determine the three-dimensional coordinates of the first target pixel point at least according to the predetermined pixel point coordinates of the first target pixel point in the first image and the predetermined pixel point coordinates of the matched pixel point in the second image, so as to complete three-dimensional reconstruction.
12 . (canceled)
13 . The method as claimed in claim 1 , wherein the orientations of a plurality of target code elements in the first image are the same, and the spacing between the code elements is randomly determined.
14 . The method as claimed in claim 1 , wherein there is an epipolar constraint relationship between the first image and the second image.
15 . The method as claimed in claim 3 , wherein the correlation coefficient comprises a zero mean normalized cross correlation (ZNCC) determined by using a ZNCC method for matching.
16 . The system as claimed in claim 10 , wherein the first processor is configured to:
determine the pixel point coordinates of the first target pixel point and a gray-scale value of the first target pixel point; determine a first region with a preset area in the first image, and take a central point of the first region as the first target pixel point; determine a second region with the preset area from the second image, wherein the longitudinal coordinate of the center of the second region in the second image is the same as the longitudinal coordinate of the center of the first region in the first image; and determine, from the second region, matched pixel points matching the first target pixel point.
17 . The system as claimed in claim 16 , wherein the first processor is configured to:
determine the correlation coefficient of each pixel point in the second region one by one, the correlation coefficient being used for representing a correlation between a pixel point in the second region and the first target pixel point; and determine a pixel point having the maximum correlation coefficient in the second region as the matched pixel point.
18 . The system as claimed in claim 17 , wherein the first processor is configured to:
determine an average gray-scale value of all pixel points in the first region as a first average gray-scale value, and determine an average gray-scale value of all pixel points in the second region as a second average gray-scale value; and determine a correlation coefficient between each pixel point in the second region and the first target pixel point according to a difference between the gray-scale value of the first target pixel point in the first region and the first average gray-scale value and a difference between the gray-scale value of each pixel point in the second region and the second average gray-scale value.
19 . The system as claimed in claim 17 , wherein the first processor is configured to:
determine a pixel point having the maximum correlation coefficient in the second region as a candidate matched point; in cases where the candidate matched point overlaps the second target pixel point in the second image, determine the candidate matched point as the matched pixel point; and in cases where the candidate matched point does not overlap the second target pixel point in the second image, determine the second target pixel in a preset range around the candidate matched point as the matched pixel point.
20 . The system as claimed in claim 10 , wherein the first processor is configured to:
determine a first neighborhood code element set of any code element in the first image and a plurality of second neighborhood code element set of a plurality of candidate code elements in the second image; determine the number of matched neighborhood code elements in the plurality of second adjacent code element sets and the number of matched neighborhood code elements in the first neighborhood code element set, and determine, as a target second neighborhood code element set, a second neighborhood code element set having the maximum number of matched neighborhood code elements in the plurality of second neighborhood code element sets; and determine the candidate code element corresponding to the target second neighborhood code element set as the target code element.
21 . The system as claimed in claim 10 , wherein the image collection devices comprise a gray-scale camera and a color camera.
22 . The system as claimed in claim 10 , wherein the orientations of a plurality of target code elements in the first image are the same, and the spacing between the code elements is randomly determined.Cited by (0)
No later patents cite this yet.
References (0)
No backward citations on record.