The subject matter herein generally relates to point clouds, and more particularly to an electronic device and a method for processing a point cloud of an object obtained by scanning the object from a plurality of different angles.
Generally, a point cloud of an object is obtained by scanning a surface of the object. The point cloud represents contours of the surface of the object. The object may need to be scanned from different angles to obtain the point cloud, in which case some points of the point cloud may overlap with each other.
Implementations of the present technology will now be described, by way of example only, with reference to the attached figures.
It will be appreciated that for simplicity and clarity of illustration, where appropriate, reference numerals have been repeated among the different figures to indicate corresponding or analogous elements. In addition, numerous specific details are set forth in order to provide a thorough understanding of the embodiments described herein. However, it will be understood by those of ordinary skill in the art that the embodiments described herein can be practiced without these specific details. In other instances, methods, procedures and components have not been described in detail so as not to obscure the related relevant feature being described. The drawings are not necessarily to scale and the proportions of certain parts may be exaggerated to better illustrate details and features. The description is not to be considered as limiting the scope of the embodiments described herein.
Several definitions that apply throughout this disclosure will now be presented.
The term “coupled” is defined as connected, whether directly or indirectly through intervening components, and is not necessarily limited to physical connections. The connection can be such that the objects are permanently connected or releasably connected. The term “comprising” means “including, but not necessarily limited to”; it specifically indicates open-ended inclusion or membership in a so-described combination, group, series and the like.
In general, the word “module” as used hereinafter refers to logic embodied in hardware or firmware, or to a collection of software instructions, written in a programming language such as, for example, Java, C, or assembly. One or more software instructions in the modules may be embedded in firmware such as in an erasable-programmable read-only memory (EPROM). It will be appreciated that the modules may comprise connected logic units, such as gates and flip-flops, and may comprise programmable units, such as programmable gate arrays or processors. The modules described herein may be implemented as either software and/or hardware modules and may be stored in any type of computer-readable medium or other computer storage device.
Referring to
The worktable 20 can have a plurality of labeled points thereon. The controlling module 100 can control the worktable 20 to rotate at the predetermined angles of rotation and control the scanning device 30 to scan the surface of the worktable 20 at each angle of rotation to scan the plurality of labeled points.
The obtaining module 101 can obtain a plurality of sets of points scanned by the scanning device 30. Each set of points can include all of the labeled points and correspond to one angle of the worktable.
The calculating module 102 can determine a positional relationship between every two adjacent sets of points. The positional relationship can be determined by at least one of a plurality of constraint conditions of Euclidean space. The constraint conditions can include a distance constraint, an angle constraint, and a surface area constraint. For example, to determine the position relationship according to the distance constraint, the calculating module 102 can first calculate a coordinate position of each labeled point of a set of points, and calculate a distance table recording a distance between every two points of the set of points. For example, a distance between a first point Q1 and a second point Q2 of a first set of points can be recorded as {S, Q1, Q2}, wherein S equals the distance between the first point Q1 and the second point Q2. The calculating module 102 can calculate a distance table for every set of points. The distance tables can be saved in the storage unit 11. After the distance tables are calculated, the calculating module 102 can match a distance between any two points of one set of points to a distance between corresponding two points of another set of points. The distances between every two points of one set of points can be matched to distances between corresponding two points of another set of points to determine the positional relationship between the two sets of points.
The transforming module 103 can calculate a transformation matrix of the plurality of sets of points according to the positional relationships for aligning each set of points to a same visual angle. The transformation matrix can be calculated according to trigonometry, a least square method, singular value decomposition, or a quaternion algorithm, for example.
After the transformation matrix is calculated, the object can be placed on the worktable 20, and the controlling module 100 can control the worktable 20 to rotate and the scanning device 30 to scan the object from the plurality of angles. The obtaining module 101 can obtain a plurality of point cloud sets of the object, and obtain a coordinate point of each point of each point cloud set. Each point cloud set can correspond to one angle of rotation of the worktable 20.
The combining module 104 can combine the plurality of point cloud sets according to the transformation matrix to obtain an overall point cloud of the object. The combining module 104 can determine a plurality of overlapping points of the overall point cloud, and remove the overlapping points to obtain a simplified point cloud of the object. Thus, a size of the overall point cloud is effectively reduced, and the overall point cloud is effectively simplified.
At block 300, a worktable having a plurality of labeled points can be controlled by an electronic device to rotate at predetermined angles of rotation, and the electronic device can control a scanning device to scan the worktable from a plurality of angles.
At block 301, the electronic device can obtain a plurality of sets of points scanned by the scanning device. Each set of points of the plurality of sets of points can correspond to one angle of the worktable.
At block 302, the electronic device can determine a positional relationship between every two adjacent sets of points of the plurality of sets of points. In detail, the electronic device can first calculate a coordinate position of each labeled point of each set of points, and calculate a distance table recording a distance between every two points of each set of points. For example, a distance between a first point Q1 and a second point Q2 of a first set of points can be recorded as {S, Q1, Q2}, wherein S equals the distance between the first point Q1 and the second point Q2. A distance table for every set of points can be calculated. After the distance tables are calculated, the electronic device can match a distance between any two points of one set of points to a distance between corresponding two points of another set of points. The distances between every two points of one set of points can be matched to distances between corresponding two points of another set of points to determine the positional relationship between the two sets of points.
At block 303, the electronic device can calculate a transformation matrix of the plurality of sets of points according to the positional relationships for aligning each set of points to a same visual angle. The transformation matrix can be calculated according to trigonometry, a least square method, singular value decomposition, or a quaternion algorithm, for example.
At block 304, an object can be placed on the worktable, and the object can be scanned from the plurality of angles to obtain a plurality of point cloud sets of the object.
At block 305, the electronic device can obtain a coordinate point of each point of each point cloud set.
At block 306, the electronic device can align each point cloud set to a same visual angle, and combine the point cloud sets to obtain an overall point cloud of the object. The electronic device can determine overlapping points of the overall point cloud and remove the overlapping points to obtain a simplified point cloud.
The embodiments shown and described above are only examples. Even though numerous characteristics and advantages of the present technology have been set forth in the foregoing description, together with details of the structure and function of the present disclosure, the disclosure is illustrative only, and changes may be made in the detail, including in matters of shape, size and arrangement of the parts within the principles of the present disclosure up to, and including, the full extent established by the broad general meaning of the terms used in the claims.
Number | Date | Country | Kind |
---|---|---|---|
201410673564.1 | Nov 2014 | CN | national |