3D scanning processing method, device and 3D scanning equipment
The 3D scanning method enhances scanning efficiency and accuracy by projecting lines, collecting multiple 2D images, and performing 3D reconstruction using three cameras to address the inefficiencies and accuracy issues in binocular laser scanning.
Patent Information
- Application Number
- JP2024535326
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-12-17
- Filing Date
- 2022-12-16
- Publication Date
- 2025-11-05
- Estimated Expiration
- 2042-12-16
AI Technical Summary
The scanning efficiency of binocular laser scanning in related art cannot meet high scanning efficiency requirements, and increasing the number of scanning lines in a binocular scanning system leads to a rapid decline in matching accuracy.
A 3D scanning method involving projecting multiple lines onto an object's surface using a pattern projector, collecting three frames of 2D images with three cameras, determining matching point pairs, verifying consistency, and performing 3D reconstruction to obtain accurate 3D points.
Improves scanning efficiency by collecting 2D images through three cameras, matching point pairs, and performing 3D reconstruction to enhance matching accuracy.
Smart Images

Figure 0007764614000001 
Figure 0007764614000002 
Figure 0007764614000003
Abstract
Description
[Technical Field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This disclosure claims priority to a Chinese patent application, application number 202111556738.2, entitled "3D scanning processing method, apparatus and 3D scanning device," filed with the State Intellectual Property Office of China on December 17, 2021, the entire contents of which are incorporated herein by reference.
[0002] The present disclosure relates to the field of three-dimensional scanning technology, and in particular to a three-dimensional scanning processing method, apparatus and three-dimensional scanning equipment. [Background technology]
[0003] As handheld 3D scanning technology becomes more mature, its industrial applications are becoming more widespread. In actual scanning scenes, some industrial objects to be inspected are often large-volume products, necessitating high scanning efficiency. The most common scanning method used to date is binocular laser scanning, which uses laser lines of 20 or less, which is insufficient for some scenes requiring high scanning efficiency. While increasing the number of scanning lines is necessary to improve scanning efficiency, increasing the number of scanning lines in binocular stereoscopic vision systems reduces matching accuracy.
[0004] The scanning efficiency of binocular laser scanning in related art cannot meet some scenes with high scanning efficiency requirements. A way to improve scanning efficiency is to increase the number of scanning lines. However, increasing the number of scanning lines in a binocular scanning system will cause a rapid decline in matching accuracy, and currently no effective solution has been proposed. Summary of the Invention
[0005] The main purpose of the present disclosure is to provide a processing method, apparatus and 3D scanning equipment for 3D scanning, which solves the problem that the scanning efficiency of binocular laser scanning in the related art cannot meet some scenes with high scanning efficiency requirements, and a way to improve scanning efficiency is to increase the number of scanning lines, but increasing the number of scanning lines in a binocular scanning system causes the matching accuracy to rapidly decrease.
[0006] To achieve the above object, one aspect of the present disclosure provides a 3D scanning processing method, including: projecting a plurality of lines onto a surface of an object to be measured using a pattern projector; collecting 2D images of the surface of the object to obtain three frames of 2D images correspondingly; determining matching point pairs between two of the three frames of 2D images to obtain three sets of matching point pairs correspondingly; verifying matching consistency between the matching point pairs; and performing 3D reconstruction for the matching point pairs with matching consistency to obtain 3D points on the surface of the object to be measured.
[0007] Furthermore, determining two-by-two matching point pairs in the three two-dimensional images of the frames and correspondingly obtaining three sets of matching point pairs includes: obtaining a plurality of lines in the three two-dimensional images of the frames, where the line is composed of a plurality of pixel points; selecting one pixel point on the line in the two-dimensional image of one frame as a selection point, and determining a plurality of candidate matching points that match the selection point in the two-dimensional image of the other frame; performing 3D reconstruction of the selection point and the plurality of candidate matching points based on trigonometry to obtain a plurality of first candidate 3D points; and determining the first candidate 3D point that satisfies a preset condition as a second candidate 3D point, where there are a plurality of second candidate 3D points; and configuring the candidate matching point corresponding to the second candidate 3D point and the selected point as the matching point pair.
[0008] Furthermore, before verifying the matching consistency between the three sets of matching point pairs, the method further includes: obtaining a plurality of light planes corresponding to the second candidate 3D points, where the light planes are light planes corresponding to the selected points; and determining a target light plane corresponding to the selected points from the plurality of light planes.
[0009] Furthermore, determining a target light plane corresponding to the selected point from the plurality of light planes includes obtaining a plurality of light planes corresponding to a plurality of pixel points on the same line as the selected point, calculating the number of times each light plane appears, and setting the light plane that appears the most frequently as the target light plane.
[0010] Further, verifying the matching consistency among the three sets of matching point pairs includes: selecting a matching point corresponding to the target light plane as a target matching point; configuring the selected point and the target matching point into a target matching point pair to obtain three sets of target matching point pairs; and verifying the consistency among the three sets of target matching point pairs.
[0011] Furthermore, the two-dimensional images of the three frames are respectively a two-dimensional image of a first frame, a two-dimensional image of a second frame, and a two-dimensional image of a third frame, and verifying the matching consistency between the three sets of target matching point pairs includes: obtaining a selected point in the two-dimensional image of the first frame, a first target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the second frame; obtaining a selected point in the two-dimensional image of the first frame, and a second target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the third frame; obtaining a target matching point in the two-dimensional image of the second frame of a selected point in the two-dimensional image; obtaining a third target light plane determined by matching the target matching point in the two-dimensional image of the second frame with the two-dimensional image of the third frame; and determining whether the first target light plane, the second target light plane, and the third target light plane are the same light plane, and when the first target light plane, the second target light plane, and the third target light plane are the same light plane, the three sets of target matching point pairs have matching consistency.
[0012] Furthermore, determining a pixel point on a line in a two-dimensional image of one frame as a selected point and a plurality of candidate matching points that match the selected point in a two-dimensional image of another frame includes obtaining a polar equation corresponding to the selected point in the two-dimensional image of the other frame, and determining intersections of the polar equation with a plurality of lines in the two-dimensional image of the other frame as the plurality of candidate matching points.
[0013] To achieve the above object, according to another aspect of the present disclosure, a 3D scanning device is provided, which includes three cameras, and the three cameras are combined two by two to obtain three binocular systems, where the three binocular systems are used to collect two-dimensional images of a surface of an object to be measured, and correspondingly obtain three frames of two-dimensional images, whereby matching point pairs are determined between two of the three frames of two-dimensional images, and three sets of matching point pairs are correspondingly obtained, and matching consistency between the matching point pairs is verified, and 3D reconstruction is performed for the matching point pairs having matching consistency, and 3D points on the surface of the object to be measured are obtained.
[0014] To achieve the above object, according to another aspect of the present disclosure, there is provided a 3D scanning processing device, including: a projection unit configured to project a plurality of lines onto a surface of an object to be measured via a pattern projector; a collection unit configured to collect 2D images of the surface of the object to obtain three frames of 2D images correspondingly via three cameras; a first determination unit configured to determine matching point pairs between two of the three frames of 2D images to obtain three sets of matching point pairs correspondingly; a verification unit configured to verify matching consistency between the matching point pairs; and a reconstruction unit configured to perform 3D reconstruction for the matching point pairs having matching consistency to obtain 3D points on the surface of the object to be measured.
[0015] The determination unit further includes: a first acquisition subunit configured to acquire multiple lines in the two-dimensional images of the three frames, where the line is composed of multiple pixel points; a first determination subunit configured to select one pixel point on the line in the two-dimensional image of one frame as a selection point and determine multiple candidate matching points that match the selection point in the two-dimensional image of the other frame; a reconstruction subunit configured to perform 3D reconstruction of the selection point and the multiple candidate matching points based on trigonometry to obtain multiple first candidate 3D points; a second determination subunit configured to determine the first candidate 3D point that satisfies a preset condition as a second candidate 3D point, where there are multiple second candidate 3D points; and a first construction subunit configured to construct the candidate matching point corresponding to the second candidate 3D point and the selected point into the matching point pair.
[0016] Furthermore, the apparatus further includes an acquisition unit configured to acquire a plurality of light planes corresponding to the second candidate 3D points before verifying the matching consistency between the three sets of matching point pairs, where the light planes are light planes corresponding to the selected points, and a second determination unit configured to determine a target light plane corresponding to the selected points from the plurality of light planes.
[0017] Further, the second determination unit includes a second acquisition subunit configured to acquire a plurality of light planes corresponding to a plurality of pixel points on the same line as the selection point, and a calculation subunit configured to calculate the occurrence count of each light plane and set the light plane with the most occurrence count as the target light plane.
[0018] Further, the verification unit includes a second construction subunit configured to set a matching point corresponding to the target light plane as a target matching point, and to construct the selected point and the target matching point into a target matching point pair to obtain three sets of target matching point pairs, and a verification subunit configured to verify the consistency among the three sets of target matching point pairs.
[0019] Furthermore, the three two-dimensional images of the frames are respectively a two-dimensional image of a first frame, a two-dimensional image of a second frame, and a two-dimensional image of a third frame, and the verification subunit includes a first acquisition module configured to acquire a selected point in the two-dimensional image of the first frame and a first target light plane determined by matching the selected point between the two-dimensional image of the first frame and the two-dimensional image of the second frame; a second acquisition module configured to acquire a selected point in the two-dimensional image of the first frame and a second target light plane determined by matching the selected point between the two-dimensional image of the first frame and the two-dimensional image of the third frame; and a second acquisition module configured to acquire a selected point in the two-dimensional image of the first frame and a second target light plane determined by matching the selected point between the two-dimensional image of the first frame and the two-dimensional image of the third frame. a third acquisition module configured to acquire target matching points in the two-dimensional image of the second frame; a fourth acquisition module configured to acquire a third target light plane determined by matching the target matching points in the two-dimensional image of the second frame with the two-dimensional image of the third frame; and a judgment module configured to judge whether the first target light plane, the second target light plane, and the third target light plane are the same light plane, and when the first target light plane, the second target light plane, and the third target light plane are the same light plane, the three sets of target matching point pairs have matching consistency.
[0020] Further, the first determination subunit includes a fifth acquisition unit configured to acquire a polar equation corresponding to the two-dimensional image of the other frame of the selected point, and determine the intersections of the polar equation and a plurality of lines in the two-dimensional image of the other frame as the plurality of candidate matching points.
[0021] To achieve the above object, according to another aspect of the present disclosure, there is provided a computer-readable storage medium, the storage medium including a program stored therein, wherein the program executes the method for processing a three-dimensional scan described in any one of the above claims.
[0022] To achieve the above object, according to another aspect of the present disclosure, a processor is provided, the processor being used to execute a program, wherein when the program is running, the method for processing a 3D scan described in any one of the above claims is executed.
[0023] The present disclosure uses steps such as projecting multiple lines onto the surface of the object to be measured through a pattern projector, collecting two-dimensional images of the surface of the object to be measured through three cameras, correspondingly obtaining three frames of two-dimensional images, determining matching point pairs between two pairs in the three frames of two-dimensional images, correspondingly obtaining three sets of matching point pairs, verifying the matching consistency between the matching point pairs, and performing 3D reconstruction for the matching point pairs with matching consistency to obtain 3D points on the surface of the object to be measured. This solves the problem that the scanning efficiency of binocular laser scanning in the related art cannot meet some scenes with high scanning efficiency requirements, and a way to improve scanning efficiency is to increase the number of scanning lines. However, increasing the number of scanning lines in a binocular scanning system will cause the matching accuracy to rapidly decrease. Two-dimensional images of the surface of the object to be measured are collected through three cameras, three frames of two-dimensional images are obtained, the three frames of two-dimensional images are matched two by two to obtain three sets of matching point pairs, and three-dimensional reconstruction is performed on the matching point pairs with matching consistency to obtain three-dimensional points on the surface of the object to be measured, thereby achieving the effect of further improving the accuracy of matching. [Brief explanation of the drawings]
[0024] The drawings constituting a part of this disclosure are intended to provide a further understanding of the disclosure, and the schematic examples of the disclosure and their description are intended to explain the disclosure but are not intended to limit the disclosure. [Figure 1] 1 is a flowchart of a method for processing a three-dimensional scan provided by an embodiment of the present disclosure. [Figure 2] FIG. 10 illustrates three selectable frames of two-dimensional images provided by an embodiment of the present disclosure. [Figure 3] 1 illustrates an optional 3D scanning device provided by an embodiment of the present disclosure. [Figure 4] FIG. 1 illustrates a processing device for three-dimensional scanning provided by an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0025] It should be noted that, unless contradictory, the embodiments and features in the embodiments of the present disclosure can be combined with each other. Hereinafter, the present disclosure will be described in detail in accordance with the embodiments with reference to the drawings.
[0026] In order to help those skilled in the art understand the technical solutions of the present disclosure better, the following will clearly and comprehensively describe the technical solutions in the embodiments of the present disclosure in conjunction with the drawings in the embodiments of the present disclosure. Of course, the described embodiments are only some embodiments of the present disclosure, and not all embodiments. Based on the embodiments of the present disclosure, those skilled in the art can obtain all other embodiments without creative work, and all of these embodiments should be included in the claims of the present disclosure.
[0027] It should be noted that the technical terms "first," "second," etc. in the specification and claims of the present disclosure and the above drawings are used to distinguish between similar objects, and are not intended to describe a particular order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, and therefore, the embodiments of the present disclosure in these descriptions should be understood to be consistent with the present disclosure. may be performed in an order other than that shown or described herein. Furthermore, the terms "comprises" and "comprises" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus comprising a series of steps or units need not be limited to those steps or units expressly listed, but may include other steps or units that are not expressly listed or that are inherent to the process, method, product, or apparatus.
[0028] The present invention will be described below according to preferred implementation steps. FIG. 1 is a flowchart of a 3D scanning processing method provided by an embodiment of the present disclosure. As shown in FIG. 1, the method includes the following steps:
[0029] In step S101, a plurality of lines are projected onto the surface of the object to be measured via a pattern projector.
[0030] For example, a plurality of scan lines (for example, laser scan lines can be used) are projected via a pattern projector of a three-dimensional scanning device onto the surface of an object for which a three-dimensional model needs to be constructed.
[0031] In step S102, two-dimensional images of the surface of the object to be measured are collected via three cameras, and three frames of two-dimensional images are obtained correspondingly.
[0032] Three cameras (e.g., the three cameras are Cam L, Cam M, and Cam R) of the 3D scanning device are used to collect two-dimensional images of the surface of an object from which a three-dimensional model needs to be constructed, and three frames of two-dimensional images are correspondingly acquired (e.g., three frames of two-dimensional images as shown in FIG. 2 ). The three frames of two-dimensional images are a first frame of two-dimensional image, a second frame of two-dimensional image, and a third frame of two-dimensional image, respectively. In the embodiment of the present disclosure, the 3D scanning device is a handheld 3D scanner, which can move and scan relative to the object to be measured. Preferably, the three cameras can be acquired synchronously, i.e., the three cameras acquire synchronously at a first time, then at a second time, until the scan is completed, to ensure that the images acquired by the three cameras are consistent. The three cameras do not need to operate synchronously, but the acquisition time intervals should be extremely short to ensure that the position of the 3D scanning device relative to the object to be measured remains almost constant. The 3D scanning device is fixed and used each time the object to be measured is acquired, i.e., the 3D scanning device is fixed at a first position to acquire one location on the object to be measured, and then fixed at a second position to acquire another location on the object to be measured, and so on until the scanning of the object to be measured is completed, so there is no need to limit whether the three cameras acquire data synchronously or not.
[0033] In step S103, two-to-two matching point pairs are determined in the three frames of two-dimensional images, and three sets of matching point pairs are obtained correspondingly.
[0034] Three frames of 2D images are matched two by two to obtain three corresponding matching point pairs. For example, as shown in Figure 2, if there is a point A(1,2) on the two-dimensional image of the first frame, and the coordinates of the matching point obtained by matching A(1,2) in the two-dimensional image of the second frame are B1(2,3), then the matching point pair between the two-dimensional image of the first frame and the two-dimensional image of the second frame are A(1,2) and B1(2,3), and if the coordinates of the matching point obtained by matching A(1,2) in the two-dimensional image of the third frame are C(1,3), then the matching point pair between the two-dimensional image of the first frame and the two-dimensional image of the third frame are A(1,2) and C(1,3), and if the matching point obtained by matching B1(2,3) in the two-dimensional image of the second frame in the two-dimensional image of the third frame is C(1,3), then the matching point pair between the two-dimensional image of the second frame and the two-dimensional image of the third frame are B1(2,3) and C(1,3).
[0035] In step S104, the matching consistency between the matching point pairs is verified.
[0036] The three obtained matching point pairs are verified to have matching consistency.
[0037] In step S105, 3D reconstruction is performed for the matching point pairs with matching consistency to obtain 3D points on the surface of the object.
[0038] When the three matching point pairs have matching consistency, 3D reconstruction is performed for the points to obtain the 3D points of the object that need to be used to construct a 3D model, and a 3D model of the object is constructed using these 3D points.
[0039] Through the above steps, two-dimensional images of the object are collected through three cameras, three frames of two-dimensional images are obtained, the three frames of two-dimensional images are matched two by two to obtain matching point pairs, and three-dimensional reconstruction is performed on the matching point pairs with matching consistency, thereby obtaining a three-dimensional model of the object and improving the matching accuracy of the three-dimensional reconstruction.
[0040] Optionally, in the 3D scanning processing method provided by the embodiments of the present disclosure, determining two-by-two matching point pairs in three frame two-dimensional images and correspondingly obtaining three sets of matching point pairs includes: obtaining a plurality of lines in the three frame two-dimensional images, where the line is composed of a plurality of pixel points; selecting one pixel point on the line in one frame two-dimensional image as a selection point, and determining a plurality of candidate matching points that match the selected point in another frame two-dimensional image; performing 3D reconstruction for the selection point and the plurality of candidate matching points based on triangulation to obtain a plurality of first candidate 3D points; and determining the first candidate 3D point that satisfies a preset condition as a second candidate 3D point, where there are a plurality of second candidate 3D points; and configuring the candidate matching point corresponding to the second candidate 3D point and the selected point as a matching point pair.
[0041] For example, as shown in FIG. 2, the two-dimensional images of three frames include multiple lines (i.e., multiple scanning lines projected by a pattern projector), and each line is composed of multiple pixel points. In FIG. 2, the image corresponding to Cam L is the two-dimensional image of the first frame, the image corresponding to Cam M is the two-dimensional image of the second frame, and the image corresponding to Cam H is the two-dimensional image of the third frame. Point A in the two-dimensional image of the first frame is taken as the selected point, and multiple candidate matching points that match A are found in the two-dimensional image of the second frame. For example, the candidate matching points in the two-dimensional image of the second frame are B 1 、B 2 、B 3 、B 4 、B 5 , and BIt is 6. Perform three-dimensional reconstruction for point A and candidate matching points B1, B2, B3, B4, B5, and B6 by the triangulation method, and obtain a plurality of first candidate three-dimensional points O1, O2, O3, O4, O5, and O6. Perform preliminary screening on the first candidate three-dimensional points, and those that meet the preset conditions are used as the second candidate three-dimensional points. The screening method is to calculate the distance Distance(k) from each of the first candidate three-dimensional points to the optical plane Plane(k) corresponding to all scanning lines. If the distance value of a certain first candidate three-dimensional point is within a predetermined distance threshold, that is, if Distance(k) < dist TH, it means that the first candidate three-dimensional point is located on the k-th optical plane (the k-th projection line), that is, it can be known that the first candidate three-dimensional point meets the predetermined requirements. Assuming that the second candidate three-dimensional points are O1, O2, and O3, the candidate matching points B1, B2, and B3 corresponding to O1, O2, and O3 form matching point pairs with point A. By the above method, the matching points of each pixel point in the two-dimensional image of the first frame in the two-dimensional image of the second frame are obtained. Similarly, by the same method, the matching point pairs of the two-dimensional image of the first frame and the two-dimensional image of the third frame, and the matching point pairs of the two-dimensional image of the second frame and the two-dimensional image of the third frame are obtained.
[0042] By obtaining a plurality of lines in the two-dimensional images of three frames, the coordinates of each pixel point in the two-dimensional images of three frames can be easily determined. By matching the two-dimensional images of three frames in pairs, three sets of matching point pairs can be obtained, and the accuracy of the matching can be effectively improved.
[0043] Optionally, in the three-dimensional scanning processing method provided by the embodiments of the present disclosure, before verifying the matching consistency between the three sets of matching point pairs, the method further includes obtaining a plurality of optical planes corresponding to the second candidate three-dimensional points, where the optical plane is the optical plane corresponding to the selected point, and determining the target optical plane corresponding to the selected point from the plurality of optical planes.
[0044] Before verifying the three sets of matching point pairs, it is necessary to determine the optimal matching point pair. In theory, when matching in the two-dimensional images of two frames, only one pair among the obtained multiple matching point pairs is accurate, so it is necessary to determine the optimal matching point pair. First, the second candidate 3D point is determined by calculating the distance Distance(k) from the point to the optical plane Plane(k) corresponding to all scanning lines. If the distance value of a certain second candidate 3D point is within a predetermined distance threshold, that is, if Distance(k) < dist TH, it can be known that the point is located on the k-th optical plane (the k-th projection line). That is, one second candidate 3D point corresponds to one optical plane. For example, the optical planes corresponding to the second candidate 3D points O1, O2, and O3 are K1, K2, and K3, respectively. The optimal optical plane (i.e., the above target optical plane) is selected from these optical planes.
[0045] Further screening for the obtained three sets of matching point pairs can be performed to more accurately obtain the reconstructed 3D points on the object surface.
[0046] Optionally, in the 3D scanning processing method provided by the embodiments of the present disclosure, determining the target optical plane corresponding to the selected point from a plurality of optical planes includes obtaining a plurality of optical planes corresponding to a plurality of pixel points on the same line as the selected point, calculating the number of appearances of each optical plane, and setting the optical plane with the most appearances as the target optical plane.
[0047] For example, to select an optimal light plane from light planes K1, K2, and K3, first obtain multiple light planes corresponding to multiple pixel points on the same line as the selected point. As shown in FIG. 2, multiple pixel points on the same line as point A are A1, A2, A3, and A4. The multiple light planes corresponding to A1 are K1 and K2, the multiple light planes corresponding to A2 are K1 and K4, the multiple light planes corresponding to A3 are K1, K2, and K3, and the multiple light planes corresponding to A4 are K1 and K2. The number of times each light plane appears is calculated, and the light plane that appears most frequently is determined as the optimal light plane. That is, the optimal light plane corresponding to point A is K1. In actual use, the lines in the three-frame two-dimensional images may be discontinuous lines. The optimal light plane corresponding to the selected point is determined by obtaining multiple light planes corresponding to multiple pixel points on the line within the adjacent area of the selected point.
[0048] The optimum light plane corresponding to the selected point is determined through a plurality of light planes corresponding to a plurality of pixel points on the same line as the selected point, thereby improving the accuracy of the light plane corresponding to the pixel point.
[0049] Optionally, in the 3D scanning processing method provided by the embodiments of the present disclosure, verifying the matching consistency among the three sets of matching point pairs includes: selecting a matching point corresponding to a target light plane as a target matching point; configuring the selected point and the target matching point into a target matching point pair to obtain three sets of target matching point pairs; and verifying the consistency among the three sets of target matching point pairs.
[0050] When verifying the matching consistency between the three sets of matching point pairs, it is only necessary to verify the consistency between the optimal matching point pairs (i.e., the above target matching point pairs). The matching points corresponding to the optimal light plane are the optimal matching points. For example, the optimal matching point pair between the two-dimensional image of the first frame and the two-dimensional image of the second frame is A(1,2) and B1(2,3), and the corresponding optimal light plane is K1; the optimal matching point pair between the two-dimensional image of the first frame and the two-dimensional image of the third frame is A(1,2) and C(1,3), and the corresponding optimal light plane is K1; the optimal matching point pair between the two-dimensional image of the second frame and the two-dimensional image of the third frame is B1(2,3) and C(1,3), and the corresponding optimal light plane is K1; Since the 3D points on the object surface from which a 3D model needs to be constructed can only be the 3D points reconstructed by the optimal matching point pairs, it is necessary to verify the consistency between the optimal matching point pairs.
[0051] Optionally, in the processing method for 3D scanning provided by the embodiment of the present disclosure, the two-dimensional images of the three frames are respectively a two-dimensional image of a first frame, a two-dimensional image of a second frame, and a two-dimensional image of a third frame, and verifying the matching consistency between the three sets of target matching point pairs includes: obtaining a selected point in the two-dimensional image of the first frame and a first target light plane determined by matching the selected point between the two-dimensional image of the first frame and the two-dimensional image of the second frame; and obtaining a selected point in the two-dimensional image of the first frame and a second target light plane determined by matching the selected point between the two-dimensional image of the first frame and the two-dimensional image of the third frame. obtaining a target matching point in the two-dimensional image of the second frame of a selected point in the two-dimensional image of the first frame; obtaining a third target light plane determined by matching the target matching point in the two-dimensional image of the second frame with the two-dimensional image of the third frame; and determining whether the first target light plane, the second target light plane, and the third target light plane are the same light plane, and when the first target light plane, the second target light plane, and the third target light plane are the same light plane, the three sets of target matching point pairs have matching consistency.
[0052] For example, if a point on a two-dimensional image of a first frame is A(1,2), and the coordinates of the optimal matching point obtained by matching A(1,2) in the two-dimensional image of a second frame are B1(2,3), the optimal matching point pair between the two-dimensional image of the first frame and the two-dimensional image of the second frame are A(1,2) and B1(2,3), and the corresponding optimal light plane is K1. If the coordinates of the optimal matching point obtained by matching A(1,2) in the two-dimensional image of a third frame are C(1,3), the optimal matching point pair between the two-dimensional image of the first frame and the two-dimensional image of the third frame are A(1,2) and C(1,3), and the corresponding optimal light plane is K1. If the optimal matching point obtained by matching B1(2,3) in the two-dimensional image of the second frame with the two-dimensional image of the third frame is C(1,3), then the optimal matching point pair between the two-dimensional image of the second frame and the two-dimensional image of the third frame is B1(2,3) and C(1,3), and the corresponding optimal light plane is K1. According to the above example, if the optimal light planes obtained by matching two by two are the same, i.e., K1, then it can be seen that the three optimal matching point pairs have matching consistency.
[0053] The light planes corresponding to the matching point pairs are verified to determine whether they have matching consistency, because the light planes are the same and therefore the matching point pairs are the same 3D points in 3D. This step further improves the accuracy of matching.
[0054] Optionally, in a 3D scanning processing method provided by an embodiment of the present disclosure, selecting one pixel point on a line in a 2D image of one frame as a selected point, and determining multiple candidate matching points that match the selected point in the 2D image of another frame includes obtaining a polar equation corresponding to the selected point in the 2D image of the other frame, and selecting intersections of the polar equation with multiple lines in the 2D image of the other frame as multiple candidate matching points.
[0055] For example, when determining multiple candidate matching points for point A in the two-dimensional image of the first frame in the two-dimensional image of the second frame, this needs to be achieved by using a polar equation. First, a polar equation is obtained by calculation based on the relative positions of Cam L and Cam M. For example, the intersections of the schematic polar equation shown in Figure 2 and multiple lines in the two-dimensional image of another frame are used as multiple candidate matching points.
[0056] The 3D scanning processing method provided by the embodiments of the present disclosure includes: projecting a plurality of lines onto the surface of the object to be measured through a pattern projector; collecting 2D images of the surface of the object to be measured through three cameras, and correspondingly obtaining three frames of 2D images; determining matching point pairs between two of the three frames of 2D images, and correspondingly obtaining three sets of matching point pairs; verifying the matching consistency between the matching point pairs; and performing 3D reconstruction for the matching point pairs with matching consistency to obtain 3D points on the surface of the object to be measured. This solves the problem that the scanning efficiency of binocular laser scanning in the related art cannot meet some scenes with high scanning efficiency requirements. A way to improve scanning efficiency is to increase the number of scanning lines, but increasing the number of scanning lines in a binocular scanning system will cause the matching accuracy to rapidly decrease. Two-dimensional images of the surface of the object to be measured are collected through three cameras, three frames of two-dimensional images are obtained, the three frames of two-dimensional images are matched two by two to obtain three sets of matching point pairs, and three-dimensional reconstruction is performed on the matching point pairs with matching consistency to obtain three-dimensional points on the surface of the object to be measured, thereby achieving the effect of further improving the accuracy of matching.
[0057] An embodiment of the present disclosure further provides a 3D scanning device, which includes three cameras, and the three cameras are combined two by two to obtain three binocular systems, wherein the three binocular systems are used to collect two-dimensional images of the surface of the object to be measured and correspondingly obtain three frames of two-dimensional images, wherein matching point pairs are determined between two of the three frames of two-dimensional images, and three sets of matching point pairs are correspondingly obtained, and matching consistency between the matching point pairs is verified, and 3D reconstruction is performed for the matching point pairs with matching consistency, and 3D points on the surface of the object to be measured are obtained.
[0058] 3 shows an optional 3D scanning device provided by an embodiment of the present disclosure, where Cam L, Cam M, and Cam R are three cameras, and the three cameras are arranged two by two to form a three-eye system. Projector is a pattern projector.
[0059] It should be noted that the steps depicted in the flowcharts of the figures may be performed, for example, in a computer system as a set of computer-executable commands, and that although a logical order is shown in the flowcharts, in some cases the steps may be performed in a different order than those shown or described.
[0060] The embodiments of the present disclosure further provide a processing device for 3D scanning, and it should be noted that the processing device for 3D scanning of the embodiments of the present disclosure can execute the processing method for 3D scanning provided by the embodiments of the present disclosure. The processing device for 3D scanning provided by the embodiments of the present disclosure will be described below.
[0061] 4 is a diagram illustrating a processing apparatus for 3D scanning according to an embodiment of the present disclosure. As shown in FIG. 4, the apparatus includes a projection unit 401, a collection unit 402, a first determination unit 403, a verification unit 404, and a reconstruction unit 405.
[0062] The projection unit 401 is configured to project a plurality of lines onto the surface of the workpiece via a pattern projector.
[0063] The collection unit 402 is configured to collect two-dimensional images of the surface of the workpiece via three cameras, and correspondingly obtain three frames of the two-dimensional images.
[0064] The first determining unit 403 is configured to determine matching point pairs between two pairs in the three frames of two-dimensional images, and obtain three sets of matching point pairs correspondingly.
[0065] The verification unit 404 is configured to verify the matching consistency between the matching point pairs.
[0066] The reconstruction unit 405 is configured to perform 3D reconstruction on the matching point pairs with matching consistency to obtain 3D points on the surface of the object.
[0067] In the 3D scanning processing device provided by the embodiments of the present disclosure, the projection unit 401 projects a plurality of lines onto the surface of the object to be measured through a pattern projector, the collection unit 402 collects two-dimensional images of the surface of the object to be measured through three cameras, and correspondingly obtains three frames of two-dimensional images, the first determination unit 403 determines two-by-two matching point pairs in the three frames of two-dimensional images, and correspondingly obtains three sets of matching point pairs, the verification unit 404 verifies the matching consistency between the matching point pairs, and the reconstruction unit 405 performs three-dimensional reconstruction for the matching point pairs with matching consistency, and obtains three-dimensional points on the surface of the object to be measured, thus The scanning efficiency of binocular laser scanning cannot meet some scenes with high scanning efficiency requirements. A way to improve scanning efficiency is to increase the number of scanning lines. However, increasing the number of scanning lines in a binocular scanning system will cause the matching accuracy to rapidly decrease. This problem is solved by collecting two-dimensional images of the surface of the object to be measured through three cameras, obtaining three frames of two-dimensional images, matching the three frames of two-dimensional images two by two, obtaining three sets of matching point pairs, and performing three-dimensional reconstruction for the matching point pairs with matching consistency to obtain three-dimensional points on the surface of the object to be measured, thereby achieving the effect of further improving the matching accuracy.
[0068] Optionally, in a 3D scanning processing device provided by an embodiment of the present disclosure, the determination unit includes: a first acquisition subunit configured to acquire a plurality of lines in the three frame two-dimensional images, where the line is composed of a plurality of pixel points, before determining matching point pairs between two pairs in the three frame two-dimensional images and correspondingly obtaining three sets of matching point pairs; a first determination subunit configured to take one pixel point on the line in the two-dimensional image of one frame as a selected point and determine a plurality of candidate matching points that match the selected point in the two-dimensional image of the other frame; a reconstruction subunit configured to perform 3D reconstruction of the selected point and the plurality of candidate matching points based on trigonometry to obtain a plurality of first candidate 3D points; a second determination subunit configured to determine the first candidate 3D point that satisfies a preset condition as a second candidate 3D point, where there are a plurality of second candidate 3D points; and a first construction subunit configured to construct a matching point pair between the candidate matching point corresponding to the second candidate 3D point and the selected point.
[0069] Optionally, in the 3D scanning processing device provided by an embodiment of the present disclosure, the device further includes: an acquisition unit configured to acquire a plurality of light planes corresponding to second candidate 3D points before verifying the matching consistency between the three sets of matching point pairs, where the light planes are light planes corresponding to the selected points; and a second determination unit configured to determine a target light plane corresponding to the selected points from the plurality of light planes.
[0070] Optionally, in a 3D scanning processing device provided by an embodiment of the present disclosure, the second determination unit includes a second acquisition subunit configured to acquire a plurality of light planes corresponding to a plurality of pixel points on the same line as the selection point, and a calculation subunit configured to calculate the number of occurrences of each light plane and set the light plane with the most occurrences as the target light plane.
[0071] Optionally, in a 3D scanning processing device provided by an embodiment of the present disclosure, the verification unit includes: a second construction subunit configured to set a matching point corresponding to the target light plane as a target matching point; construct the selected point and the target matching point into a target matching point pair to obtain three sets of target matching point pairs; and a verification subunit configured to verify consistency between the three sets of target matching point pairs.
[0072] Optionally, in the processing device for 3D scanning provided by the embodiment of the present disclosure, the two-dimensional images of the three frames are respectively a two-dimensional image of a first frame, a two-dimensional image of a second frame, and a two-dimensional image of a third frame, and the verification subunit includes a first acquisition module configured to acquire a selected point in the two-dimensional image of the first frame and a first target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the second frame; a second acquisition module configured to acquire a selected point in the two-dimensional image of the first frame and a second target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the third frame; The system includes: a third acquisition module configured to acquire a target matching point in the two-dimensional image of the second frame of the selected point in the image; a fourth acquisition module configured to acquire a third target light plane determined by matching the target matching point in the two-dimensional image of the second frame with the two-dimensional image of the third frame; and a judgment module configured to determine whether the first target light plane, the second target light plane, and the third target light plane are the same light plane, and when the first target light plane, the second target light plane, and the third target light plane are the same light plane, the three sets of target matching point pairs have matching consistency.
[0073] Optionally, in a 3D scanning processing device provided by an embodiment of the present disclosure, the first determination subunit includes a fifth acquisition unit configured to acquire a polar line equation corresponding to a 2D image of another frame of the selected point, and determine intersections of the polar line equation with a plurality of lines in the 2D image of the other frame as a plurality of candidate matching points.
[0074] The 3D scanning processing device includes a processor and a memory, and the projection unit, collection unit, first determination unit, verification unit, reconstruction unit, etc. are all stored in the memory as program units, and the processor realizes the corresponding functions by executing the program units stored in the memory.
[0075] The processor includes a kernel, which calls a corresponding program unit from the memory. One or more kernels can be installed, and the kernel parameters can be adjusted to reconstruct the 3D points of the object.
[0076] The memory may include forms of volatile memory, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM), in a computer-readable medium, and the memory includes at least one memory chip.
[0077] An embodiment of the present invention provides a computer-readable storage medium having a program stored thereon, the program implementing a method for processing a three-dimensional scan when executed by a processor.
[0078] An embodiment of the present invention provides a processor, the processor being adapted to execute a program, which when run performs a method for processing a three-dimensional scan.
[0079] An embodiment of the present invention provides an apparatus, which includes a processor, a memory, and a program stored in the memory and executable by the processor. When the processor executes the program, it realizes steps such as projecting a plurality of lines onto the surface of the object to be measured through a pattern projector, collecting two-dimensional images of the surface of the object to be measured through three cameras, correspondingly obtaining three frames of two-dimensional images, determining matching point pairs between two pairs in the three frames of two-dimensional images, correspondingly obtaining three sets of matching point pairs, verifying the matching consistency between the matching point pairs, and performing three-dimensional reconstruction for the matching point pairs with matching consistency, thereby obtaining three-dimensional points on the surface of the object to be measured.
[0080] Optionally, determining two-by-two matching point pairs in the three-frame two-dimensional images and correspondingly obtaining three sets of matching point pairs includes: obtaining a plurality of lines in the three-frame two-dimensional images, where the line is composed of a plurality of pixel points; selecting one pixel point on the line in the two-dimensional image of one frame as a selection point, and determining a plurality of candidate matching points that match the selection point in the two-dimensional image of the other frame; performing 3D reconstruction for the selection point and the plurality of candidate matching points based on trigonometry to obtain a plurality of first candidate 3D points; determining the first candidate 3D point that satisfies a preset condition as a second candidate 3D point, where there are a plurality of second candidate 3D points; and configuring the candidate matching point corresponding to the second candidate 3D point and the selected point as a matching point pair.
[0081] Optionally, before verifying the matching consistency between the three sets of matching point pairs, the method further includes: obtaining a plurality of light planes corresponding to second candidate 3D points, where the light planes are light planes corresponding to the selected points; and determining a target light plane corresponding to the selected points from the plurality of light planes.
[0082] Optionally, determining a target light plane corresponding to the selected point from the plurality of light planes includes obtaining a plurality of light planes corresponding to a plurality of pixel points on the same line as the selected point, calculating the number of occurrences of each light plane, and determining the light plane with the most occurrences as the target light plane.
[0083] Optionally, verifying the matching consistency among the three sets of matching point pairs includes: setting a matching point corresponding to the target light plane as a target matching point; configuring the selected point and the target matching point into a target matching point pair to obtain three sets of target matching point pairs; and verifying the consistency among the three sets of target matching point pairs.
[0084] Optionally, the three frames of two-dimensional images are a first frame of two-dimensional image, a second frame of two-dimensional image, and a third frame of two-dimensional image, respectively, and verifying the matching consistency between the three sets of target matching point pairs includes: acquiring a selected point in the two-dimensional image of the first frame, and a first target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the second frame; acquiring a selected point in the two-dimensional image of the first frame, and a second target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the third frame; obtaining a target matching point in the two-dimensional image of the second frame of a selected point in the two-dimensional image of the frame; obtaining a third target light plane determined by matching the target matching point in the two-dimensional image of the second frame with the two-dimensional image of the third frame; and determining whether the first target light plane, the second target light plane, and the third target light plane are the same light plane, and when the first target light plane, the second target light plane, and the third target light plane are the same light plane, the three sets of target matching point pairs have matching consistency.
[0085] Optionally, determining a plurality of candidate matching points that match a pixel point on a line in a two-dimensional image of one frame as a selected point in a two-dimensional image of another frame includes obtaining a polar equation corresponding to the selected point in the two-dimensional image of the other frame, and determining intersections of the polar equation with a plurality of lines in the two-dimensional image of the other frame as the plurality of candidate matching points. The device in this specification may be a server, a PC, a PAD, a mobile phone, etc.
[0086] The present disclosure further provides a computer program product, which, when executed by a data processing device, executes program initialization including steps such as projecting a plurality of lines onto the surface of the workpiece through a pattern projector; collecting two-dimensional images of the surface of the workpiece through three cameras, correspondingly obtaining three frames of two-dimensional images; determining matching point pairs between two pairs in the three frames of two-dimensional images, correspondingly obtaining three sets of matching point pairs; verifying matching consistency between the matching point pairs; and performing three-dimensional reconstruction for the matching point pairs having matching consistency, thereby obtaining three-dimensional points on the surface of the workpiece.
[0087] Optionally, determining two-by-two matching point pairs in the three-frame two-dimensional images and correspondingly obtaining three sets of matching point pairs includes: obtaining a plurality of lines in the three-frame two-dimensional images, where the line is composed of a plurality of pixel points; selecting one pixel point on the line in the two-dimensional image of one frame as a selection point, and determining a plurality of candidate matching points that match the selection point in the two-dimensional image of the other frame; performing 3D reconstruction for the selection point and the plurality of candidate matching points based on trigonometry to obtain a plurality of first candidate 3D points; determining the first candidate 3D point that satisfies a preset condition as a second candidate 3D point, where there are a plurality of second candidate 3D points; and configuring the candidate matching point corresponding to the second candidate 3D point and the selected point as a matching point pair.
[0088] Optionally, before verifying the matching consistency between the three sets of matching point pairs, the method further includes: obtaining a plurality of light planes corresponding to second candidate 3D points, where the light planes are light planes corresponding to the selected points; and determining a target light plane corresponding to the selected points from the plurality of light planes.
[0089] Optionally, determining a target light plane corresponding to the selected point from the plurality of light planes includes obtaining a plurality of light planes corresponding to a plurality of pixel points on the same line as the selected point, calculating the number of occurrences of each light plane, and determining the light plane with the most occurrences as the target light plane.
[0090] Optionally, verifying the matching consistency among the three sets of matching point pairs includes: setting a matching point corresponding to the target light plane as a target matching point; configuring the selected point and the target matching point into a target matching point pair to obtain three sets of target matching point pairs; and verifying the consistency among the three sets of target matching point pairs.
[0091] Optionally, the three frames of two-dimensional images are a first frame of two-dimensional image, a second frame of two-dimensional image, and a third frame of two-dimensional image, respectively, and verifying the matching consistency between the three sets of target matching point pairs includes: acquiring a selected point in the two-dimensional image of the first frame, and a first target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the second frame; acquiring a selected point in the two-dimensional image of the first frame, and a second target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the third frame; obtaining a target matching point in the two-dimensional image of the second frame of a selected point in the two-dimensional image of the frame; obtaining a third target light plane determined by matching the target matching point in the two-dimensional image of the second frame with the two-dimensional image of the third frame; and determining whether the first target light plane, the second target light plane, and the third target light plane are the same light plane, and when the first target light plane, the second target light plane, and the third target light plane are the same light plane, the three sets of target matching point pairs have matching consistency.
[0092] Optionally, determining a pixel point on a line in the two-dimensional image of one frame as a selected point and a plurality of candidate matching points matching the selected point in the two-dimensional image of another frame includes: obtaining a polar equation corresponding to the selected point in the two-dimensional image of the other frame; and determining intersections of the polar equation with a plurality of lines in the two-dimensional image of the other frame as the plurality of candidate matching points. 。
[0093] This application will be described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to configure an apparatus, where the instructions executed by the processor of the computer or other programmable data processing device can be used to implement a specified function in one or more processes in the flowcharts and / or one or more blocks in the block diagrams.
[0094] These computer program instructions may be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, and thus the instructions stored in the computer-readable memory constitute an article of manufacture that includes an instruction apparatus that implements the specified functionality of a process or processes in the flowcharts and / or a block or blocks in the block diagrams.
[0095] These computer program instructions may be installed on a computer or other programmable data processing device, and the instructions executed by the computer or other programmable device provide steps for implementing a given function in one or more processes in the flowcharts and / or one or more blocks in the block diagrams by causing the computer or other programmable device to perform a series of operational steps to generate a computer-implemented process.
[0096] In one exemplary configuration, a computing device includes one or more center It includes a processing unit (CPU), input / output interfaces, network interfaces, and memory.
[0097] The memory may include forms of computer-readable media such as volatile memory, random access memory (RAM), and / or non-volatile memory, for example, read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0098] Computer-readable media include non-volatile and volatile, portable and non-portable media, and may be implemented by any method or technology for storing information. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital video disk (DVD) or optical storage, cassette tape, magnetic disk or other magnetic storage device, or any other non-transmission medium that may be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory storage computer-readable media, such as modulated data signals and carriers.
[0099] It should be further explained that the technical terms "comprises," "includes," or any other variations thereof are intended to cover a non-exclusive "comprise," whereby a process, method, product, or apparatus comprising a set of elements not only includes those elements, but also further includes other elements not expressly listed, or further includes elements to which such process, method, product, or apparatus is unique. In the absence of further qualification, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, product, or apparatus that comprises the element.
[0100] Those skilled in the art will appreciate that the present application may be provided as a method, a system, or a computer program product. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. The present application may also take the form of a computer program product embodied in one or more computer-usable storage media (including, but not limited to, magnetic disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0101] The above is merely an example of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modifications, equivalent changes, improvements, etc. made without departing from the spirit and principles of the present application should be included in the scope of the claims of the present application. [Industrial Applicability]
[0102] The 3D scanning processing method, device, and 3D scanning equipment provided in the embodiments of the present disclosure use steps such as projecting multiple lines onto the surface of the object to be measured through a pattern projector, collecting 2D images of the surface of the object to be measured through three cameras, correspondingly obtaining three frames of 2D images, determining matching point pairs between two pairs in the three frames of 2D images, correspondingly obtaining three sets of matching point pairs, verifying the matching consistency between the matching point pairs, and performing 3D reconstruction for the matching point pairs with matching consistency to obtain 3D points on the surface of the object to be measured. This solves the problem that the scanning efficiency of binocular laser scanning in the related art cannot meet some scenes with high scanning efficiency requirements, and a way to improve scanning efficiency is to increase the number of scanning lines. However, increasing the number of scanning lines in a binocular scanning system causes the matching accuracy to rapidly decrease. Two-dimensional images of the surface of the object to be measured are collected through three cameras, three frames of two-dimensional images are obtained, the three frames of two-dimensional images are matched two by two to obtain three sets of matching point pairs, and three-dimensional reconstruction is performed on the matching point pairs with matching consistency to obtain three-dimensional points on the surface of the object to be measured, thereby achieving the effect of further improving the accuracy of matching.
Claims
1. 1. A method for processing a three-dimensional scan, comprising: projecting a plurality of lines onto a surface of the object via a pattern projector; collecting two-dimensional images of the surface of the object via three cameras and correspondingly obtaining three frames of the two-dimensional images; determining matching point pairs between two pairs of the three frames of two-dimensional images, and correspondingly obtaining three sets of matching point pairs; verifying matching consistency between the matching point pairs; performing 3D reconstruction for the matching point pairs having matching consistency to obtain 3D points on the surface of the object; Verifying matching consistency between the matching point pairs includes: A candidate matching point corresponding to a target light plane corresponding to a selected point, which is one pixel point on a line in a two-dimensional image of one frame, and which matches the selected point in a two-dimensional image of another frame is set as a target matching point; The selected point and the target matching point are configured as a target matching point pair to obtain three sets of target matching point pairs; and verifying consistency among the three sets of target matching point pairs.
2. Determining two-to-one matching point pairs in the three frames of two-dimensional images and correspondingly obtaining three sets of matching point pairs includes: acquiring a plurality of lines in the three-frame two-dimensional image, wherein the lines are composed of a plurality of pixel points; determining a pixel point on a line in a two-dimensional image of one frame as a selected point, and determining a plurality of candidate matching points that match the selected point in two-dimensional images of other frames; performing 3D reconstruction for the selected point and the plurality of candidate matching points based on triangulation to obtain a plurality of first candidate 3D points; determining a first candidate three-dimensional point that satisfies a preset condition as a second candidate three-dimensional point, wherein there are a plurality of second candidate three-dimensional points; and forming the candidate matching point corresponding to the second candidate 3D point and the selected point into the matching point pair.
3. Before verifying matching consistency between the matching point pairs, the method further comprises: obtaining a plurality of light planes corresponding to the second candidate three-dimensional points; determining a target light plane corresponding to the selected point from the plurality of light planes corresponding to the second candidate three-dimensional point; Determining a target light plane corresponding to the selected point from the plurality of light planes corresponding to the second candidate three-dimensional point includes: acquiring a plurality of light planes corresponding to scan lines corresponding to a plurality of pixel points on the same line as the selected point; 3. The method according to claim 2, further comprising: calculating the number of occurrences of each light plane corresponding to a plurality of pixel points on the same line as the selected point; and determining the light plane with the most occurrences as the target light plane.
4. The three frames of two-dimensional images are a first frame of two-dimensional image, a second frame of two-dimensional image, and a third frame of two-dimensional image, respectively, and verifying consistency among the three sets of target matching point pairs includes: Acquiring a selected point in the two-dimensional image of the first frame and a first target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the second frame; Acquiring a selected point in the two-dimensional image of the first frame and a second target light plane determined by matching the selected point with the two-dimensional image of the first frame and the two-dimensional image of the third frame; Obtaining a target matching point in the two-dimensional image of the second frame of the selected point in the two-dimensional image of the first frame; Acquiring a third target light plane determined by matching the target matching point in the two-dimensional image of the second frame with the two-dimensional image of the third frame; determining whether the first target light plane, the second target light plane, and the third target light plane are the same light plane; 2. The method of claim 1, wherein the three sets of target matching point pairs have matching consistency when the first target light plane, the second target light plane, and the third target light plane are the same light plane.
5. determining a plurality of candidate matching points that match the selected pixel point on a line in a two-dimensional image of one frame and that match the selected pixel point on a two-dimensional image of another frame; obtaining a polar equation corresponding to the two-dimensional image of the other frame at the selected point; 3. The method of claim 2, further comprising determining the plurality of candidate matching points as intersections of the polar equation with a plurality of lines in the two-dimensional image of the other frame.
6. Determining a first candidate three-dimensional point that satisfies a preset condition as a second candidate three-dimensional point includes:
3. The method of claim 2, further comprising: determining that a first candidate 3D point satisfies the preset condition if the first candidate 3D point is located on any of a plurality of light planes corresponding to all scan lines.
7. Determining a first candidate three-dimensional point that satisfies a preset condition as a second candidate three-dimensional point includes: calculating a distance from the first candidate three-dimensional point to each light plane corresponding to all scanning lines to obtain a plurality of distances; and determining that the first candidate 3D point satisfies the preset condition if a distance value among the plurality of distances is within a predetermined distance threshold.
8. After performing 3D reconstruction for the matching point pairs having matching consistency and obtaining 3D points on the surface of the object to be measured, the method further comprises:
2. The method of claim 1, further comprising constructing a three-dimensional model based on three-dimensional points on the surface of the workpiece.
9. Obtaining a plurality of light planes corresponding to the second candidate three-dimensional points includes:
4. The method of claim 3, further comprising: determining, from among the light planes corresponding to all the scanning lines, light planes whose distances to each second candidate 3D point are smaller than a distance threshold, thereby obtaining a plurality of light planes corresponding to the second candidate 3D points.
10. A three-dimensional scanning device includes three cameras, and the three cameras are combined two by two to obtain three binocular systems, wherein the three binocular systems are used to collect two-dimensional images of a surface of a measurement object, and correspondingly obtain three frames of two-dimensional images, wherein matching point pairs are determined between two of the three frames of two-dimensional images, and three sets of matching point pairs are correspondingly obtained, and matching consistency between the matching point pairs is verified, and three-dimensional reconstruction is performed for the matching point pairs having matching consistency, and three-dimensional points on the surface of the measurement object are obtained; Verifying matching consistency between the matching point pairs includes: A candidate matching point corresponding to a target light plane corresponding to a selected point, which is one pixel point on a line in a two-dimensional image of one frame, and which matches the selected point in a two-dimensional image of another frame is set as a target matching point; The selected point and the target matching point are configured as a target matching point pair to obtain three sets of target matching point pairs; and verifying consistency among the three sets of target matching point pairs.
11. 1. A processing device for three-dimensional scanning, comprising: a projection unit configured to project a plurality of lines onto a surface of the workpiece via a pattern projector; a collection unit configured to collect two-dimensional images of the surface of the object via three cameras and correspondingly obtain three frames of the two-dimensional images; a first determining unit configured to determine matching point pairs between two pairs of the three frames of two-dimensional images, and correspondingly obtain three sets of matching point pairs; a verification unit configured to verify matching consistency between the matching point pairs; a reconstruction unit configured to perform 3D reconstruction for matching point pairs having matching consistency to obtain 3D points on the surface of the object; The verification unit A candidate matching point corresponding to a target light plane corresponding to a selected point, which is one pixel point on a line in a two-dimensional image of one frame, and which matches the selected point in a two-dimensional image of another frame is set as a target matching point; The selected point and the target matching point are configured as a target matching point pair to obtain three sets of target matching point pairs; and verifying consistency among the three sets of target matching point pairs.
12. A computer program for causing a computer to execute the method for processing three-dimensional scans according to any one of claims 1 to 9.
13. A processor adapted to execute a program, wherein said program, when running, executes the method for processing three-dimensional scans according to any one of claims 1 to 9.
Citation Information
Patent Citations
Structured light matching of sets of curves from two cameras
JP2017510793A
High-precision dynamic real-time 360-degree omnibearing point cloud acquisition method based on fringe projection
WO2021088481A1