This application claims priority to Chinese Patent Application No. 201410772019.8 filed on Dec. 16, 2014, the contents of which are incorporated by reference herein.
The subject matter herein generally relates to point clouds technology, and particularly to a computing device and a method for joining point clouds of an object.
A measurement device can measure a plurality of points to generate groups of incomplete point cloud by scanning a surface of an object (e.g., a component of a mobile phone). The groups of incomplete point cloud can be joined to generate a complete group of point cloud relating to the object. However, generating a single complete group of point cloud comprising all the groups is very complicated.
Many aspects of the disclosure can be better understood with reference to the following drawings. The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the disclosure. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
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 “module” refers to logic embodied in computing or firmware, or to a collection of software instructions, written in a programming language, such as, Java, C, or assembly. One or more software instructions in the modules can be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein can be implemented as either software and/or computing modules and can be stored in any type of non-transitory computer-readable medium or other storage device. Some non-limiting examples of non-transitory computer-readable media include CDs, DVDs, BLU-RAY™, flash memory, and hard disk drives. 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 at least one embodiment, as shown in
In at least one embodiment, the point cloud joining system 10 can include, but is not limited to having, an acquisition module 11, a joining module 12, a modification module 13, and a processing module 14. The modules 11-14 can include computerized instructions in the form of one or more computer-readable programs that can be stored in a non-transitory computer-readable medium, such as the storage device 30, and be executed by the at least one processor 20 of the computing device 100.
The acquisition module 11 acquires a first group of point cloud and a second group of point cloud, both relating to an object, from the storage device 30. In at least one embodiment, each group of point cloud can be a set of points represent the external surface of the object. The object may be, but is not limited to, a component (e.g., a shell) of an electronic device (e.g., a mobile phone). In at least one embodiment, each group of point cloud includes data, but is not limited to, coordinates of each point in the point cloud, a designation of each point in the point cloud, and a total quantity of the points in the point cloud.
In at least one embodiment, the storage device 30 can store a plurality of groups of point cloud relating to one object which can be integrated to form a single and complete group of point cloud relating to the object. The acquisition module 11 first selects two groups of point cloud requiring to be joined. After the first group of point cloud and the second group of point cloud are joined completely, the acquisition module 11 selects and adds another group of point cloud in the storage device 30, until all groups of point cloud of the object have been joined to form the single and complete group of point cloud.
The acquisition module 11 further predetermines a preset precision value. In at least one embodiment, the preset precision value can be predetermined according to user input. For example, a user can input the preset precision value using the input device 50 according to a precision requirement of joining the first and second groups of point cloud. In at least one embodiment, the preset precision value also can be determined according to an average distance between all points in the respective first and second group of point cloud. For example, the preset precision value can be set as 0.005 millimeters when the average distance between all points is 0.15 millimeters.
The joining module 12 obtains a first set of initial corresponding points from the first group of point cloud and obtains a second set of initial corresponding points from the second group of point cloud by initially joining the first group of point cloud and the second group of point cloud based on a feature point matching method. In at least one embodiment, the feature point matching method requires corresponding feature points to be acquired from the first group of point cloud and from the second group of point cloud by using a corner detection algorithm or by extracting boundary characteristic points, and a transition matrix is calculated according to the corresponding feature points by using singular values, by using quaternion, or by using singular value decomposition. The first set of initial corresponding points and the second set of initial corresponding points are obtained according to the transition matrix and the corresponding feature points.
In order to initially join the first group of point cloud and the second group of point cloud quickly, the joining module 12 can filter the first group of point cloud and the second group of point cloud by removing points representing noise before joining the first and second groups of point cloud.
The modification module 13 obtains a first set of remaining corresponding points and a second set of remaining corresponding points by deleting abnormal points (as hereinafter defined) in the first set of initial corresponding points and in the second set of initial corresponding points, according to a preset rule. In at least one embodiment, the preset rule includes calculating a curvature variation and an angle of normal vectors between each pair of corresponding points in the first set of initial corresponding points and in the second set of initial corresponding points, and deleting a selected pair of corresponding points from the first set of initial corresponding points and the second set of initial corresponding points when a curvature variation between the selected pair of corresponding points is larger than a preset threshold value and an angle of normal vectors between the selected pair of corresponding points is less than a preset angle, a pair of points showing one or other of these attributes being herein characterized as “abnormal”. The preset threshold value and the preset angle are determined according to the average distance between all points in the respective first and second group of point cloud. For example, the preset angle can be preset as 45 degrees.
In at least one embodiment, a curvature and a normal vector of each feature point of the pair of corresponding points are calculated based on a covariance matrix of proximal points of the feature point. For example, if a feature point of the corresponding points is represented as “qi”, proximal points of “qi” is represented as “Qi”, and “Qi” includes a number of “n” points. A centre of mass of “Qi” is represented as
and a covariance matrix of “Qi” is represented as “D=[q1−
The modification module 13 determines that a curvature of “qi” is a smallest eigenvalue of “D′”. The modification module 13 calculates the curvature variation between a pair of corresponding points according to the curvature of each feature point of the pair of corresponding points, and calculates the angle of normal vectors between each pair of corresponding points according to the normal vector of each feature point of the pair of corresponding points.
The processing module 14 calculates an objective function of the first set of remaining corresponding points and the second set of remaining corresponding points. In at least one embodiment, the processing module 14 calculates distances between the first set of remaining corresponding points and the second set of remaining corresponding points, and determines a standard deviation from the distances as the objective function. For example, if the first set of remaining corresponding points is represented as “P”, and the second set of remaining corresponding points is represented as “Q”, each set of “P” and “Q” includes a number of “n” points, and the processing module 14 determines a standard deviation of
as the objective function, wherein the number “i” is an integer starting from “1.”
The processing module 14 calculates a least square solution of the first set of remaining corresponding points and the second set of remaining corresponding points, and converts the first set of remaining corresponding points based on the calculated least square solution. In at least one embodiment, the processing module 14 calculates a conversion relationship between the first set of remaining corresponding points and the second set of remaining corresponding points by using singular values or by using singular value decomposition, and sets the conversion relationship as the least square solution. In at least one embodiment, the processing module 14 obtains the converted first set of remaining corresponding points by multiplying the least square solution and the first set of remaining corresponding points.
The processing module 14 further determines whether a precision of the objective function is less than the preset precision value. In at least one embodiment, the processing module 14 determines that the precision of the objective function is to be represented as “k=|ƒi−ƒi-1|”, wherein “f0” is preset as “0.”
If the precision of the objective function is less than the preset precision value, the processing module 14 further joins the converted first set of remaining corresponding points with the second set of remaining corresponding points to form a group of joined point cloud, and outputs the joined point cloud to be displayed on the display screen 40. The joined point cloud is a single coherent point cloud relating to the object. If the precision of the objective function is greater than or equal to the preset precision value, the processing module 14 further sets the converted first set of remaining corresponding points and the second set of remaining corresponding points as the first set of initial corresponding points and the second set of initial corresponding points, and executes the iterative method to continuously delete abnormal points from the first set of initial corresponding points and the second set of initial corresponding points, and to recalculate the precision of the objective function until the precision of the objective function is within the required preset precision value.
In at least one embodiment, before setting the converted first set of remaining corresponding points and the second set of remaining corresponding points as the first set of initial corresponding points and the second set of initial corresponding points, the processing module 14 adds one to an iteration number, and determines whether the iteration number is greater than a preset value. The preset value is used for setting a number that the first set of remaining corresponding points can be converted. The preset value is user-determined or predetermined, for example, can be set as 10. If the iteration number is less than or equal to the preset value, the processing module 14 sets the converted first set of remaining corresponding points and the second set of remaining corresponding points as the first set of initial corresponding points and the second set of initial corresponding points, and continuously executes the iterative method to delete abnormal points from the first set of initial corresponding points and the second set of initial corresponding points. If the iteration number is greater than the preset value, the processing module 14 at that stage joins the converted first set of remaining corresponding points with the second set of remaining corresponding points to form the joined point cloud.
In at least one embodiment, before outputting the joined point cloud, the processing module 14 can simplify an overlap area of the joined point cloud where the converted first set of remaining corresponding points does overlap with the second set of remaining corresponding points by executing preset simplification methods, and render the overlap area of the joined point cloud seamless, by executing preset smoothing methods.
Referring to
At block 210, an acquisition module acquires a first group of point cloud and a second group of point cloud, both relating to an object, from a storage device of the computing device, and predetermines a preset precision value. In at least one embodiment, each group of point cloud can be a set of points represent the external surface of the object. The object may be, but is not limited to, a component (e.g., a shell) of an electronic device (e.g., a mobile phone). In at least one embodiment, each group of point cloud includes data, but is not limited to, coordinates of each point in the point cloud, a designation of each point in the point cloud, and a total quantity of the points in the point cloud.
In at least one embodiment, the storage device can store a plurality of groups of point cloud relating to one object which can be integrated to form a single and complete group of point cloud relating to the object. The acquisition module first selects two groups of point cloud requiring to be joined. After the first group of point cloud and the second group of point cloud are joined completely, the acquisition module selects and adds another group of point cloud in the storage device, until all groups of point cloud of the object have been joined to form the single and complete group of point cloud. In at least one embodiment, the preset precision value can be predetermined according to user input, or be determined according to an average distance between all points in the respective first and second group of point cloud.
At block 220, a joining module obtains a first set of initial corresponding points from the first group of point cloud and obtains a second set of initial corresponding points from the second group of point cloud by initially joining the first group of point cloud and the second group of point cloud based on a feature point matching method. In at least one embodiment, the feature point matching method requires corresponding feature points to be acquired from the first group of point cloud and from the second group of point cloud by using a corner detection algorithm or by extracting boundary characteristic points, and a transition matrix is calculated according to the corresponding feature points by using singular values, by using quaternion, or by using singular value decomposition. The first set of initial corresponding points and the second set of initial corresponding points are obtained according to the transition matrix and the corresponding feature points.
At block 230, a modification module obtains a first set of remaining corresponding points and a second set of remaining corresponding points by deleting abnormal points (as hereinafter defined) in the first set of initial corresponding points and in the second set of initial corresponding points, according to a preset rule. In at least one embodiment, the preset rule includes calculating a curvature variation and an angle of normal vectors between each pair of corresponding points in the first set of initial corresponding points and in the second set of initial corresponding points, and deleting a selected pair of corresponding points from the first set of initial corresponding points and the second set of initial corresponding points when a curvature variation between the selected pair of corresponding points is larger than a preset threshold value and an angle of normal vectors between the selected pair of corresponding points is less than a preset angle, a pair of points showing one or other of these attributes being herein characterized as “abnormal”. The preset threshold value and the preset angle are determined according to the average distance between all points in the respective first and second group of point cloud. For example, the preset angle can be preset as 45 degrees.
In at least one embodiment, a curvature and a normal vector of each feature point of the pair of corresponding points are calculated based on a covariance matrix of proximal points of the feature point. For example, if a feature point of the corresponding points is represented as “qi”, proximal points of “qi” is represented as “Qi”, and “Qi” includes a number of “n” points. A centre of mass of “Qi” is represented as
and a covariance matrix of “Qi” is represented as “D=[q1−
The modification module determines that a curvature of “qi” is a smallest eigenvalue of “D′”. The modification module calculates the curvature variation between a pair of corresponding points according to the curvature of each feature point of the pair of corresponding points, and calculates the angle of normal vectors between the pair of corresponding points according to the normal vector of each feature point of the pair of corresponding points.
At block 240, a processing module calculates an objective function of the first set of remaining corresponding points and the second set of remaining corresponding points, calculates a least square solution of the first set of remaining corresponding points and the second set of remaining corresponding points, and converts the first set of remaining corresponding points based on the calculated least square solution.
In at least one embodiment, the processing module calculates distances between the first set of remaining corresponding points and the second set of remaining corresponding points, and determines a standard deviation from the distances as the objective function. For example, if the first set of remaining corresponding points is represented as “P”, and the second set of remaining corresponding points is represented as “Q”, each set of “P” and “Q” includes a number of “n” points, and the processing module determines a standard deviation of
as the objective function, wherein the number “i” is an integer starting from “1.” In at least one embodiment, the processing module calculates a conversion relationship between the first set of remaining corresponding points and the second set of remaining corresponding points by using singular values or by using singular value decomposition, and sets the conversion relationship as the least square solution. In at least one embodiment, the processing module obtains the converted first set of remaining corresponding points by multiplying the least square solution and the first set of remaining corresponding points.
At block 250, the processing module determines whether a precision of the objective function is less than the preset precision value. If the precision of the objective function is less than the preset precision value, block 270 is implemented. If the precision of the objective function is greater than or equal to the preset precision value, block 260 is implemented, and block 230 is repeated to execute the iterative method to continuously delete abnormal points from the first set of initial corresponding points and the second set of initial corresponding points. In at least one embodiment, the processing module determines that the precision of the objective function is to be represented as “k=|ƒi−ƒi-1|”, wherein “f0” is preset as “0.”
At block 260, the processing module sets the converted first set of remaining corresponding points and the second set of remaining corresponding points as the first set of initial corresponding points and the second set of initial corresponding points.
In at least one embodiment, before block 260, the processing module one to an iteration number, and determines whether the iteration number is greater than a preset value. The preset value is used for setting a number that the first set of remaining corresponding points can be converted. The preset value is user-determined or predetermined, for example, can be set as 10. If the iteration number is less than or equal to the preset value, block 260 is implemented, and block 230 is repeated to execute the iterative method to continuously delete abnormal points from the first set of initial corresponding points and the second set of initial corresponding points. If the iteration number is greater than the preset value, block 270 is implemented.
At block 270, the processing module joins the converted first set of remaining corresponding points with the second set of remaining corresponding points to form a group of joined point cloud, and outputs the joined point cloud to be displayed on a display screen of the computing device. The joined point cloud is a single coherent point cloud relating to the object.
All of the processes described above can be embodied in, and fully automated via, functional code modules executed by one or more general purpose processors such as the processor. The functional code modules can be stored in any type of non-transitory readable medium or other storage device such as the storage device. Some or all of the methods can alternatively be embodied in specialized hardware. Depending on the embodiment, the non-transitory readable medium can be a hard disk drive, a compact disc, a digital versatile disc, a tape drive, or other storage medium.
The described embodiments are merely examples of implementations, and have been set forth for a clear understanding of the principles of the present disclosure. Variations and modifications can be made without departing substantially from the spirit and principles of the present disclosure. All such modifications and variations are intended to be included within the scope of this disclosure and the described inventive embodiments, and the present disclosure is protected by the following claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
201410772019.8 | Dec 2014 | CN | national |