Method and apparatus for measuring the pose, size and shape of objects in a 3D scene
Through computer-implemented 3D scene processing methods, voxelization and classification point clouds are generated to generate common planes and projected voxel planes, which solves the problem of insufficient 3D measurement speed and accuracy in the existing technology and achieves fast and accurate 3D object measurement. , suitable for applications in multiple industries.
Patent Information
- Application Number
- CN202080000716.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-25
- Filing Date
- 2020-04-02
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-04-02
AI Technical Summary
When the existing technology measures the posture, size, and shape of objects in a 3D scene, the speed and accuracy of the measurement results are difficult to meet the needs of online production, and traditional methods cannot perform 3D measurements in real time, and are not effectively compatible with applications in different industries.
Through computer-implemented methods, the point cloud of the 3D scene is received, voxelized into voxels of the same size, and the voxels are classified into the first and second categories, the plane parameters and normal vectors of each voxel are calculated, and a common plane, performs projected voxel plane processing, performs edge detection and line extraction, and forms pose, size and shape measurements of 3D objects.
It can quickly extract 3D features, accurately register 3D objects, meet the speed and accuracy requirements of online measurement, can perform 3D measurements in real time, and is compatible with different 3D sensors, making it suitable for applications in multiple industries.
Smart Images

Figure CN113728360B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates generally to three-dimensional (3D) object recognition, and more particularly to methods and apparatus for pose, dimension and shape measurement of objects in 3D scenes. Background Art
[0002] In recent years, 3D vision has received great attention and has gradually become one of the most promising fields in the market. This technology has an overwhelming advantage in providing complete information of 3D physical space, which has led to the emergence of many 3D measurement applications, such as factory production line automation, building construction, and automotive vision enhancement.
[0003] Traditionally, there are several common methods for measuring in 3D scenes in different industries. For the measurement of mechanical parts, local contact measurement is usually used. However, this method cannot obtain complete data of mechanical parts, and the resolution of the measurement is limited. In addition, the processing speed is also slow. Another method is to apply the complete geometric dimension measurement provided by current commercial 3D scanning and measurement systems. However, such systems can only provide offline measurements, and the required processing time is far from meeting the needs of online production. Therefore, a new method is needed to accurately and efficiently achieve geometric measurement of 3D objects. Summary of the invention
[0004] Based on the above problems, the present invention provides an alternative computer-implemented method and apparatus for measuring the pose, size and shape of at least one 3D object in a 3D scene.
[0005] According to an embodiment of the present invention, a computer-implemented method for posture, size and shape measurement of at least one 3D object in a scanned 3D scene is provided. The method includes receiving a point cloud of a scanned 3D scene, wherein the scanned 3D scene includes at least one 3D object represented by a plurality of points in the point cloud. The method also includes voxelizing the point cloud into a plurality of voxels of equal size; classifying the plurality of voxels into a first type of voxel and a second type of voxel, wherein if the voxel meets the plane requirement, the voxel is classified as the first type of voxel, and if the voxel does not meet the plane requirement, the voxel is classified as the second type of voxel. For each first type of voxel, at least one plane parameter of a plane fitted by points in the voxel is calculated, and for each second type of voxel, a normal vector of each point in the voxel is calculated. The method also includes growing at least one common plane for the plurality of voxels based on the calculated at least one plane parameter of the first type of voxel and the normal vector of each point in the second type of voxel, and creating at least one projected voxel plane for each common plane in the at least one common plane, wherein the at least one projected voxel plane includes a plurality of projected voxels. The method also includes performing edge detection on each projection voxel plane in at least one projection voxel plane to obtain edge projection voxels on each corresponding projection voxel plane; extracting lines from the edge projection voxels in each projection voxel plane of the at least one projection voxel plane; and connecting the lines together to form an object for each projection voxel plane in the at least one projection voxel plane, thereby being used for posture, size and shape measurement of 3D objects in the scanned 3D scene.
[0006] According to another embodiment of the present invention, a computer-implemented method for extracting geometric information from a point cloud is provided. The method includes voxelizing the point cloud into a plurality of voxels of the same size; classifying the plurality of voxels into a first type of voxel and a second type of voxel, wherein if the voxel meets a first requirement, the voxel is classified as a first type of voxel, and if the voxel does not meet the first requirement, the voxel is classified as a second type of voxel. The first requirement includes the following conditions: (a) the number of points within the voxel is greater than a predetermined threshold, and (b) the points inside the voxel are in a regular structure. The method also includes extracting regular structures from the first type of voxels; if the regular structures of the adjacent first type of voxels meet the second requirement, merging the adjacent first type of voxels to form at least one wide regular structure; if each point in each second type of voxel produces the best local match with the regular structure of one of the adjacent first type of voxels, the point is associated with the one of the adjacent first type of voxels; and outputting the at least one wide regular structure as the geometric information of the point cloud.
[0007] Accordingly, an exemplary embodiment of the present invention relates to a computerized system, which includes a processor and a memory coupled to the processor. The memory and the processor are jointly configured to cause the computerized system to perform actions according to the above-described embodiments.
[0008] Compared to the prior art, such as local contact measurement and 3D measurement solutions currently on the market, the above exemplary embodiments of the present invention have many advantages and benefits. For example, the method according to the present invention can quickly extract 3D features and accurately register 3D objects by using the algorithm described herein. Therefore, the online measurement requirements are met by balancing the speed and accuracy of the measurement results.
[0009] Another advantage of the present invention is that the computer-implemented method can perform 3D measurements based on real-world scenes in real time and can therefore be implemented on personal computers (PCs) and embedded chips.
[0010] Furthermore, the computer-implemented method is compatible with different 3D sensors and can be applied in a variety of applications across different industries, such as building construction or high-precision microscopy. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The above and other features, advantages and aspects of the embodiments of the present invention will become more apparent through the following detailed description with reference to the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0012] Figure 1 It shows a plurality of scenarios in which the embodiments of the present invention can be applied;
[0013] Figure 2 Shown in Figure 1 Processes according to embodiments of the present invention in various applications related to the illustrated scenarios;
[0014] Figure 3 is a flow chart of a method for measuring the pose, size and shape of at least one 3D object in a scanned 3D scene according to an embodiment of the present invention;
[0015] Figure 4 is a flow chart of a normal vector estimation method based on hybrid voxel-point according to an embodiment of the present invention;
[0016] Figure 5 A hybrid voxel-point based normal vector estimation process according to an embodiment of the present invention is shown;
[0017] Figure 6 A hybrid voxel-point based plane segmentation process according to an embodiment of the present invention is shown;
[0018] Figure 7 A 2D projection plane of a merged plane according to an embodiment of the present invention is shown, wherein some geometric features describing the projection plane are shown;
[0019] Figure 8 shows a 2D projection plane of a merged plane with some geometric features according to one embodiment of the present invention;
[0020] Fig. 9 A process of performing geometric filtering according to an embodiment of the present invention is shown;
[0021] Fig.10 shows a binarized projection plane according to an embodiment of the present invention;
[0022] Fig.11 A process of performing edge detection according to an embodiment of the present invention is shown;
[0023] Fig.12 A flow chart of a hybrid voxel-point based line extraction method according to an embodiment of the present invention is shown;
[0024] Fig.13a and 13b A diagram showing a process of detecting edge points according to an embodiment of the present invention;
[0025] Fig.14 A process of line extraction based on hybrid voxel-points according to an embodiment of the present invention is shown;
[0026] Fig.15 The process of generating L2L line pair features according to one embodiment of the present invention is shown;
[0027] Fig.16 A method for processing a large amount of data arranged in a point cloud according to an embodiment of the present invention is shown;
[0028] Fig.17 is a schematic diagram of a computerized device for pose, size and shape measurement of at least one 3D object system in a scanned 3D scene according to one embodiment of the present invention; and
[0029] Fig.18 is a schematic diagram of a computerized system for pose, size and shape measurement of at least one 3D object in a scanned 3D scene according to one embodiment of the present invention. DETAILED DESCRIPTION
[0030] As used herein and in the claims, the term "comprising" means including the following elements but not excluding other elements. The term "based on" should be understood as "based at least in part on". The terms "an exemplary embodiment" and "exemplary embodiments" should be understood as "at least one exemplary embodiment". The term "another embodiment" should be understood as "at least one other embodiment".
[0031] As used herein and in the claims, a "3D object" refers to any real object with a pose, size, and shape in 3D space, which can be represented by a plurality of points in a point cloud of a scanned 3D scene. Accordingly, a "target 3D object" refers to a reference 3D object intended to be compared with the real 3D object. Likewise, 2D refers to two dimensions and 1D refers to one dimension.
[0032] As used herein and in the claims, "coupled" or "connected" means direct or indirect electrical coupling or connection by one or more electrical means, unless otherwise stated.
[0033] The following exemplary embodiments may be implemented individually or in combination to provide methods and systems for pose, size and shape measurement and object recognition of 3D objects in various applications in different industries, such as automation, building construction or high-precision microscopy.
[0034] Figure 1 A schematic diagram 100 is shown of a plurality of scenarios in which embodiments of the present invention may be applied. In the plurality of scenarios, a computerized device 110 is provided for pose, size and shape measurement and object recognition of at least one 3D object in a scanned 3D scene 130. The 3D scene 130 may be any scene in a physical environment that includes one or more physical objects having size and shape.
[0035] One or more 3D sensors 120 are configured to capture 3D vision of a 3D scene 130 and are coupled to the computerized device 110 to provide 3D data of the 3D scene 130 to the computerized device 110. The computerized device 110 processes the 3D data for different applications (e.g., applications 141-143), which will be described in detail below.
[0036] Exemplary 3D sensors that can be used herein include, but are not limited to, 3D scanners, digital cameras, and other types of devices capable of capturing images of real-world objects and / or scenes to collect their position, location, and appearance data. Depending on the specific application, the computerized device 110 can be a stand-alone computer or an embedded system, including but not limited to a laptop computer, a desktop computer, a tablet computer, a smart phone, an Internet device, an embedded device, etc. The 3D sensor 120 can be physically separated from the computerized device 110, or used in conjunction with or embedded in the computerized device 110.
[0037] In the schematic diagram 100, the application 141 is shown to perform 3D measurements on actual components of a mobile phone. In this embodiment, the 3D sensor 120 captures the 3D scene of the mobile phone board. Based on the 3D data provided by the 3D sensor 120, the computerized device 110 extracts the 3D geometric features of the flat panel components and performs geometric size and shape measurements on each component.
[0038] The application 142 in the schematic diagram 100 is shown as identifying a specific type of object among a plurality of different objects. In this embodiment, the 3D sensor 120 captures a 3D scene containing a plurality of different objects. Based on the 3D data provided by the 3D sensor 120, the computerized device 110 extracts 3D geometric features of the plurality of different objects and performs object recognition and registration to perform comparative measurements of size and shape, thereby identifying a specific type of object among the plurality of different objects.
[0039] The application 143 in the schematic diagram 100 is shown as a robotic picking application. In this embodiment, the 3D sensor 120 captures a 3D scene of a part tray containing a plurality of parts. Based on the 3D data provided by the 3D sensor 120, the computerized device 110 extracts the 3D geometric features of the plurality of parts, performs object registration to obtain the pose (position and orientation) of the parts, and then coordinates the robotic arm to pick up each part.
[0040] Reference now Figure 2 , FIG. 200 shows that Figure 1 The processes according to the embodiments of the present invention are shown in various applications related to the scenarios.
[0041] At block 210, 3D sensing is performed, such as by one or more 3D sensors 120, to generate a point cloud of the scanned 3D scene. Each object in the 3D scene is represented by a large number of points in the 3D space that encompass the surface of the 3D object.
[0042] In box 220, a computerized device (e.g., the computerized device 110 described above) receives a point cloud and performs 3D geometric feature extraction. In one embodiment, the 3D geometric feature extraction is based on a 3D hybrid voxel-point structure, including a normal vector estimation 221 based on a hybrid voxel-point, a plane segmentation 222 based on a hybrid voxel-point, a voxel-based geometric filtering 223, a voxel-based edge detection 224, and a line extraction 225 based on a hybrid voxel-point. In some embodiments, the voxel-based geometric filtering 223 can be omitted. Through the 3D geometric feature extraction process, at least geometric features such as edges and lines of three-dimensional objects in a three-dimensional scene can be identified. Then, these geometric features are passed to box 240 to measure geometric dimensions and shapes for various applications. The 3D geometric feature extraction according to the present invention will be described in detail below.
[0043] After the 3D geometric feature extraction, a feature-based object registration process is further performed at block 230. According to one embodiment of the present invention, the computerized device generates a line-to-line (L2L) line pair feature for each identified object in the 3D scene using the precise lines extracted from the 3D geometric feature extraction. The L2L line pair feature is further used to register the identified 3D object with the target 3D object.
[0044] The position and orientation of the identified 3D object are obtained through the object registration process 230. At block 260, the position and orientation conversion is performed for various applications, such as for application 143, where the robot arm uses this information to locate and pick up the identified 3D object in the part tray.
[0045] As a result of the object registration process, size and shape contrast measurements are further applied to the registered objects at block 250. According to one embodiment of the present invention, the rotation and translation from the actual object to its target object are calculated. That is, the pose of the actual object is estimated. Then, the difference between the target object and the rotated and translated actual object is calculated, thereby implementing an application based on contrast measurements.
[0046] Figure 3 is a flow chart of a method 300 for measuring the pose, size and shape of at least one 3D object in a scanned 3D scene according to an embodiment of the present invention. The method 300 may be performed by, for example Figure 1 The computerized device 110 is shown to be implemented.
[0047] At 305, the computerized device receives or acquires a point cloud of a scanned 3D scene. The scanned 3D scene includes at least one 3D object represented by a plurality of 3D points in the point cloud. The point cloud may be generated by a 3D sensor and transmitted to the computerized device wirelessly or by external or internal wires in various ways.
[0048] It is worth noting that the point cloud can be formed in a certain data format and structure for computerized processing. The present invention is not limited in this regard.
[0049] At 310, a computerized device voxelizes the point cloud into a plurality of voxels of equal size. During the voxelization process, the voxel size is calculated and then the point cloud is segmented into voxels of the same voxel size (i.e., of equal size) in 3D space. In one embodiment, the voxel size is determined based on the settings of the 3D sensor. In another embodiment, the voxel size is determined by a human operator based at least on the distribution of points in the point cloud and the granularity or accuracy required by the measurement application to ensure that there are enough points in the voxel for 3D object measurement.
[0050] At 315, if the voxel in the point cloud meets the plane requirement, it is classified as a first type of voxel, and if it does not meet the plane requirement, it is classified as a second type of voxel. The plane requirement defines whether the points in the voxel present a 2D plane structure in the 3D space. The plane structure is represented by at least one plane parameter, and the plane parameter may include a normal vector and an offset. In one embodiment, the offset is obtained based on the average value of all points in the voxel.
[0051] Then at 320 , for each voxel of the first type, at least one plane parameter of a 2D plane is calculated, the 2D plane fitting the points inside the voxel; and for each voxel of the second type, a normal vector of each point in the voxel is calculated.
[0052] At 325, at least one common plane of a plurality of voxels in the point cloud is grown based on the calculated at least one plane parameter of the first type of voxel and the normal vector of each point in the second type of voxel. Each common plane has a planar structure and can cover some points of one or more first type of voxels and zero or more second type of voxels. In addition, all points in the common plane are well-fitted with the plane parameters defining the common plane. By this growing method, each common plane can be associated with a specific 3D object in the scanned 3D scene.
[0053] At 330, for each common plane in the at least one common plane, a corresponding projection voxel plane is generated. For each common plane grown at 325, the 3D voxel data associated with the common plane is projected onto a 2D projection voxel plane perpendicular to the calculated normal vector of the common plane, thereby obtaining the projection voxel plane of the 3D voxel data. In this way, each 3D point in the common plane is represented by a 2D point in the projection voxel plane.
[0054] Additionally, each projection voxel plane is voxelized into a plurality of projection voxels in a 2D plane. These projection voxels can have the same size. Through this projection and voxelization process, the data in the three-dimensional space is mapped to a two-dimensional data structure, thereby significantly improving the measurement speed.
[0055] At 335 , edge detection is performed on each of the at least one projection voxel plane to obtain edge projection voxels on each corresponding projection voxel plane of the at least one projection voxel plane.
[0056] At 340, lines are extracted from edge-projected voxels in each of the at least one projected voxel plane.
[0057] At 345 , the lines are connected together to form an object for each of the at least one projected voxel plane for pose, size, and shape measurement of 3D objects in the scanned 3D scene.
[0058] It will be noted that although the operations are described above in a particular order, the operations are not necessarily performed in the particular order described above. For example, some operations may be performed in a multi-tasking manner or in parallel.
[0059] Figure 4 and Figure 5 A flow chart of a method 400 and a process 500 of normal vector estimation based on hybrid voxel-point according to an embodiment of the present invention are respectively shown. The method 400 and the process 500 provide exemplary implementations of the above steps 315 and 320. The method 400 and the process 500 will be described below in conjunction with these steps.
[0060] After the point cloud is voxelized, the method 400 starts with the input voxelized point cloud at 402. In steps 404-410, each voxel in the voxelized point cloud is classified as a first class or a second class based on the planarity requirement described at 315. In this embodiment, the first class voxels refer to good voxels, and the second class voxels refer to bad voxels.
[0061] In one embodiment of the present invention, the first condition of the plane requirement described at 315 is that the number of points in the voxel is greater than a first predetermined threshold, and the second condition is whether the 3D points in the voxel present a plane structure. Whether the points inside the voxel present a plane structure may depend on the measurement requirements of the specific application.
[0062] In an exemplary implementation of method 400, at 404, it is determined whether there are enough points in each voxel. If there are not enough points in the voxel, at 406, the voxel is marked as a bad voxel. On the other hand, if there are enough points in the voxel, at 408, a plane is constructed based on all the points in the voxel. In one embodiment, the average value of these points and the corresponding eigenvalues and eigenvectors are calculated. Based on these calculation results, a plane that best fits these data points is obtained.
[0063] Thereafter, the goodness of fit between the plane and the 3D data points is evaluated at 410. In one embodiment, the goodness of fit is a mean square error (MSE) value. It represents the average distance between each point in the voxel and the fitted plane. If the MSE in a single voxel is less than a first specified threshold, the voxel is determined to meet the second condition of the plane requirement, indicating that the points present a planar structure. For measurement applications in building construction, the first predefined threshold may be a few millimeters. For high precision applications such as microscopic measurement, it may be a few nanometers.
[0064] In another embodiment, additionally or alternatively, if the weighted MSE of the plane formed by merging neighboring voxels is less than a threshold and the normal vector difference between the fitted plane and the current voxel is less than another threshold, it is determined that the voxel meets the second condition of the plane requirement.
[0065] Therefore, at 410 , if the voxel meets the planarity requirement, it is classified as a good voxel and step 412 is performed; otherwise, it is considered a bad voxel and step 414 is performed.
[0066] At 412, the plane parameters of the good voxel are calculated based on the previously calculated eigenvalues, eigenvectors and average values. In one embodiment, the plane parameters consist of a normal vector and an offset.
[0067] At 414, voxels marked as bad are collected. In 3D space, a bad voxel may have 26 neighboring voxels. At 416, all points in the 26 neighboring voxels of the bad voxel and other points in the bad voxel are collected, so that these neighboring points form a local search area for each bad voxel.
[0068] At 418, for each point in the bad voxel, a search process is performed for neighboring points within a predetermined radius in its corresponding local search area. The range of the neighborhood (ie, predefined radius) for determining a point may be selected based on the level of detail required by the application.
[0069] At 420, a normal vector is calculated for each point in the bad voxel. In one embodiment, the single point normal vector is obtained based on eigenvalues and eigenvectors calculated using neighboring points within a predetermined radius.
[0070] In the above-described hybrid voxel-point based normal vector estimation method, a good balance between processing speed and measurement accuracy is achieved. Table 1 below shows the performance improvement of the hybrid voxel-point based normal vector estimation according to the present invention.
[0071] Table 1: Performance comparison of normal vector estimation
[0072] Number of points PCL Open3D The present invention 320,000 2.309s 0.490s 0.219s 40,000 0.171s 0.075s 0.031s 437,000 5.416s 0.700s 0.460s
[0073] The above performance comparison with the PCL (Point Cloud Library) package and the Open3D package was performed on a computer with an 8-core i7 Intel processor running at 2.8 GHz and using 16G memory. This shows that the processing speed is significantly improved using the method of the present invention. Compared with PCL, the processing speed is 10 times faster for a larger number of points, and compared with Open3D, the processing speed is 2 times faster.
[0074] From a visual perspective, Figure 5 A hybrid voxel-point based normal vector estimation process 500 is shown according to one embodiment of the present invention. Figure 5 A point cloud or a portion of a point cloud is shown, wherein a 3D scene containing 3D objects is shown in a 3D space 501. The point cloud is voxelized into a plurality of voxels of equal size, such as voxel 503 and voxel 505.
[0075] Voxel 503 contains a sufficient number of points, and these points present a plane structure 507. If the points within voxel 503 further represent voxel 503 well enough, as shown at 511, a normal vector 509 of plane 507 is calculated.
[0076] On the other hand, voxel 505 may not contain enough points, or the points inside voxel 505 may not be represented well enough, as shown in 513. In this case, as described above, for each point in voxel 505, a local search area is found, and a normal vector is calculated point by point based on each local search area. For example, point 515 is located in bad voxel 505. To estimate its normal vector, neighboring points within radius 517 are searched, and its normal vector 519 is calculated based on the points within radius 517.
[0077] After the point cloud is processed by process 500 , for each voxel of the first type, the corresponding plane and its plane parameters are obtained, and the normal vector of each point in the voxel of the second type is calculated.
[0078] Figure 6 A hybrid voxel-point based plane segmentation process 600 according to one embodiment of the present invention is shown. Process 600 provides an exemplary implementation of step 325 described above.
[0079] A plurality of voxels of the same size formed by voxelization of a point cloud are divided into a first type of voxel and a second type of voxel, wherein the point cloud corresponds to a 3D scene containing a 3D object in a 3D space 601. Through process 500, each plane and normal vector of the first type of voxel are obtained, such as plane 602 and normal vector 603 of voxel 604 and plane 605 and normal vector 606 of voxel 607. Each of these planes in the 3D space 601 includes a normal vector and an offset. In addition, the normal vectors of points in the second type of voxels are calculated, such as the normal vector of point 608 and the normal vector of point 609 in voxel 610.
[0080] In process 600, if neighboring voxels in the first class satisfy a plane-to-plane requirement, the neighboring voxels are merged to form at least one common plane. In one embodiment, the plane-to-plane requirement includes a first condition and a second condition, wherein under the first condition, the normal vectors of neighboring first class voxels are substantially equal, and under the second condition, the absolute difference of their offsets is less than a second predetermined threshold.
[0081] As an example, the normal vector 603 of the plane 602 and the normal vector 606 of the plane 605 are substantially equal, and the difference in the offset between the two is sufficiently small compared to the second predetermined threshold. In this case, the two voxels are merged to form a common plane 611. Accordingly, the normal vector 612 and the offset of the common plane 611 are recalculated.
[0082] For each voxel in the second class, each point in the voxel is associated with one of the neighboring first class voxels, that is, if the point in the voxel and one of the neighboring first class voxels produce the best point-to-plane match, the point is associated with the first class voxel. Specifically, for each point in each second class voxel, the neighboring first class voxel of the second class voxel is identified as a neighboring voxel. Then, the plane of the neighboring voxel is obtained as a neighboring plane, and if one of the neighboring planes produces the best point-to-plane match, the point is associated with the specific neighboring plane.
[0083] In one embodiment, point-to-plane matching depends on the distance of the point to the plane and the closeness of the normal vector of the point to the normal vector of the plane.
[0084] As an example, the bad voxel 610 may have one or more neighboring first-class voxels, such as the first-class voxel 604. Accordingly, there are one or more neighboring first-class voxels with which the points 608 and 609 in the voxel 610 may establish a neighbor relationship. In this embodiment, an association between the point 608 or 609 in the second-class voxel and the first-class voxel neighboring thereto is established only when the neighbor relationship represents the best match of the point to the plane.
[0085] In the above example of the process 600, the normal vector (not shown) of the point 608 is substantially equal to the normal vector 603 of the plane 602 that is fitted to one of the neighboring good voxels (e.g., voxel 604) to the point. At the same time, the distance 613 of the point 608 to the plane 602 is less than a threshold and is the minimum distance between the point 608 and other planes of the neighboring good voxels. Therefore, the point 608 is associated with the voxel 604.
[0086] The normal vector of point 609 differs greatly from the normal vector of plane 602, or even though the normal vector of point 609 (not shown) is approximately equal to the normal vector 603 of plane 602, the distance 614 of point 609 to plane 602 does not produce a best match of the point to the plane, so point 609 is not associated with voxel 604. If it satisfies the best match of the point to the plane, it may be associated with another good voxel.
[0087] Through the hybrid voxel-point based plane growing process 600, multiple voxels in the point cloud can be associated with one or more common planes (i.e., merged planes), each of which can be associated with a specific 3D object in the scanned 3D scene. Voxel-based growth and point-based growth can be performed in parallel. Compared with PCL, the processing speed of growing 14 planes for 100,000 points under the same conditions is increased from 2.319 seconds to 0.219 seconds, which is more than 10 times faster.
[0088] Figure 7 is a schematic diagram 700 of a 2D projection plane 710 of a common plane, showing some geometric features describing the projection plane, according to one embodiment of the present invention.
[0089] According to an embodiment of the present invention, each common plane grown by process 600 is associated with a plurality of points in the point cloud. The voxel data associated with the common plane is projected perpendicular to the calculated normal vector of the common plane, resulting in a 2D projection plane 710 into which the points from the voxels associated with the common plane are projected.
[0090] In addition, each 2D projection plane 710 can be voxelized into a plurality of projection voxels in the 2D plane. These projection voxels can have the same size, such as Figure 7 In this sense, the 2D projection plane 710 is converted into a projection voxel plane.
[0091] In one embodiment, to facilitate faster comparative measurements of size and shape, or to enable applications based on a target 3D object, geometric filtering can be applied to the projected voxel planes obtained from the point cloud of the 3D scene to filter out unwanted portions of the scanned 3D scene that do not contain the target 3D object. Filtering can be applied by examining each projected voxel plane and eliminating those that do not satisfy geometric features associated with the target 3D object.
[0092] The projection voxel plane of the target 3D object can be obtained or calculated as a 2D target projection plane for filtering. The geometric features describing the projection voxel plane can include the number of occupied projection voxels. For each projection voxel plane, the number of projection voxels occupied by the projection points and the number of projection voxels occupied by the projection points in the 2D target projection plane are counted. Here, the occupied projection voxel can refer to the number of associated points inside it exceeding a pre-specified threshold. By comparing these counts, those objects that are most likely not the target 3D object are filtered out. By counting the projection voxels, unwanted objects in the 3D scene can be quickly filtered out.
[0093] Additionally or alternatively, the geometric features describing the projected voxel plane may include the aspect ratio of the rotated bounding box. Figure 8 and Fig. 9 As shown, for the 3D object projected in the 2D projection plane 810, the rotated bounding box 820 is found. The present invention does not limit the implementation method of finding the rotated bounding box. The aspect ratio of the rotated bounding box of the target 3D object 920 can be obtained or calculated in a computerized device as the target aspect ratio. After the rotated bounding box of each 3D object in the scanned 3D scene 910 is found in the 2D projection plane, the aspect ratio of each rotated bounding box is calculated. By comparing the aspect ratio with the target aspect ratio, those 2D projection planes that are substantially inconsistent with the target aspect ratio can be filtered out.
[0094] Fig. 9 900 is a diagram showing the resulting geometric filtering process according to one embodiment of the present invention. After applying the geometric filtering, objects in the scanned 3D scene 910 that are similar to the target object 920 are identified, i.e., objects labeled 911-915, such as Fig. 9 As shown. Objects that are very different from the target object 920, that is, other objects in the scan scene 910, are filtered out and are not used for subsequent processing. The geometric filtering provided by the present invention is based on voxel counting, and the voxel counting speed is fast, so the filtering efficiency is high.
[0095] In one embodiment, to facilitate faster extraction of geometric features, multiple projection voxels in each projection voxel plane are binarized, such as Fig.10, which shows a binarized 2D projection plane 1000 according to an embodiment of the present invention. The binarization can be based on the number of points associated with each projection voxel. A first binary value is assigned to projection voxels with a number of points greater than a third predetermined threshold, and a second binary value is assigned to projection voxels with a number of points equal to or less than the third predetermined threshold.
[0096] In one embodiment, the filtering process 900 described above can be applied after binarizing each projection voxel plane of the 3D scene and the corresponding projection voxel plane of the target 3D object. As an example, the total number of binarized projection voxels with a first binary value in each projection voxel plane is counted as the projection count of the corresponding projection voxel plane. The total number of binarized target voxels with a first binary value in the target projection plane is counted as the target count of the target projection voxel plane. Then, if the absolute difference between the projection count and the target count exceeds a count threshold, the corresponding projection voxel plane is excluded.
[0097] According to one embodiment of the present invention, an edge detection process is performed at 335 for each binarized 2D projection plane obtained from the scanned 3D scene. An example of this is shown in Fig.10 Shown in.
[0098] In the binarized 2D projection plane 1000, for each projection voxel, its neighboring projection voxels are checked. If the binary value of the projection voxel is different from any of its neighboring projection voxels, the projection voxel is determined to be an edge projection voxel. Otherwise, it is determined to be a non-edge projection voxel.
[0099] For example, projection voxel 1005 is identified as an edge projection voxel, while projection voxel 1010 is identified as a non-edge projection voxel.
[0100] Results, such as Fig.11 As shown, only edge projection voxels in each projection voxel plane are retained, where the edge projection voxels in plane 1100 are identified from the binarized 2D projection plane 1000. Those identified edge projection voxels are candidate voxels of the edge. In this way, the detection of edge projection voxels is very fast.
[0101] Figure 12-14 FIG. 4 shows a process of line extraction based on hybrid voxel-point according to an embodiment of the present invention, which provides an exemplary implementation of the above step 340 .
[0102] Fig.12A flow chart of a method 1200 for line extraction based on hybrid voxel-points according to one embodiment of the present invention is shown. At 1202, the method 1200 starts by inputting identified edge projection voxels for processing. At 1204, each point in each edge projection voxel that meets the edge requirement is classified as an edge point, and only the edge points in each edge projection voxel are retained for further processing.
[0103] According to one embodiment, a subsampling method may be applied to the candidate edge projection voxels to determine whether each point within the edge projection voxel is an edge point or an interior point. Fig.13a and 13b These two cases are shown. If a point is an interior point, such as Fig.13a As shown, then the vector OP i The angle distribution between 1310 and other neighboring points will be continuous. Fig.13b The edge points shown have at least one angular gap G θ 1320 is pretty big.
[0104] Returning to method 1200, after detecting edge points in each projection voxel plane, in steps 1206-1212, each edge projection voxel in each projection voxel plane is classified into the first class or the second class based on the straight line requirement. In other words, if the edge points within the edge projection voxels meet the straight line requirement, then these edge projection voxels are marked as the first class edge projection voxels, and if they do not meet the straight line requirement, they are marked as the second class edge projection voxels. In this embodiment, the first class voxels refer to good projection voxels, and the second class voxels refer to bad projection voxels.
[0105] In one embodiment of the present invention, the straight line requirement includes a first condition that the number of points within the edge projection voxel is greater than a fourth predetermined threshold, and a second condition that the points within the edge projection voxel present a line structure. In one embodiment, the line structure includes specific points on the line and a unit vector indicating the orientation of the line.
[0106] At 1206, it is determined whether there are enough edge points in each edge projection voxel. If there are not enough points in the edge projection voxel, then at 1208, the edge projection voxel is marked as bad. On the other hand, if there are enough points in the edge projection voxel, then at 1210, a line is fitted in the edge projection voxel using the edge points inside the voxel. In one embodiment, the average value as well as the eigenvalue and eigenvector of all these edge points within the projection voxel are calculated, and based on these results, a straight line that best fits these points is obtained. In this case, the line structure includes the average value of the point on the line and the orientation determined by the eigenvector.
[0107] At 1212, the second condition of the straight line requirement is further applied to determine whether the edge projection voxel is good. In one embodiment, the mean square error (MSE) representing the average distance between each edge point in the edge projection voxel and the fitted line is calculated. If the MSE is less than a second specified threshold, the edge projection voxel is determined to meet the second condition of the straight line requirement and is marked as good. If the second condition is not met, the edge projection voxel is marked as bad.
[0108] At 1214, it is checked whether neighboring good edge projection voxels meet the line-to-line requirement to form at least one reference line.
[0109] In one embodiment, the line-to-line requirement may include (a) the orientation of the two lines is approximately the same, and (b) a particular point in a good edge projection voxel is close to a line extending from a line of an adjacent good edge projection voxel. When both conditions are met, the adjacent good edge projection voxels may be merged to form a reference line. The line parameters of the reference line may be recalculated based on the combined points in the merged edge projection voxels.
[0110] At 1216, check whether the edge point in the bad edge projection voxel can be fitted with at least one nearby reference line. In the edge projection plane, a bad edge projection voxel may have several neighboring edge projection voxels marked as good. If a particular neighboring line produces the best point-to-line match, the edge point in the bad edge projection voxel is associated with the neighboring good edge projection voxel. In one embodiment, the point-to-line matching calculates a score that measures the vertical distance between the point and the reference line. In one embodiment, the best point-to-line matching first calculates the distance between the point and the lines of all neighboring good voxels, and retains those neighboring good voxels whose distance values are less than a specific threshold. The best point-to-line matching then selects the specific good voxel that produces the minimum distance value as the selected good voxel.
[0111] At 1218, if the edge point in the bad edge projection voxel produces the best point-to-line match with the reference line, it is merged to the reference line. In one embodiment, the merging can be performed by associating the edge point with the reference line. Finally, the reference line is returned as the exact line extracted in the extraction step. If the edge point in the bad edge projection voxel cannot be fitted with at least one nearby reference line, it is discarded at 1220.
[0112] The hybrid voxel-point based line extraction method as described above not only speeds up the processing speed but also improves the measurement accuracy of the precise line.
[0113] From a visual perspective, Fig.14 FIG. 14 shows a process 1400 for hybrid voxel-point based line extraction according to one embodiment of the present invention. Fig.14As shown, the 2D plane 1405 may be one of the voxelized projection planes corresponding to the 3D scene containing the 3D object.
[0114] The projection voxel 1410 contains a sufficient number of edge points, and these edge points present a line structure 1412. Since the points within the projection voxel 1410 are close to the line structure 1412, the MSE value is small. When the MSE is less than a second specified threshold, the edge projection voxel is considered good, so the calculated line structure 1412 is further used to generate a reference line 1414 together with other good projection voxels nearby. The reference line 1414 can be fitted by using all edge points in good neighboring projection voxels.
[0115] On the other hand, there may not be enough edge points in the projection voxel 1416, or the MSE values of all edge points in the projection voxel 1416 relative to the line 1418 may be higher than the second specified threshold. In this case, for each edge point in the projection voxel 1416, a good neighboring projection voxel that produces the best point-to-line match is determined, and the point is merged into the reference line of the good neighboring projection voxel. In this way, the reference line is improved by adding point by point.
[0116] After processing the point cloud using process 1400, accurate lines such as line 1420 are obtained in each projection plane 1405. Once geometric features such as edges and lines are extracted from the 3D scene, pose, geometric size and shape measurements can be performed on each 3D object in the 3D scene.
[0117] Fig.15 The figure shows a process 1500 of generating L2L line pair features according to an embodiment of the present invention. For each projection plane, the precise line corresponding to the 3D object is obtained, and an L2L line pair feature is generated between any two extracted lines in the projection plane.
[0118] As an example, lines 1511-1514 are precise lines extracted in the projection plane 1510. Considering the line directions, the angles between the lines, and the line length ratios, the lines 1511-1514 can be i and line l k Generate the L2L line pair feature as shown below.
[0119] F=(n i ,n k ,θ,λ)
[0120] λ=|L i -L k | / max(L i ,L k )
[0121] Where F represents the two lines (n i and nk ) of the line pair; the angle θ between the two lines; and the line length ratio λ. The line length ratio may be a ratio with the absolute line length difference as the numerator and the longer line length in the line pair as the denominator.
[0122] It should be appreciated that twelve line pair features may be generated in the manner described above for four lines in the projection plane 1510. Each line pair in the same projection plane is calculated using the precisely extracted lines.
[0123] The generated line pair features can be further used for registration between the identified 3D objects and the target 3D objects in the 3D scene. To this end, the line pair features of each target 3D object are generated as target line pair features in the same way as the actual 3D objects to be measured. The line pair features of the actual 3D objects and the line pair features of each target 3D object are then used to evaluate at least one matching score. If the highest value of the matching score is above a predetermined threshold, it can be declared that the 3D object has been found or that the 3D object has been registered with the target 3D object.
[0124] According to one embodiment of the present invention, the actual 3D object and the target 3D object can be registered using a hash table and a voting scheme using corresponding line pair features. The hash table can efficiently search for all line pairs on the target object that are similar to a given line pair from a 3D scene. This is a method that takes line pairs in a 3D scene as input and outputs a list of line pairs on the target object that are similar to the input line pairs.
[0125] For a particular target 3D object, the line pair features of each line pair extracted from the target 3D object are calculated in the manner described above. A hash table is created using each line pair feature and a coordinate basis describing the line pair position, wherein all combinations of the coordinate basis of each line pair are stored in an indexed manner.
[0126] For the projection plane corresponding to the 3D object to be identified or registered, the line pair features of each line pair extracted from the projection plane are calculated in the manner described above. The position of each line pair is also calculated in its own coordinate system. When searching the hash table for each line pair of the actual object, for each entry found in the hash table, a target object vote is performed. The matching score is based on the number of votes. Therefore, entries that obtain more than a certain number of votes correspond to potential matches.
[0127] The object registration based on line-to-line features according to the present invention implements line pair features using the same projection plane, which reduces the hash table size and shortens the voting time. In addition, these line pair features are generated using precise lines, so it is robust to noise and thus improves measurement accuracy.
[0128] According to an embodiment, the present invention discloses a method for efficiently processing a large amount of data points. The basic principle is to identify those groups of data points that present a regular structure and organize them into a group. For those data points that do not belong to any group, the method checks them one by one to classify them into an existing group. Compared with the method of processing each point in the data set separately and then trying to merge neighboring points that present similar properties, the method of the present invention is more efficient.
[0129] Fig.16 A method for processing a large amount of data in a point cloud is shown. In step 1610, the point cloud is voxelized into multiple voxels of the same size. In 1615, each voxel is classified, and if the voxel meets the first requirement, it is classified as a first-class voxel or a good voxel. Otherwise, it is classified as a second-class voxel or a bad voxel. In one embodiment, the first requirement includes two conditions. The first condition is that the number of points within the voxel is greater than a predetermined threshold, and the second condition is that the points within the voxel present a regular structure. In the first embodiment, the points are 3D points, so that the first requirement is a plane requirement, and the regular structure is a plane structure. In the second embodiment, the points are 2D points, so that the first requirement is a straight line requirement, and the regular structure is a line structure.
[0130] At 1620, the parameters of the regular structure are calculated from the good voxels. For a plane structure, they correspond to the plane parameters including the normal vector and the offset. For a line structure, the regular structure parameters include a specific point on the line and the line direction.
[0131] At 1625, the neighboring voxels of the good voxel are checked. If the regular structures of the good voxel and its neighboring good voxels all meet the second requirement, the neighboring good voxels are merged to form at least one broad regular structure. For the first embodiment, the second requirement is a plane-to-plane requirement, so that the broad regular structure is another plane structure, and for the second embodiment, the second requirement is a line-to-line requirement, so that the corresponding broad regular structure is another line structure.
[0132] At 1630, first identify neighboring good voxels that are adjacent to the bad voxel. Then, for each point in the bad voxel, evaluate the local match between the point and its neighboring good voxels. Select the good voxel that produces the best local match score and associate the point with the broad regular structure to which the selected good voxel belongs.
[0133] In one embodiment, the local matching first calculates the distance value between the point and the regular structure of all its neighboring good voxels, and retains those neighboring good voxels whose distance value is less than a certain threshold. Then, the specific good voxel that produces the minimum distance value is selected as the winner that produces the best local matching score.
[0134] In a first embodiment, the local matching is point-to-plane matching, so the distance value is the absolute distance between the point and the plane. In a second embodiment, the local matching is point-to-line matching, so the distance value is the absolute distance between the point and the line.
[0135] Finally, at 1635, the at least one wide regular structure is acquired to extract geometric information of the point cloud. These wide regular structures are referred to as common planes in the first embodiment and as reference lines in the second embodiment.
[0136] This method combines voxel-based processing and point-based processing together to become a hybrid voxel-point based method. Since there is an efficient algorithm to identify the regular structure of points within voxels, good voxels can be quickly identified from voxel-based point clouds. For those bad voxels, it is of no benefit to simply discard all the points in them. This may result in a lot of information loss. On the other hand, each point in the bad voxel needs to be checked individually. By associating the points within the bad voxels with their neighboring good voxels, the final points of the plane or line can be determined more accurately. This is especially important for determining plane bounding boxes and L2L line pair features. Therefore, compared with existing methods, this hybrid method disclosed in the present invention has high accuracy in geometric measurement and very fast processing speed.
[0137] The present invention provides an efficient, fully automatic, easy-to-use 3D computer processing method and system that can be used in real time and can work on multiple platforms. As described in more detail above, the advantageous techniques described herein are tolerant of noise and occlusions that are often present in the real world. In addition, the entire process is fully automated, alleviating the need for manual post-processing, thereby forming a comprehensive, accurate, and complete 3D model suitable for many commercial and consumer applications. The methods and systems described herein are designed to run efficiently on low-cost, low-power, system-on-chip (SoC)-based processor platforms, such as those running Android TM / Linux TM Operating system for ARM processors.
[0138] Fig.17 1 is a schematic diagram of a computerized device 1700 for measuring the pose, size and shape of at least one 3D object in a scanned 3D scene according to an embodiment of the present invention. The computerized device 1700 is operable to perform a reference Figure 2-16 Described method / process 200~1600.
[0139] To this end, the computerized device 1700 includes a normal vector estimation module 1702, which is configured to voxelize a point cloud of a scanned 3D scene into a plurality of voxels of the same size, wherein the scanned 3D scene includes at least one 3D object represented by a plurality of points in the point cloud; classify the plurality of voxels into a first type of voxel and a second type of voxel, if the voxel meets the plane requirement, the voxel is classified as the first type of voxel, if the voxel does not meet the plane requirement, it is classified as the second type of voxel. Then, for each voxel in the first type, at least one plane parameter of a plane fitted to the point in the voxel is calculated; for each voxel in the second type, a normal vector of each point in the voxel is calculated. The computerized device 1700 also includes a plane segmentation module 1704, which is configured to grow at least one common plane of the multiple voxels based on the calculated normal vector and generate at least one projection voxel plane, wherein the projection voxel plane includes multiple projection voxels of each common plane in the at least one common plane; an edge detection module 1708, which is configured to perform edge detection on each projection voxel plane in the at least one projection voxel plane to obtain edge projection voxels on each corresponding at least one projection voxel plane; and a precise line extraction module 1710, which is configured to extract lines from edge projection voxels in each projection voxel plane in the at least one projection voxel plane.
[0140] In some embodiments, the computerized device 1700 also includes a geometric filtering module 1706, which is configured to perform geometric filtering to filter out unnecessary portions of the scanned 3D scene that do not contain the target 3D object by examining each projected voxel plane and excluding those projected voxel planes that do not satisfy at least one geometric feature associated with the target 3D object.
[0141] In some embodiments, the computerized device 1700 further includes a pose estimation module 1714, and / or a contrast measurement module 1716, and / or a geometry-based measurement module 1718. The pose estimation module 1714 is configured to calculate the pose (rotation and translation) of the actual 3D object from the target 3D object. The contrast measurement module 1716 is configured to calculate the difference between the actual 3D object and the target 3D object after being rotated and translated by the pose estimation module 1714. The geometry-based measurement module 1718 is configured to perform size and shape measurements on the actual 3D object in the 3D scene based on the results of the 3D geometric feature extraction performed by the precise line extraction module 1710 for multiple applications.
[0142] The apparatus or system and method of the present invention can be implemented in the form of a software application running on a computerized system. In addition, a portion of the method can be executed on one computerized system, while other portions are executed on one or more other computerized systems. Examples of computerized systems include mainframes, personal computers, handheld computers, servers, etc. The software application can be stored on a recording medium that can be accessed locally by the computerized system and can be accessed through a hardwired or wireless connection to a network (e.g., a local area network or the Internet).
[0143] The computerized system may include, for example, a processor, a random access memory (RAM), a printer interface, a display unit, a local area network (LAN) data transfer controller, a local area network (LAN) interface, a network controller, an internal bus, and one or more input devices, such as a keyboard, a mouse, etc. The computerized system may be connected to a data storage device.
[0144] The apparatus or system and method of the present disclosure may be implemented in the form of a software application running on a computerized system. Fig.18 1 is a schematic diagram of a computerized system 1800 for pose, size, and shape measurement of at least one 3D object in a scanned 3D scene according to an embodiment of the present invention, which includes hardware and software components that can be used to implement embodiments of the present invention.
[0145] The hardware components in this embodiment further include a processor 1810, a memory 1811, and multiple interfaces. Multiple components in the computerized system 1800 are connected to the input / output interface 1820, including an input unit 1812, an output unit 1813, a storage unit 1814, and a communication unit 1815, wherein the communication unit 1815 includes but is not limited to a network card, a modem, a radio communication transceiver, etc. In another embodiment, the present disclosure can also be deployed in a distributed computing environment, which includes multiple computerized systems 1800 connected together through one or more networks. The network can include one or more of the Internet, an intranet, an extranet, a cellular network, a local area network (LAN), a home area network (HAN), a metropolitan area network (MAN), a wide area network (WAN), a Bluetooth network, a public and private network, etc.
[0146] The processor 1810 may be a central processing unit (CPU), a microprocessor, a microcontroller, a digital signal processor (DSP), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), etc., for controlling the overall operation of a memory (e.g., a random access memory for temporary data storage, a read-only memory for permanent data storage, and firmware). One or more processors may communicate and store with each other, and perform operations and tasks that implement one or more blocks of the flowcharts discussed herein.
[0147] The memory 1811 stores, for example, applications, data, programs, algorithms (including software that implements or assists in implementing exemplary embodiments), and other data. The memory 1811 may include dynamic or static random access memory (DRAM or SRAM) or read-only memory, such as erasable and programmable read-only memory (EPROM), electrically erasable and programmable read-only memory (EEPROM) and flash memory, as well as other memory technologies alone or in combination. In some embodiments, the processor 1810 may be configured to perform the various processes and processing described above, such as the method / process 200-1600 described with reference to FIG. 216.
[0148] Memory 1814 typically includes persistent storage, such as magnetic disks, such as fixed and removable disks; other magnetic media, including tape; optical media, such as compact disks (CDs) or digital versatile disks (DVDs), and semiconductor storage devices, such as flash memory cards, solid-state drives, EPROMs, EEPROMs, or other storage technologies, alone or in combination. Note that the instructions for the above software may be provided on a computer-readable or machine-readable storage medium, or alternatively, may be provided on multiple computer-readable or machine-readable storage media distributed in a large system that may have multiple nodes. Such computer-readable or machine-readable media are considered part of a product (or article of manufacture). One or more articles of manufacture may refer to any manufactured single component or multiple components.
[0149] The input unit 1812 is an interface component that connects the computerized system 1800 to a data input device, such as a keyboard, a keypad, a handwriting input device, a mouse or other pointing device, a voice input device, a scanner or other input technology. According to an embodiment of the present invention, the input unit 1812 may include at least one 3D sensor that captures a 3D scene for providing 3D data of the 3D scene to the computerized system 1800. The output unit 1813 is an interface component of the computerized system 1800 for sending data to an output device, such as a cathode ray tube (CRT) or a flat panel display, a printer, a voice output device, a speaker or other output technology. The communication unit 1815 may generally include a serial or parallel interface and a universal serial bus interface (USB) and other interface technologies. The communication unit 1815 may also enable the computerized system 1800 to exchange information with an external data processing device via a data communication network, such as a personal area network (PAN), a local area network (LAN), a wide area network (WAN), the Internet and other data communication network architectures. The communication unit 1815 may include an Ethernet interface, a wireless LAN interface device, a Bluetooth interface device, and other network devices alone or in combination.
[0150] Software also includes operating systems and application software systems, such as Fig.17 The operating system manages all hardware resources and arranges execution priorities for all tasks and processes, so that the four application software systems can be executed in an orderly manner.
[0151] The blocks and / or methods described herein can be performed and / or made by a user, a user agent (including a machine learning agent and an intelligent user agent), a software application, an electronic device, a computer, firmware, hardware, a process, a computerized system, and / or an intelligent personal assistant. In addition, the blocks and / or methods described herein can be automatically executed with or without instructions from a user.
[0152] Those skilled in the art will appreciate that the division between hardware and software is a conceptual division for ease of understanding and is somewhat arbitrary. In addition, it should be understood that peripherals of one computer device may be integrated into a mainframe in another computer device. In addition, application software systems may be executed in a distributed computing environment. Software programs and their associated databases may be stored in separate file servers or database servers and transferred to a local host for execution. Thus, if Fig.18 The computerized system 1800 shown is an exemplary embodiment of how the present invention may be implemented. Those skilled in the art will appreciate that alternative embodiments may be employed to implement the present invention.
[0153] Therefore, the exemplary embodiments of the present invention have been fully described. Although the description relates to specific embodiments, it is clear to those skilled in the art that the present invention can also be implemented by changes in these specific details. Therefore, the present invention should not be interpreted as being limited to the embodiments set forth herein.
[0154] The methods described in different figures can be added to or interchanged with the methods in other figures. In addition, specific data values (such as specific quantities, numbers, categories, etc.) or other specific information represented in digital form should be interpreted as illustrative information for discussing example embodiments. Such specific information is not provided to limit the example embodiments.
Claims
1. A computer-implemented method for measuring the pose, size and shape of at least one 3D object in a scanned 3D scene, comprising: receiving a point cloud of a scanned 3D scene, wherein the scanned 3D scene includes at least one 3D object represented by a plurality of points in the point cloud; voxelize the point cloud into a plurality of voxels of equal size; classifying the plurality of voxels into a first class of voxels and a second class of voxels, wherein the voxel is classified as a first class of voxels if the voxel satisfies a planarity requirement, and the voxel is classified as a second class of voxels if the voxel does not satisfy the planarity requirement; For each voxel of the first type, calculating at least one plane parameter of a plane fitted by points within the voxel; For each voxel of the second type, calculate the normal vector of each point in the voxel; growing at least one common plane for the plurality of voxels based on the calculated at least one plane parameter of the first type of voxels and the normal vector of each point in the second type of voxels; creating at least one projection voxel plane for each of the at least one common plane, wherein the at least one projection voxel plane comprises a plurality of projection voxels; Performing edge detection on each projection voxel plane in the at least one projection voxel plane to obtain edge projection voxels on each corresponding projection voxel plane; extracting lines from the edge projection voxels in each projection voxel plane of the at least one projection voxel plane; as well as The lines are connected together to form an object for each of the at least one projected voxel plane for pose, size and shape measurement of the 3D object in the scanned 3D scene.
2. The method according to claim 1, wherein the plane requirement comprises the following conditions: the number of points within the voxel is greater than a first predetermined threshold; and The points within a voxel present a planar structure.
3. The method according to claim 1, wherein the step of growing at least one common plane for the plurality of voxels comprises: If neighboring voxels in the first type of voxels satisfy the plane-to-plane requirement, merging the neighboring voxels to form the at least one common plane; as well as For each point in each second-type voxel, identifying a first-type voxel adjacent to the second-type voxel as a neighboring voxel; Acquire the plane of the neighboring voxel as a neighboring plane; and associating the point with a particular one of the neighboring planes if the particular one of the neighboring planes produces the best point-to-plane match among the neighboring planes; The point-to-plane matching depends on the distance from the point to the plane and the proximity of the point's normal vector to the plane's normal vector, and the optimal point-to-plane matching is satisfied if the distance from the point to the specific adjacent plane is the minimum distance between the point and the adjacent plane.
4. The method of claim 3, wherein the plane-to-plane requirement comprises the following conditions: The normal vectors of neighboring voxels in the first type of voxels are equal; as well as An absolute difference between the offsets of neighboring voxels in the first type of voxels is less than a second predetermined threshold; The at least one plane parameter comprises a normal vector and an offset characterizing the plane.
5. The method of claim 1 , wherein creating at least one projected voxel plane for the at least one common plane comprises: projecting points associated with the at least one common plane into a 2D projection plane perpendicular to a normal vector of the at least one common plane; voxelize the 2D projection plane into the plurality of projection voxels of the same size; as well as binarizing the plurality of projection voxels based on the number of points associated with each projection voxel to obtain binarized projection voxels; wherein if the number of points associated with the projection voxel is above a third predetermined threshold, the binarized projection voxel is represented by a first binary value; and If the number of points associated with a projection voxel is lower than or equal to the third predetermined threshold, the projection voxel is binarized with a second binary value.
6. The method according to claim 5, further comprising: Obtain the projection voxel plane of the target 3D object as the 2D target projection plane; as well as Geometric filtering is performed to filter out unwanted parts of the scanned 3D scene that do not contain the target 3D object by: Examining each projected voxel plane; and Projected voxel planes that do not satisfy at least one geometric characteristic associated with the target 3D object are excluded.
7. The method according to claim 6, wherein the checking step further comprises: Counting the total number of binary projection voxels having the first binary value in each projection voxel plane as a projection count of the corresponding projection voxel plane; Binarizing a plurality of projection voxels in the target projection plane to obtain a binarized target voxel based on the number of points associated with each projection voxel in the target projection plane; Counting the total number of binarized target voxels having the first binary value in the target projection plane as a target count of the target projection voxel plane; as well as If the absolute difference between the projection count and the target count exceeds a count threshold, the corresponding projection voxel plane is discarded.
8. The method according to claim 5, wherein performing edge detection on the at least one projection voxel plane to obtain edge projection voxels comprises: Whether each projection voxel in the at least one projection voxel plane is an edge projection voxel is determined by: Compare each projected voxel with all of its neighboring projected voxels; as well as Identify each projection voxel whose binary value is different from any of its neighboring projection voxels as an edge projection voxel; as well as Only the edge projection voxels in the at least one projection voxel plane are retained.
9. The method according to claim 8, wherein the extracting step further comprises: classifying each point satisfying the edge requirement in each edge projection voxel as an edge point and retaining only the edge points in each edge projection voxel; If the edge point within the edge projection voxel meets the straight line requirement, marking the edge projection voxel as a first type of edge projection voxel, and if the edge point within the edge projection voxel does not meet the straight line requirement, marking the edge projection voxel as a second type of edge projection voxel; If at least two adjacent first-type edge projection voxels satisfy the line-to-line requirement, growing at least one reference line from the at least two adjacent first-type edge projection voxels; Associating an edge point in a second-class edge-projection voxel with a specific adjacent first-class edge-projection voxel if the edge point in the second-class edge-projection voxel produces the best point-to-line match with the line of the specific adjacent first-class edge-projection voxel among all the lines of the first-class edge-projection voxels adjacent to the edge point; as well as returning the at least one reference line as the line extracted in the extracting step; Among them, the point-to-line matching calculation measures the score of the perpendicular distance between the point and the reference line, and if the distance between the point and a specific adjacent first-class edge projection voxel line is the minimum distance between the point and all its adjacent first-class edge projection voxel lines, then the optimal point-to-line matching is satisfied.
10. The method according to claim 9, wherein the straight line requirement comprises the following conditions: the number of points within the edge projection voxel is greater than a fourth predetermined threshold; and Points within edge-projected voxels present a line structure; The line-to-line requirements include the following conditions: The two fitted lines have the same orientation; and Points on the line of first type edge projection voxels are close to lines extending from said adjacent first type edge projection voxels; and The point-to-line matching depends on the distance from the point to the fitted line.
11. The method according to claim 1, further comprising: generating a first set of line-to-line line-pair features from lines extracted from the at least one projected voxel plane; For each target 3D object in the at least one target 3D object, obtaining a second set of line-to-line features; For each target 3D object, evaluating at least one matching score using the first set of line-to-line line-pair features and the second set of line-to-line line-pair features; If the highest value of the matching scores is higher than a fifth predetermined threshold, identifying the 3D object in the 3D scene as one of the at least one target 3D object; and The 3D object is registered with the target 3D object.
12. The method of claim 11, wherein the line-to-line line pair characteristics include at least one parameter of two lines, wherein one parameter is a ratio of an absolute difference in length of the two lines as a numerator and a maximum length of the two lines as a denominator.
13. The method according to claim 11, wherein the generating step further comprises: For each line pair, the line pair characteristics of the generated line pair are as follows F=(n i ,n k ,θ,λ) λ=|L i -L k | / max(L i ,L k ) Where F represents line l i and line l k The line pair feature is based on the line directions of the two lines; n i It is line l i The line direction, n k It is line l k The line direction of θ is the line l i and line l k The angle between i It is line l i Length; L k It is line l k length, λ is the absolute line length difference |L i -L k |With line l i and line l k Medium and long line length (max(L i , L k ))’s ratio.
14. The method according to claim 11, further comprising: Based on the registration with the at least one target 3D object, pose estimation is performed on the identified 3D object.
15. A computerized system comprising: processor; A memory coupled to the processor, the memory and the processor being jointly configured to cause the computerized system to perform the following actions, including: receiving a point cloud of a scanned 3D scene, wherein the scanned 3D scene includes at least one 3D object represented by a plurality of points in the point cloud; voxelize the point cloud into a plurality of voxels of equal size; Classifying the plurality of voxels into a first type of voxel and a second type of voxel, wherein if the voxel satisfies a planarity requirement, the voxel is classified as a first type of voxel, and if the voxel does not satisfy the planarity requirement, the voxel is classified as a second type of voxel; For each voxel of the first type, calculating at least one plane parameter of a plane fitted by points within the voxel; For each voxel of the second type, calculate the normal vector of each point in the voxel; growing at least one common plane for the plurality of voxels based on the calculated at least one plane parameter of the first type of voxels and the normal vector of each point in the second type of voxels; creating at least one projection voxel plane for each of the at least one common plane, wherein the at least one projection voxel plane comprises a plurality of projection voxels; Performing edge detection on each projection voxel plane in the at least one projection voxel plane to obtain edge projection voxels on each corresponding projection voxel plane; extracting lines from the edge projection voxels in each of the at least one projection voxel plane; and The lines are connected together to form an object for each of the at least one projected voxel plane for pose, size and shape measurement of the 3D object in the scanned 3D scene.
16. The system of claim 15, further comprising: At least one 3D sensor for capturing a 3D scene to provide 3D data of the 3D scene to the computerized system.
