Abstract:
A method for patching up a point cloud comprises obtaining a point cloud and a predetermined interval and a filtering parameter of curvature. Then a void in the point cloud which needs to be patched up is identified. A minimum encasing box is created to enclose the void. Points inside the minimum encasing box and outside the void are selected to create a B-spline curve surface. The B-spline curve surface are interpolated by the predetermined interval to obtain a plurality of discrete points which are used to patch up the void. Messy points in the void according to the predetermined interval and the filtering parameter of curvature are determined and deleted. Positions of the points in the void are adjusted along their normal vector directions to smooth the point cloud.

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
       [0001]    This application claims priority to Chinese Patent Application No. 201410600761.0 filed on Oct. 31, 2014, the contents of which are incorporated by reference herein. 
       FIELD 
       [0002]    The subject matter herein generally relates to a point cloud, and particularly to a method and system for patching up a point cloud of an object. 
       BACKGROUND 
       [0003]    In present point cloud technology, voids may occur at places of a point cloud corresponding to portions of an object being scanned where the scanning thereof cannot be effectuated or where a reference point is set. Furthermore, the voids also can be generated due to an external interference during the scanning of the object or a problem of the scanning device itself occurring during the scanning. 
         [0004]    To patch up the voids, a simulated simple curved surface is created to fill each void. Points on the curved surface are used to make up the missed points in the void. 
         [0005]    However, such a patching-up method cannot make up the missed points at their intended positions. A distortion of the point cloud may be resulted due to the patching up. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0006]    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. 
           [0007]      FIG. 1  is a block diagram of an electronic device having a system for patching up a point cloud in accordance with the present disclosure. 
           [0008]      FIG. 2  is a block diagram of the system for patching up a point cloud in accordance with the present disclosure. 
           [0009]      FIG. 3  is flowchart showing a method for patching up a point cloud in accordance with the present disclosure. 
           [0010]      FIG. 4  is a three-dimensional B-spline curve surface generated in accordance with the present disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0011]    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. 
         [0012]    Several definitions that apply throughout this disclosure will now be presented. 
         [0013]    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 “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 may be embedded in firmware, such as in an erasable programmable read only memory (EPROM). The modules described herein may be implemented as either software and/or computing modules and may 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. 
         [0014]    The present disclosure is described in relation to a system and method for patching up a point cloud , which can be obtained by scanning an object by a laser scanner. The point cloud can be used for, but not limited to, creating a three-dimensional computer-aided design (3D CAD) model for a manufactured part. 
         [0015]      FIG. 1  illustrates a block diagram of an electronic device  100  for achieving the patching-up of a point cloud in accordance with the present disclosure. The electronic device  100  includes a point cloud patching-up system  10 , a processor  20 , a storage unit  30  and a display unit  40 . The electronic device  100  can be a computer, a server, a programmable logic controller (PLC), a measuring machine or any electronic device which has calculation capability. The point cloud patching-up system  10 , the processor  20 , the storage unit  30  and the display unit  40  are coupled together by a system bus  50 , whereby information can flow thereamong. 
         [0016]    The processor  20  can be for example a central processing unit which can execute the point cloud patching-up system  10  and other software such as operating system of the electronic device  100 . The storage unit  30  can be a hard disk drive, or other form of storage device such as solid state memory which store data for the electronic device  100  such as different point clouds of different objects before and after they are processed by the point cloud patching-up system  10  according to the present disclosure. The display unit  40  is used for displaying any visualized information such as a point cloud to be or after being patched up. 
         [0017]    Referring to  FIG. 2 , a block diagram of the point cloud patching-up system  10  is shown, wherein the point cloud patching-up system  10  includes a data retrieving module  11 , a void identifying module  12 , a curve surface creating module  13 , a point making-up module  14 , a filtering module  15 , a judging module  16  and a smoothing module  17 . Each module includes a computer program which is stored in the storage unit  30  and can be executed by the processor  20  to achieve a predetermined function. The functions of the modules  11 ,  12 ,  13 ,  14 ,  15 ,  16 ,  17  will be introduced in connection with disclosure of the flowchart of  FIG. 3 . 
         [0018]    Referring to  FIG. 3 , a flowchart is presented in accordance with an example embodiment. The example method  300  is provided by way of example, as there are a variety of ways to carry out the method. The method  300  described below can be carried out using the configurations illustrated in  FIGS. 1 and 2 , for example, and various elements of these figures are referenced in explaining example method  300 . Each block shown in  FIG. 3  represents one or more processes, methods or subroutines, carried out in the example method  300 . Furthermore, the illustrated order of blocks is illustrative only and the order of the blocks can change according to the present disclosure. Additional blocks can be added or fewer blocks may be utilized, without departing from this disclosure. The example method  300  can begin at block  302 . 
         [0019]    At block  310 , a point cloud of an object and an interval and a filtering parameter of curvature defined by a user are input into the point cloud patching-up system  10  by the data retrieving module  11  thereof. The point cloud includes data of, but not limited to, three dimensional coordinates of points of the point cloud, identifications of the points and a total number of the points. The point cloud can be obtained from a data base in the storage unit  30  of the electronic device  100  or a three-dimensional scanner which is scanning the object. 
         [0020]    According to the present disclosure, the input parameters include, but not limited to, the interval between two points and the filtering parameter of curvature. The interval can be input by the user, or an average interval of the intervals between two neighboring points of the point cloud. In other embodiment, the interval can be dynamically decided in accordance with a predetermined algorithm. 
         [0021]    The filtering parameter of curvature is used to filter out points whose curvatures are too large. The filtering parameter of curvature can be set up by the point cloud patching-up system  10  or by the user, which can be for example 0.8. A value of the curvature of each of the points in the point cloud is between 0 and 1. 
         [0022]    At block  320 , a void in the point cloud to be patched up is identified by the void identifying module  12 . The void identifying module  12  further determines and generates a minimum encasing box for enclosing the void. The minimum encasing box can be, but not limited to, a minimum rectangular encasing box for enclosing the void. 
         [0023]    The void in the point cloud to be patched up can be confirmed by a selection of the user, or confirmed by the void identifying module  12  in accordance with a predetermined algorithm. The predetermined algorithm can be a decision regarding whether an area of a found void is larger than a predetermined area. When the area of a found void is larger than the predetermined area, the found void is confirmed as the void to be patched up by the void identifying module  12  of the point cloud patching-up system  10  in accordance with the present disclosure. The predetermined area can be the area of a void which is formed by a reference point set up for enabling the scanner to scan the object. When an area of a found void is larger than a preset percentage, for example, 80% of the predetermined area, the found void is identified as the void to be patched up. 
         [0024]    At block  330 , the curve surface creating module  13  selects predetermined number of points outside the void and inside the minimum encasing box, and creates a B-spline curve surface according the selected points by applying a predetermined algorithm. The predetermined algorithm can be Newton-Raphson algorithm which is an iterative method for finding successively better approximations to the roots (or zeroes) of a real-valued function. Other iterative methods can also be used. However, the Neck ton-Raphson algorithm can speed the creation of the B-spline curve surface. The B-spline curve surface can be a three-dimensional B-spline curve surface which can preserve the most part of the surface features of the object,  FIG. 4  shows an example of the created B-spline curve surface. 
         [0025]    in the preferred embodiment, the selected points for creating the B-spline surface are evenly and discretely distributed in the region outside the void to be patched-up and inside the minimum encasing box. The selection of the points can be done by first selecting an arbitrary point, then selecting a second point wherein a distance therebetween is equal to a predetermined distance, and a third point wherein a distance between the second and third points is equal to t le predetermined distance and then a fourth point, a fifth point. etc. until a required number of the selected points is reached. The required number of the selected points can be decided by the user and by the point cloud patching-up system  10 , which can be for example 5. The predetermined distance can be a half of a sum of lengths of four sides of a rectangle of the minimum encasing box. 
         [0026]    At block  340 , the point making-up module  14  obtains a plurality of discrete points by interpolating the B-spline curve surface in accordance with the input interval, and filling the discrete points to the void to be patched up. Interpolating the B-spline curve surfaces means to insert points into the B-spline curve surface. 
         [0027]    Referring to  FIG. 4 , the point making-up module  14  forms reference curves along x 1  direction of the B-spline curve surface, wherein a distance between two neighboring reference curves equals to the input interval. Then the point making-up module  14  forms points on each of the reference curves to obtain the discrete points. A distance between two neighboring discrete points equal to a distance of the input interval. 
         [0028]    In an alternative embodiment, the point making-up module  14  obtains the discrete points by further using the curvatures of the points formed by the point making-up module  14  on the reference curves. For example, after the point making-up module  14  forms the equidistant points, the point making-up module  14  judges whether the curvature (c 1 ) of each of the points exceeds a predetermined curvature (c 2 ). When the curvature (c 1 ) of a point exceeds the predetermined value (c 2 ), the point is displaced a second predetermined distance (d 2 ) leftwards along x 2  direction. The x 2  direction is orthogonal to the x 1  direction. When the curvature (c 1 ) of the point does not exceed the predetermined value (c 2 ), the point is kept at its position. After adjustment of the positions of the points, the points form the discrete points filling the void to be patched up. The second predetermined distance (d 2 ) equals to a product of a difference between the curvature (c 1 ) and the predetermined curvature (c 2 ) and the input interval. When the input interval is expressed as d, then d 2 =(c 1 −c 2 )*d. The predetermined curvature can be decided by the user or the point cloud patching-up system  10 . For example, the predetermined curvature can be 0.5. When using the curvatures of the points as a factor in consideration of obtaining the discrete points, the points obtained for patching up the void can more precisely reflect the surface features of the point cloud since more points are required for the place where the curvature is relatively large. Accordingly, the point cloud patched up by the present disclosure can look quite smooth. 
         [0029]    The curvatures of the equidistant points represent the degrees of deformation of the points on the B-spline curve surface. The curvatures of the equidistant points can be obtained from the method for acquiring the curvatures of the B-spline curve surface which has already been known in the art. 
         [0030]    At block  350 , the filtering module  15  determines and deletes messy points in the void to be patched up according to the input interval and filtering parameter of curvature. The messy points include but not limited to those points whose curvatures are larger than the filtering parameter of curvature and isolated points which do not have neighboring points. 
         [0031]    In the present embodiment, the filtering module  15  judges whether the points in the void to be patched up have neighboring points by inquiring whether there is any point which is within a predetermined distance from a point in check. If there is no such point, the point in check is judged as an isolated point. The predetermined distance can be set up by the user or by the point cloud patching-up system  10 , which for example can be a double of the input interval. 
         [0032]    At block  360 , the judging module  16  judges whether there is other voids in the point cloud that need to be patched up. If there is, the method  300  goes back to the block  320 ; if there is no, the method  300  goes to block  370 . 
         [0033]    At block  370 , the smoothing module  17  smoothes the point cloud after it is patched up. During the smoothing process of the point cloud, the smoothing module  17  determines the normal vectors of the added points in the void, and uses the method of minimum movement to cause the points to move along the directions of their normal vectors until the points satisfy the required accuracy of smoothness. The required accuracy of smoothness can be set up by the user or the point cloud patching-up system  10 , which for example can be one tenth of the input interval. At block  380 , the method  300  is ended. 
         [0034]    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 particular the matters of shape, size and arrangement of 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.