NAIL SHAPE EXTRACTION SYSTEM AND METHOD, STORAGE MEDIUM, AND NAIL STICKER AND MANUFACTURING SYSTEM THEREFOR

20240202946 ยท 2024-06-20

    Inventors

    Cpc classification

    International classification

    Abstract

    The application provides a nail shape extraction system and method, a storage medium, a nail tip, and a manufacturing system for the nail tip. The nail shape extraction system uses a cyclic processing device for point cloud extraction and/or flattening. The cyclic processing device comprises a point cloud acquisition module configured to convert point cloud data into a point cloud list and a point cloud processing module configured to perform a cyclic action on points in the point cloud list under a determination condition to obtain a new point cloud list. The point cloud processing module comprises a pushing unit, a selection unit, an action unit, an elimination unit, and a circulation unit for promoting the selection unit, the action unit and the elimination unit to act cyclically. By adding the determination condition, neighboring points meeting an action condition can be selected, and then an action is performed on the neighboring points meeting the action condition, such that the sensitivity of an angle threshold in the action process can be reduced, the action is accurate and effective and will not be performed excessively or insufficiently, and an extracted nail contour can better fit the nail contour of a target finger.

    Claims

    1. A nail shape extraction system based on point clouds, comprising a cyclic processing device for processing point clouds, wherein the cyclic processing device comprises: a point cloud acquisition module configured to acquire point cloud data, convert the acquired point cloud data into a point cloud list {R.sub.act}, and output the point cloud list {R.sub.act} ; and a point cloud processing module connected to the point cloud acquisition module, and configured to perform a cyclic action on points in the point cloud list {R.sub.act} output by the point cloud acquisition module to obtain a new point cloud list {R.sub.act}; the point cloud processing module comprises: a pushing unit connected to the point cloud acquisition module, and configured to acquire the point cloud list {R.sub.act} output by the point cloud acquisition module and push all the points in the point cloud list {R.sub.act} into an empty to-be-acted point list {.sub.act}; a selection unit connected to the pushing unit, and configured to select one point from the to-be-acted point list {A.sub.act} as a current to-be-acted point P.sub.act and search for all neighboring points {N.sub.act} of the current to-be-acted point P.sub.act under a set condition; an action unit connected to the selection unit, and configured to select neighboring points N.sub.act(i) meeting an action condition from the neighboring points {N.sub.act}, classify the neighboring points N.sub.act(i) to select a growing action or a flattening action and then push the neighboring points N.sub.act(i) meeting the action condition into the point cloud list {R.sub.act} and the to-be-acted point list {A.sub.act} ; an elimination unit connected to the action unit, and configured to mark the current to-be-acted point P.sub.act as an acted point and eliminate the acted point from the to-be-acted point list {A.sub.act}; and a circulation unit connected to the selection unit, the action unit and the elimination unit, and configured to promote the selection unit, the action unit and the elimination unit to act cyclically until the to-be-acted point list {A.sub.act} is emptied to obtain the new point cloud list {R.sub.act}.

    2. The nail shape extraction system based on point clouds according to claim 1, wherein in the action unit, a normal vector angle ?.sub.i between each non-acted neighboring point N.sub.act(i) among the neighboring points {N.sub.act} and the current to-be-acted point P.sub.act is calculated; if the normal vector angle ?.sub.i between the non-acted neighboring point N.sub.act(i) and the current to-be-acted point P.sub.actis less than or equal to an angle threshold ?.sub.thres, the non-acted neighboring point N.sub.act(i) is marked as a to-be-further-acted point; otherwise, the non-acted neighboring point N.sub.act(i) is marked as a not-to-be-further-acted point; a maximum area among areas with multiple continuous acted points and/or to-be-further-acted points is determined as a suitable action range {R.sub.c}, and the to-be-further-acted points within the suitable action range {R.sub.c} are pushed into the point cloud list {R.sub.act} and the to-be-acted point list {A.sub.act}.

    3. The nail shape extraction system based on point clouds according to claim 2, wherein in the action unit, a space around the current to-be-acted point P.sub.act is equally divided into n areas with the current to-be-acted point P.sub.act as a central point, numbers of different types of neighboring points N.sub.act(i) in each area are compared to select to-be-acted candidate areas, and then the to-be-acted candidate area with a maximum angle is determined as the suitable action range {R.sub.c} around the current to-be-acted point P.sub.act, the to-be-acted candidate areas are selected according to the following condition: areas where to-be-further-acted points are more than other types of points are determined as to-be-further-acted areas, areas without point clouds and areas where not-to-be-further-acted points are more than other types of points are determined as not-to-be-acted areas, areas where acted points are more than other types of points are determined as acted areas, and adjacent to-be-further-acted areas and/or acted areas are integrated into the to-be-acted candidate areas; or areas where the sum of the number of to-be-further-acted points and the number of acted points is not less than the number of not-to-be-further-acted points are determined as to-be-further-acted areas, areas without point clouds and areas where the sum of the number of to-be-further-acted points and the number of acted points is less than the number of not-to-be-further-acted points are determined as not-to-be-acted areas, and adjacent to-be-further-acted areas are integrated into the to-be-acted candidate areas; or areas only comprising to-be-further-acted points and/or acted points are determined as to-be-further-acted areas, and areas without point clouds and areas comprising not-to-be-further-acted points are determined as not-to-be-acted areas, and adjacent to-be-further-acted areas are integrated into the to-be-acted candidate areas.

    4. The nail shape extraction system based on point clouds according to claim 1, wherein in the action unit, each non-acted neighboring point N.sub.act(i) among the neighboring points {N.sub.act} is flattened to fall into a set plane, and then each flattened neighboring point N.sub.act(i) is pushed into the point cloud list {R.sub.act} and the to-be-acted point list {A.sub.act} and is taken as a new current to-be-acted point P.sub.act in next time of flattening; the set plane is parallel to a plane formed by point clouds, representing a contour, among to-be-flattened point clouds.

    5. The nail shape extraction system based on point clouds according to claim 4, wherein n the action unit, the neighboring points {N.sub.act} of the current to-be-acted point Pact are flattened by equal arc lengths or by projection.

    6. The nail shape extraction system based on point clouds according to claim 4 wherein in the selection unit, a first selected current to-be-acted point P.sub.act falls within the set plane.

    7. The nail shape extraction system based on point clouds according to claim 1, wherein in the selection unit, the selected neighboring points {N.sub.act} are all points within a set search radius R.sub.rs, with the current to-be-acted point P.sub.act as a center; or in the selection unit, the selected neighboring points are a set number N of points closest to the current to-be-acted point P.sub.act.

    8. The nail shape extraction system based on point clouds according to claim 1, wherein the nail shape extraction system based on point clouds further comprises: a point cloud correction device connected to the cyclic processing device, and configured to transform a pose and position of the point clouds to a preset pose and position, and transmit the transformed point clouds to the cyclic processing device.

    9. The nail shape extraction system based on point clouds according to claim 1, wherein the nail shape extraction system based on the point clouds further comprises: an edge processing device connected to the cyclic processing device, and configured to perform edge processing on a point cloud data transmitted by the cyclic processing device to make an edge smooth.

    10. A nail shape extraction system based on point clouds, comprising a step of cyclic processing of point clouds, wherein the step of cyclic processing comprises: S1: acquiring point cloud data, converting the acquired point cloud data into a point cloud list {R.sub.act} and outputting the point cloud list {R.sub.act}, by a point cloud acquisition module; and S2: establishing an empty to-be-acted point list {A.sub.act}, performing, by a point cloud processing module, a cyclic action on points in the point cloud list {R.sub.act} output by the point cloud acquisition module, and obtaining a new point cloud list {R.sub.act}; S2 comprises: S21: acquiring the point cloud list {R.sub.act} output by the point cloud acquisition module and pushing all the points in the point cloud list {R.sub.act} into the empty to-be-acted point list {A.sub.act}, by a pushing unit, such that the point cloud list {R.sub.act} is emptied; S22: selecting one point from the to-be-acted point list {A.sub.act} as a current to-be-acted point P.sub.act and searching for all neighboring points {N.sub.act} of the current to-be-acted point P.sub.act under a set condition, by a selection unit; S23: selecting neighboring points N.sub.act(i) meeting an action condition from the neighboring points {N.sub.act}, classifying the neighboring points N.sub.act(i) to select a growing action or a flattening action and then pushing non-acted neighboring points N.sub.act(i) meeting the action condition into the point cloud list {R.sub.act} and the to-be-acted point list {A.sub.act}, by an action unit; S24: marking the current to-be-acted point Pact as an acted point and eliminating the acted point from the to-be-acted point list {A.sub.act}, by an elimination unit; and S25: selecting another point from the to-be-acted point list {A.sub.act} as a new current to-be-acted point P.sub.act, and repeating S22-S24 by a circulation unit until the to-be-acted point list {A.sub.act} is emptied to obtain the new point cloud list {R.sub.act}.

    11. A computer-readable storage medium, having a computer program instruction stored therein, wherein when the computer program instruction is executed by a processor, the steps of the nail shape extraction system based on point clouds according to claim 10 are performed.

    12. A manufacturing system for a personalized nail tip, comprising a nail shape extension sub-system, the nail shape extraction system based on point clouds according to claim 1, a parameter generation sub-system, and a product processing sub-system, wherein the nail shape extension sub-system, the nail shape extraction system, the parameter generation sub-system and the product processing sub-system are connected in sequence; the nail shape extension sub-system is configured to extract a 3D shape of a finger with a nail of a user, then measure 3D shape data of the finger, and transmit a measurement result to the nail shape extraction system; the nail shape extraction system based on point clouds is configured to convert the 3D shape data of the finger output by the nail shape extension sub-system into a 3D point cloud, extract a curved nail point cloud from the 3D point cloud, flatten the curved nail point cloud into a planar point cloud, extract a nail point cloud representing a contour from the planar point cloud, and then transmit the nail point cloud representing the contour to the parameter generation sub-system in the form of 2D shape data; the parameter generation sub-system is configured to combine the 2D shape data of the planar nail contour output by the nail shape extraction system based on point clouds and parameters of a personalized nail tip selected by a customer to generate a 2D digital model of the personalized nail tip, convert the generated 2D digital model into processing parameters, and transmit the processing parameters to the product processing sub-system; the product processing sub-system is configured to process a to-be-processed material into the personalized nail tip according to the processing parameters output by the parameter generation sub-system.

    13. A personalized nail tip, wherein the nail tip is a personalized nail tip manufactured through the manufacturing system for a personalized nail tip according to claim 12.

    Description

    BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

    [0055] FIG. 1 is a structural diagram of a nail shape extraction system based on point clouds according to Embodiment 1 of the application:

    [0056] FIG. 2 is a flow diagram of the nail shape extraction system based on point clouds according to Embodiment 1 of the application:

    [0057] FIG. 3 is a structural diagram of a cyclic processing device according to Embodiment 1 of the application:

    [0058] FIG. 4 is a flow diagram of the step of cyclic processing according to Embodiment 1 of the application:

    [0059] FIG. 5 is a structural diagram of a segmentation growing device according to Embodiment 2 of the application:

    [0060] FIG. 6 is a flow diagram of the step of point cloud extraction according to Embodiment 2 of the application:

    [0061] FIG. 7 is a schematic diagram of a current to-be-acted point and neighboring point within a search radius of the current to-be-acted point according to Embodiment 2 of the invention:

    [0062] FIG. 7a is a schematic diagram of a suitable growing range obtained through a first method according to Embodiment 2 of the application:

    [0063] FIG. 7b is a schematic diagram of a suitable growing range obtained through a second method according to Embodiment 2 of the application:

    [0064] FIG. 7c is a schematic diagram of a suitable growing range obtained through a third method according to Embodiment 2 of the application:

    [0065] FIG. 8 is a structural diagram of a point cloud flattening device according to Embodiment 3 of the application:

    [0066] FIG. 9 is a flow diagram of the step of point cloud flattening according to Embodiment 3 of the application:

    [0067] FIG. 10 is a structural diagram of a manufacturing system for a personized nail tip according to Embodiment 4 of the application:

    [0068] FIG. 11 is a structural diagram of a personalized nail tip according to Embodiment 4 of the application.

    DETAILED DESCRIPTION OF THE INVENTION

    [0069] The technical solutions of the embodiments of the application will be described below in conjunction with the accompanying drawings.

    [0070] It should be understood that specific examples in this specification are merely used to help those skilled in the art have a better understanding of the embodiments of the application, and are not intended to limit the scope of the embodiments of the application.

    [0071] It should also be understood that the serial numbers of processes in the embodiments of the application do not indicate the execution order of the processes, the execution order the processes should be determined by function and internal logic, and the serial numbers should not be construed any limitations of the implementation process of the embodiments of the application.

    [0072] It should also be noted that various embodiments described in this specification may be implemented separately or in combination, and the application has not limitation in this aspect.

    [0073] Unless otherwise stated, all technical and scientific terms used in the embodiments of the application have the same meaning as commonly understood by those skilled in the art. The terms used in the application are merely used for describing specific embodiments and are not intended to limit the scope of the application. The term and/or used in the application indicates the inclusion of any and all possible combinations of one or more relevant items listed.

    EMBODIMENT 1

    [0074] Embodiment 1 of the application provides a nail shape extraction system based on point clouds, which is used for extracting a planar shape fitting the curved surface of a nail, and customizing a personalized nail tip fitting the nail shape of users. Specifically, as shown in FIG. 1, the nail shape extraction system based on point clouds comprises a data acquisition device used for collecting and acquiring finger 3D data Data.sub.Finger of a user, a data conversion device used for converting the finger 3D data Data.sub.Finger into a finger point cloud Cloud.sub.Finger, a segmentation growing device used for extracting a curved nail surface point cloud Cloud.sub.Nail-s from the finger point cloud Cloud.sub.Finger, and a point cloud flattening device used for flattening the curved nail surface point cloud Cloud.sub.Nail-s to obtain a planar nail surface point cloud Cloud.sub.Nail-p, wherein the data acquisition device, the data conversion device, the segmentation growing device and the point cloud flattening device are connected in sequence.

    [0075] According to the nail shape extraction system based on point clouds provided by Embodiment 1, Embodiment 1 of the application also provides a nail shape extraction method based on point clouds, which as shown in FIG. 2 comprises:

    [0076] A step of data acquisition: performing 3D scanning on a target finger by the data acquisition device to obtain finger 3D data Data.sub.Finger of the target finger, wherein the finger 3D data Data.sub.Finger at least comprises nail 3D data Data.sub.Nail of a whole nail;

    [0077] A step of data conversion: converting the finger 3D data Data.sub.Finger into 3D point cloud data by the data conversion device to obtain a finger point cloud Cloud.sub.Finger, wherein the finger point cloud Cloud.sub.Finger at least comprises a curved nail surface point cloud Cloud.sub.Nail-s of the whole nail:

    [0078] A step of point cloud extraction: segmenting the finger point cloud CloudFinger by the segmentation growing device to obtain the curved nail surface point cloud Cloud.sub.Nail-s in the finger point cloud CloudFinger: and

    [0079] A step of point cloud flattening: flattening the curved nail surface point cloud Cloud.sub.Nail-s under the condition of equal surface area by the point cloud flattening device to obtain a planar nail surface point cloud Cloud.sub.Nail-p.

    [0080] In the nail shape extraction system and method based on point clouds, the data acquisition device can be a laser radar, a depth camera or can be a 3D scanner, a structured light camera and a binocular camera which made mainly of a laser radar or a depth camera, or the like. For example, in the step of data acquisition, the data acquisition device performs 3D scanning on the target finger by means of the laser radar based on the triangulation ranging principle or performs 3D scanning on the target finger by means of the depth camera based on the structured light ranging principle, the binocular vision ranging principle and the TOF ranging principle, such that the finger 3D data DataFinger can be obtained quickly and accurately.

    [0081] All the 3D scanning ranging principles mentioned above such as the triangulation ranging principle, the TOF ranging principle, the structured light ranging principle and the binocular vision ranging principle are existing technique and are widely used in daily life, and thus will not be detailed here.

    [0082] In the nail shape extraction system and method based on point clouds, the data conversion device receives the finger 3D data Data.sub.Finger collected and sent by the data acquisition device, and then converts the finger 3D data Data.sub.Finger into 3D point cloud data to obtain the finger point cloud Cloud.sub.Finger. Specifically, the data conversion device converts the finger 3D data Data.sub.Finger into PLC data or data in other formats supported by a point cloud library, such as the ped format and the ply format, the specific format is determined according to the format of data acquired by the data acquisition device and the data format supported by the segmentation growing device and the point cloud flattening device. Because the finger 3D data Data.sub.Finger at least comprises the nail 3D data DataNanl of the nail and skin 3D data Data.sub.skin of skin around the nail, the finger point cloud Cloud.sub.Finger in the pcd format or other data formats supported by the point cloud library converted from the finger 3D data Data.sub.Finger at least comprises the curved nail surface point cloud Cloud.sub.Nail-s of the nail with an uneven and curved surface and a skin point cloud Cloud.sub.skin of the skin around the nail.

    [0083] Of course, in other examples of Embodiment 1, if the data acquisition device has a data conversion function, the data acquisition device can also serve as the data conversion device to directly convert the data format of the finger 3D data Data.sub.Finger into the pcd format to obtain the finger point cloud Cloud.sub.Finger, in the step of data conversion.

    [0084] In Embodiment 1, a determination condition for determining whether an action needs to be performed on the point cloud is added in the step of point cloud extraction and/or point cloud flattening, that is, when the curved nail surface point cloud Cloud.sub.Nail-s is extracted and/or when the curved nail surface point cloud Cloud.sub.Nail-s is flattened, a current to-be-acted point Puct and all neighboring points {N.sub.act} around the current to-be-acted point Puct are selected, then neighboring points N.sub.act(i), meeting the action condition, among all the neighboring points {N.sub.act} are determined, and then a corresponding action is performed on the neighboring points N.sub.act(i) meeting the action condition, such that the action can be performed on the neighboring points {N.sub.act} around the current to-be-acted point P.sub.act more accurately and will not be performed excessively or insufficiently, the cycle number is reduced, and the running speed is increased.

    [0085] In the presence of the determination condition, as shown in FIG. 3, the segmentation growing device and/or the point cloud flattening device is a cyclic processing device, which comprises a point cloud acquisition module and a point cloud processing module, wherein the point cloud processing module has an initially empty to-be-acted point list {A.sub.act} which is used in the subsequent point cloud processing process: the point cloud acquisition module is used for acquiring point cloud data obtained in the previous step, presenting the point cloud data in the form of a point cloud list {R.sub.act}, and then transmitting the point cloud list {R.sub.act} to the point cloud processing module: and the point cloud processing module receives the point cloud list {R.sub.act} transmitted from the point cloud acquisition module, and then preforms segmentation growing on the finger point cloud Cloud.sub.Finger to extract the curved nail surface point cloud Cloud.sub.Nail-s or flattens the curved nail surface point cloud Cloud.sub.Nail-s to obtain the planar nail point cloud Cloud.sub.Nail-p.

    [0086] The point cloud processing module of the cyclic processing device comprises a pushing unit, a selection unit, an action unit, an elimination unit and a circulation unit. Wherein, an input terminal of the pushing unit is connected to an output terminal of the point cloud acquisition module, an output terminal of the pushing unit is connected to the selection unit, the selection unit, the action unit, the elimination unit and the circulation unit are connected cyclically, and an output terminal of the circulation unit is connected to the input terminal of the device in the next step.

    [0087] Specifically, the pushing unit has the input terminal connected to the output terminal of the point cloud acquisition module, and is configured to acquire the point cloud list {R.sub.act} output by the point cloud acquisition module and push all points in the point cloud list {R.sub.act} into the empty to-be-acted point list {A.sub.act}, such that the point cloud list {R.sub.act} is emptied.

    [0088] The selection unit has an input terminal connected to the output terminal of the pushing unit, and is configured to select one point from the to-be-acted point list {A.sub.act} output by the pushing unit as a current to-be-acted point P.sub.act and search for all neighboring points {N.sub.act} of the current to-be-acted point P.sub.act under a set condition.

    [0089] The action unit has an input terminal connected to the output terminal of the selection unit, and is configured to select neighboring points N.sub.act(i) meeting an action condition from all the neighboring points {N.sub.act}, classify the neighboring points N.sub.act(i) to select a growing action or a flattening action and then push the neighboring points N.sub.act(i) meeting the action condition into the point cloud list {R.sub.act} and the to-be-acted point list {A.sub.act}.

    [0090] The elimination unit has an input terminal connected to an output terminal of the action unit, and is configured to mark the current to-be-acted point P.sub.act output by the action unit as an acted point and eliminate the acted point from the to-be-acted point list {A.sub.act}.

    [0091] The circulation unit has an input terminal connected to an output terminal of the elimination unit and an output terminal connected to the input terminal of the selection unit, and is configured to promote the selection unit, the action unit and the elimination unit to act cyclically to form a selection unit-action unit-elimination unit-circulation unit-selection unit cyclic connection structure until the to-be-acted point list {A.sub.act} is emptied, to obtain a new point cloud list {R.sub.act}.

    [0092] Based on the segmentation growing device and/or the point cloud flattening device in the nail shape extraction system based on point clouds provided by Embodiment 1, the step of point cloud extraction and/or point cloud flattening in the nail shape extraction method based on point clouds provided by Embodiment 1 is a step of cyclic processing, which as shown in FIG. 4 specifically comprises:

    [0093] S1: acquiring the point cloud data output in the previous step, converting the acquired point cloud data into a point cloud list {R.sub.act} and outputting the point cloud list {Ruct}, by the point cloud acquisition module; and

    [0094] S2: establishing an empty to-be-acted point list {A.sub.act}, acquiring, by the point cloud processing module, the point cloud list {R.sub.act} output by the point cloud acquisition module, and then performing a cyclic action on points in the point cloud list {R.sub.act}, and obtaining a new point cloud list {R.sub.act}.

    [0095] S2 specifically comprises:

    [0096] S21: acquiring the point cloud list {R.sub.act} output by the point cloud acquisition module and pushing all points in the point cloud list {R.sub.act} into a to-be-acted point list {A.sub.act}, by the pushing unit, such that the point cloud list {R.sub.act} is emptied:

    [0097] S22: selecting one point from the to-be-acted point list {A.sub.act} as a current to-be-acted point P.sub.act and searching for all neighboring points {N.sub.act} of the current to-be-acted point P.sub.act under a set condition, by the selection unit:

    [0098] S23: selecting neighboring points N.sub.act(i) meeting an action condition from all the neighboring points {N.sub.act}, classifying the neighboring points N.sub.act(i) to select a growing action or a flattening action and then pushing non-acted neighboring points N.sub.act(i) meeting the action condition into the point cloud list {R.sub.act} and the to-be-acted point list {A.sub.act}, by the action unit:

    [0099] S24: marking the current to-be-acted point P.sub.act as an acted point and eliminating the acted point from the to-be-acted point list {A.sub.act}, by the elimination unit: and

    [0100] S25: selecting another point from the to-be-acted point list {A.sub.act} as a new current to-be-acted point P.sub.act, and repeating S22-S24 by the circulation unit until the to-be-acted point list {A.sub.act} is emptied, such that the new point cloud list {R.sub.act} is obtained.

    [0101] Compared with the prior art, the nail shape extraction system and method based on point clouds in Embodiment I have the following advantages: by adding the determination condition, the neighboring points {N.sub.act} around the current to-be-acted point P.sub.act under the set condition are selected and determined, an action is accuracy performed on the neighboring points N.sub.act(i) meeting the action condition according to determination results, such that the sensitivity of an angle threshold ?.sub.thres in the action process can be reduced, the action is accurate and effective and will not be performed excessively or insufficiently, repeated action of acted points is avoided, the cycle number is reduced, and the running speed is increased.

    [0102] All points in the to-be-acted point list {A.sub.act} are in the form of a set, {A.sub.act}={A.sub.1, A.sub.2, A.sub.3 . . . }. In some examples of Embodiment 1, points in the to-be-acted point list {A.sub.act} are selected as to-be-acted points randomly. In some other examples, points in the to-be-acted point list {A.sub.act} are selected as to-be-acted points regularly. For example, in S22 of the application, the frontmost point in the to-be-acted point list {A.sub.act} is selected as the current to-be-acted point P.sub.act by the selection unit, and the frontmost point in the to-be-acted point list {A.sub.act} is the first point in the point cloud set {A.sub.1, A.sub.2, A.sub.3 . . . }, which is A.sub.1. In this way, the step of selecting the current to-be-acted point P.sub.act is simplified, the selection method is optimized, the calculation steps are reduced, and the running speed is increased.

    [0103] In S22, all neighboring points {N.sub.act} around the current to-be-acted point P.sub.act under the set condition are selected by the selection unit generally through two methods: first, with the current to-be-acted point P.sub.act as the center, all points within a set search radius R.sub.rs are taken as the neighboring points {N.sub.act}: second, with the current point as an origin, a set number N of points closest to the current to-be-acted point P.sub.act are taken as the neighboring points {N.sub.act}. The search radius R.sub.rs or the set number N is selected as actually needed, such that an action can be accurately performed on the neighboring points {N.sub.act} meeting the action condition around the current to-be-acted point P.sub.act with a small number of cycles.

    [0104] In some examples, when the neighboring points {N.sub.act} within the search radius R.sub.rs around the current to-be-acted point P.sub.act are selected, a means distance d between all points in the to-be-acted point list {A.sub.act} is calculated first, and the search radius R.sub.rs is set to be 1.1-3 times of the means distance d, more preferably 1.5-2 times of the means distance d.

    [0105] In some examples, when the set number N of neighboring points {N.sub.act} closest to the current to-be-acted point P.sub.act are selected, the set number N is 4-30, more preferably 10-15.

    [0106] In Embodiment 1, the selection of neighboring points within the set range and the selection of the set number of neighboring point can be realized by a kd-tree or Octree.

    [0107] k-d tree (k-dimensional tree) is a tree-form data structure where instance nodes in a k-dimensional space are stored to realize quick search of the instance nodes, and is mainly used for searching for key data in a multi-dimensional space, such as range search and nearest neighbor search.

    [0108] Octree is a tree-form data structure for describing a three-dimensional space, each node of the Octree represents a volume element of a cube and comprises eight sub-nodes, and the sum of the volume elements of the eight sub-nodes is equal to the volume of a father node. In specific use, Octree searches for the neighboring points {N.sub.act} by binary search.

    [0109] No matter whether k-d tree or Octree is used, all the neighboring points {N.sub.act} around the current to-be-acted point P.sub.act under the set condition can be searched out quickly and accurately.

    [0110] As shown in FIG. 1 and FIG. 2, in some examples of Embodiment 1, the nail shape extraction system based on point clouds further comprises a point cloud correction device, which is arranged between the data conversion device and the segmentation growing device, and is configured to receive the finger point cloud Cloud.sub.Finger transmitted from the data conversion device, transform the pose and position of the finger point cloud Cloud.sub.Finger to a preset pose and position, and then transmit the transformed finger point cloud Cloud.sub.Finger to the point cloud acquisition module before the nail surface cloud point Cloud.sub.Nail-s is extracted from the finger point cloud Cloud.sub.Finger. In this way, the position of the finger point cloud Cloud.sub.Finger is corrected before point cloud segmentation to facilitate processing and calculation, the processing process is simplified, and the running speed is increased.

    [0111] Corresponding to the point cloud correction device, the nail shape extraction method based on point clouds provided by Embodiment I further comprise the following step between the step of data conversion and the step of point cloud extraction:

    [0112] A step of point cloud correction: transforming the pose and position of the output finger point cloud Cloud.sub.Finger to a preset pose and position by the point cloud direction device.

    [0113] It should be noted that the at the preset pose and position, the centroid of the output finger point cloud Cloud.sub.Finger coincides with an origin of a coordinate system in the point cloud library, a front end of the finger points to a forward direction of an x-axis of the coordinate system, a left side of the finger in the width direction points to a forward direction of a y-axis of the coordinate system, and a back of the finger points to a negative direction of a z-axis of the coordinate system.

    [0114] More specifically, the front end of the finger is an end, close to the nail growing end, of the finger and points to the growing direction of the nail, the left side of the finger in the width direction is a left side in the growing direction of the nail, and the back of the finger is a side, where the nail grows, of the finger, and points to the finger pulp.

    [0115] The point cloud correction device corrects the pose and position of the point cloud through many methods such as rotation matrix, quaternion and Euler angle.

    [0116] In some other examples of Embodiment 1, the point cloud correction device is arranged between the segmentation growing device and the point cloud flattening device, and is configured to receive the curved nail surface point cloud CloudNuls transmitted from the segmentation growing device and transform the pose and position of the curved nail surface point cloud Cloud.sub.Nail-s to a preset pose and position before the curved nail surface point cloud Cloud.sub.Nail-s is flattened.

    [0117] As shown in FIG. 1, in some other examples of Embodiment 1, the nail shape extraction system based on point clouds further comprises an edge processing device (cyclic processing device), wherein an input terminal of the edge processing device is connected to an output terminal of the segmentation growing device and/or the point cloud flattening device. The edge processing device is configured to perform edge processing on the curved nail surface point cloud Cloud.sub.Nail-s output by the segmentation growing device and/or the planar nail surface point cloud Cloud.sub.Nail-p output by the point cloud flattening device to make the edge of the curved nail surface point cloud Cloud.sub.Nail-s and/ or the edge of the planar nail surface point cloud Cloud.sub.Nail-p smooth.

    [0118] Corresponding to the edge processing device, the nail shape extraction method based on the point cloud provided by Embodiment I further comprises, as shown in FIG. 2, the following step after the step of point cloud flattening:

    [0119] A step of edge processing: extracting an input contour point cloud Cloud.sub.contour-i, representing a contour, from the planar nail surface point cloud Cloud.sub.Nail-p output by the point cloud flattening device, and performing curve fitting on the input contour point cloud to obtain a smooth output contour point cloud Cloud.sub.Contour-o, by the edge processing device.

    [0120] A smooth nail curve is obtained by performing curve fitting on the flattened planar nail surface point cloud Cloud.sub.Nail-p, and the nail curve eliminates obvious unmatched point clouds or makes up for points failing to grow on the premise of conforming to the edge contour of the nail, such that the nail contour extraction accuracy is improved, the aesthetics of a nail contour draw according to the nail curve is improved, and thus, the fitness and aesthetics of a nail tip model made according to the nail contour and a nail tip produced through the nail tip model are improved.

    [0121] Of course, in some other examples of Embodiment 2, the input terminal of the edge processing device is connected to the output terminal of the segmentation growing device, and the edge processing device is configured to perform edge processing on the curved nail surface point cloud Cloud.sub.Nail-s output by the segmentation growing device to make the edge of the curved nail surface point cloud Cloud.sub.Nail-s smooth.

    [0122] On this basis, the step of edge processing performed after the step of point cloud extraction specifically comprises:

    [0123] Extracting an input contour point cloud Cloud.sub.Contour-i, representing a contour, from the curved nail surface point cloud Cloud.sub.Nail-s output by the segmentation growing device, and performing curve fitting on the input contour point cloud to obtain a smooth output contour point cloud Cloud.sub.Contour-o, by the edge processing device.

    [0124] Of course, in some other examples of the nail shape extraction method based on point clouds in Embodiment 1, the step of edge processing is performed both after the step of point cloud extraction and after the step of point cloud flattening to perform curve fitting on the input contour point cloud Cloud.sub.Contour-i, representing the contour, extracted from the curved nail surface point cloud Cloud.sub.Nail-s and the input contour point cloud Cloud.sub.Contour-i, representing the contour, extracted from the planar nail surface point cloud Cloud.sub.Nail-p respectively to obtain smooth output contour point clouds Cloud.sub.Contour-o. In this way, the nail contour extraction accuracy can be further improved, the aesthetics of the nail contour draw according to the nail curves is improved, and thus, the fitness and aesthetics of a nail tip model made according to the nail contour and a nail tip produced through the nail tip model are improved. The smooth contour can facilitate the production and cutting of nail tips and lower the production difficulty.

    [0125] On the basis of the nail shape extraction method based on point clouds, Embodiment 1 of the application further provides a computer-readable storage medium having a computer program instruction stored therein, and when the computer program instruction is executed by a processor, the steps of the nail shape extraction method based on point clouds in Embodiment 1 are performed.

    EMBODIMENT 2

    [0126] Embodiment 2 of the application provides a nail shape extraction system based on point clouds, which is designed and implemented based on the nail shape extraction system based on point clouds in Embodiment 1. The actual process or structure of the nail shape extraction system based on point clouds in this embodiment is similar to that of the nail shape extraction system based on point clouds in Embodiment 1, and also has some difference from that of the nail shape extraction system based on point clouds in Embodiment 1, and these differences will be described below: Other details that are not described below should be considered as the same as those in Embodiment 1, and will not be repeated anymore.

    [0127] In Embodiment 2, as shown in FIG. 5, the nail shape extraction system and method are described in detail in the presence of the determination condition added in the step of point cloud extraction. Specifically, in Embodiment 2, the segmentation growing device of the nail shape extraction system comprises a point cloud acquisition module and a point cloud extraction module which are connected to each other, wherein the point cloud acquisition module is connected to the data conversion device, and is configured to acquire the finger point cloud Cloud.sub.Finger transmitted from the data conversion device and convert the finger point cloud Cloud.sub.Finger into a growing point cloud list {R.sub.g}, and the point cloud extraction module is configured to receive the growing point cloud list {R.sub.g} transmitted from the point cloud acquisition module, establish an empty to-grow point list {A.sub.g}, and then perform a segmentation growing action on the point cloud to extract the curved nail surface point cloud Cloud.sub.Nail-s.

    [0128] The point cloud extraction module comprises a pushing unit, a selection unit, a growing action unit, an elimination unit and a circulation unit. Wherein, an input terminal of the pushing unit is connected to an output terminal of the point cloud acquisition module, an output terminal of the pushing unit is connected to the selection unit, the selection unit, the growing action unit, the elimination unit and the circulation unit are connected cyclically, and an output terminal of the circulation unit is connected to an input terminal of the device in the step of point cloud flattening.

    [0129] As shown in FIG. 6, the step of point cloud extraction of the nail shape extraction method using the segmentation growing device specifically comprises:

    [0130] SI: acquiring the finger point cloud Cloud.sub.Finger output by the data conversion device, converting the finger point cloud Cloud.sub.Finger into a growing point cloud list {R.sub.g} and outputting the growing point cloud list {R.sub.g}, by the point cloud acquisition module: and

    [0131] S2: establishing an empty to-grow point list {A.sub.g}, extracting, by the point cloud extraction module, the growing point cloud list {R.sub.g} from the point cloud acquisition module, performing the following action on points in the growing point cloud list {R.sub.g}, and obtaining a new growing point cloud list {R.sub.g};

    [0132] S21: acquiring the growing point cloud list {R.sub.g} output by the point cloud acquisition module and pushing all points in the growing point cloud list {R.sub.g} into the to-grow point list {A.sub.g}, by the pushing unit, such that the growing point cloud list {R.sub.g} is emptied:

    [0133] S22: selecting one point from the to-grow point list {A.sub.g} as a current to-grow point P.sub.g and searching for all neighboring points {N.sub.g} of the current to-grow point Pg under a set condition, by the selection unit:

    [0134] S23: selecting neighboring points N.sub.g(i) meeting an action condition from the neighboring points {N.sub.g}, classifying the neighboring points N.sub.g(i) to select a growing action and pushing non-growing neighboring points N.sub.g(i) meeting the action condition into the growing point cloud list {R.sub.g} and the to-grow point list {A.sub.g}, by the growing action unit:

    [0135] S24: marking the current to-grow point P.sub.g as a grown point and eliminating the grown point from the to-grow point list {A.sub.g}, by the elimination unit: and

    [0136] S25: selecting another point from the to-grow point list {A.sub.g} as a new current to-grow point P.sub.g, and repeating S22-S24 by the circulation unit until the to-grow point list {A.sub.g} is emptied, such that the new growing point list {R.sub.g} representing the curved nail surface point cloud Cloud.sub.Nail-s is obtained.

    [0137] S23 specifically comprises: in the growing action unit, calculating a normal vector angle ?.sub.i between each non-growing neighboring point Ng(i) among all the neighboring points {Ng} and the current to-grow point P.sub.g; if the normal vector angle ?.sub.i between the non-growing neighboring point N.sub.g(i) and the current to-grow point P.sub.g is less than or equal to an angle threshold ?.sub.thres, marking the non-growing neighboring point N.sub.g(i) as a further-to-grow point: or if the normal vector angle ?.sub.i between the non-growing neighboring point N.sub.g(i) and the current to-grow point P.sub.g is greater than the angle threshold ?.sub.thres, marking the non-growing neighboring point N.sub.g(i) as a not-to-grow point.

    [0138] A determination condition is added in the point cloud segmentation growing process, a maximum area among areas with multiple continuous grown points and/or further-to-grow points is determined as a suitable growing range, and all further-to-grow points in the suitable growing range are pushed into the growing point cloud list {R.sub.g} and the to-grow point list {A.sub.g}.

    [0139] If the set angle threshold ?.sub.thres is too large, the nail point cloud will grow excessively, and the extracted curved nail surface point cloud Cloud.sub.Nail-s will be too large. If the set angle threshold ?.sub.thres is too small, the nail point cloud will fail to grow, and the extracted curved nail surface point cloud Cloud.sub.Nail-s will be too small, the cycle number will be increased, and the running speed will be decreased.

    [0140] Compared with the prior art, the nail shape extraction system and method based on point clouds in Embodiment 3 can accurately extract the curved nail surface point cloud Cloud.sub.Nail-s from the finger point cloud Cloud.sub.Finger, and by adding the growing determination condition, the sensitivity of the angle threshold ?.sub.thres can be reduced, and excessive growth or failure to grow of the point cloud is reduced, thus obtaining a more accurate calculation and segmentation result. Moreover, under the growing determination condition added in Embodiment 2, no action is performed on growing points, such that the cycle number is reduced, the running time is shortened, and the running speed is increased.

    [0141] From the aspect of algorithm flow, the specific process of the step of point cloud extraction is as follows:

    [0142] Input: [0143] Input the finger point cloud Cloud.sub.Finger [0144] Input the current to-grow point P.sub.g [0145] Input the plane normal vector {N.sub.p} [0146] Input the search radius R.sub.rs [0147] Input the angle threshold ?.sub.thre

    [0148] Output: [0149] Output the growing point cloud list {R.sub.g}

    [0150] Initialize: [0151] Initialize the growing point cloud list {R.sub.g} [0152] Initialize the to-grow point cloud list, push all the points in the growing point cloud list {R.sub.g} into the to-grow point cloud list {A.sub.g} to empty the growing point cloud list {R.sub.g}, {A.sub.g}?{R.sub.g} [0153] Calculate the plane normal vector {N.sub.p} of input point clouds

    [0154] Algorithm loop: [0155] As long as the to-grow point list {A.sub.g} is not empty, [0156] Select one point from the to-grow point cloud list {A.sub.g} as the current to-grow point P.sub.g [0157] Quickly search out all neighboring points {N.sub.g} of the current to-grow point P.sub.g within the search radius R.sub.rs by k-d tree [0158] For each non-growing neighboring point N.sub.g(i) among all the neighboring points {N.sub.g}, calculate:

    [0159] the normal vector angle ?.sub.i between the current neighboring point N.sub.g(i) and the current to-grow point P.sub.g; if ?.sub.i is less than or equal to the angle threshold ?.sub.thres, that is, ?.sub.i??.sub.thres, mark N.sub.g(i) as a further-to-grow point: otherwise, mark the N.sub.g(i) as a not-to-grow point [0160] For each N.sub.g(i) among all the all the neighboring points {N.sub.g}, calculate a relative direction between the current neighboring point N.sub.g(i) and the current to-grow point P.sub.g; [0161] Calculate the suitable growing range {R.sub.c} around the current to-grow point P.sub.g based on the above data [0162] Traverse all further-to-grow neighboring points N.sub.g(i), within the suitable growing range {R.sub.c}, around the current to-grow point P.sub.g, that is, N.sub.g(i)?{R.sub.c}, add the neighboring points N.sub.g(i) meeting the condition to the growing point cloud list {R.sub.g} and the to-grow point list {A.sub.g}, {R.sub.g}?{R.sub.g}UN.sub.g(i) {A.sub.g}?{A.sub.g} UN.sub.g(i) [0163] Mark the current to-grow point P.sub.g as a grown point, and eliminate the current to-grow point P.sub.g from the to-grow point list {A.sub.g}, {A.sub.g}?{A.sub.g}\P.sub.g [0164] Select another point from the to-grow point list {A.sub.g} as a new current to-grow point P.sub.g, repeat the above process until the to-grow point list {A.sub.g} is emptied, and output a new growing point list {R.sub.g} representing the curved nail point cloud Cloud.sub.Nail-s

    [0165] In the growing action unit and S23, with the current to-grow point P.sub.g as a central point, the space around the current to-grow point P.sub.g is equally divided into n areas, the numbers of different types of neighboring points in the areas are compared to select to-grow candidate areas, and then the to-grow candidate area with the maximum angle is determined as the suitable growing range {R.sub.c} around the current to-grow point P.sub.g. Herein, the value of n is 4-30, preferably 10-15.

    [0166] In Embodiment 2, as shown in FIG. 7, the space around the current to-grow point P.sub.g is equally divided into 12 areas for calculation by way of an example. Specifically, in Embodiment 2, all neighboring points {N.sub.g} within the search radius R.sub.rs, which is 1.5 times of d, are searched out, and the search range is equally divided into 12 sectors with the current to-grow point P.sub.g as the center. In this way, the current to-grow point P.sub.g and all the neighboring points {N.sub.g} of the current to-grow point P.sub.g under the set condition are obtained, as shown in FIG. 7 where .Math. represents grown points, * represents further-to-grow point, and .Math. represent not-to-grow points.

    [0167] In different examples of Embodiment 2, the largest to-grow candidate area within the range can be selected through different methods.

    [0168] First method: in some examples, as shown in FIG. 7a, areas where further-to-grow points are more than other types of points are determined as further-to-grow areas, areas without point clouds and areas where not-to-grow points are more than other types of points are determined as not-to-grow areas, areas where grown points are more than other types of points are determined as grown areas, and adjacent to-be-grow areas and/or grown areas are integrated into the to-grow candidate areas. The non-adjacent to-grow candidate areas are compared, and the to-grow candidate area with the maximum angle is selected as the suitable growing range {R.sub.c} around the current to-grow point P.sub.g.

    [0169] Second method: in some examples, as shown in FIG. 7b, areas where the sum of the number of further-to-grow points and the number of grown points is not less than the number of not-to-grow points are determined as further-two-grow areas, areas without point clouds and areas where the sum of the number of further-to-grow points and the number of grown points is less than the number of not-to-grow points are determined as not-to-grow areas, and adjacent further-to-grow areas are integrated into the to-grow candidate areas. The non-adjacent to-grow candidate areas are compared, and the to-grow candidate area with the maximum angle is selected as the suitable growing range {R.sub.c} around the current to-grow point P.sub.g.

    [0170] Third method: in some examples, as shown in FIG. 7c, areas only comprising further-to-grow points and/or grown points are determined as further-to-grow areas, and areas without point clouds and areas comprising not-to-grow points are determined as not-to-grow areas, and adjacent further-to-grow areas are integrated into the to-grow candidate areas. The non-adjacent to-grow candidate areas are compared, and the to-grow candidate area with the maximum angle is selected as the suitable growing range {R.sub.c} around the current to-grow point P.sub.g.

    [0171] As can be seen, all the three methods can obtain the suitable growing range {R.sub.c}: although the suitable growing ranges {R.sub.c} obtained through the three methods may be slightly different, and points within these ranges can be corrected continuously in the cyclic growing process of the corresponding neighboring points N.sub.g(i) pushed into the to-grow point list {A.sub.g}.

    EMBODIMENT 3

    [0172] Embodiment 3 of the application provides a nail shape extraction system based on point clouds, which is designed and implemented based on the nail shape extraction system based on point clouds in Embodiment 1 or 2. The actual process or structure of the nail shape extraction system based on point clouds in this embodiment is similar to that of the nail shape extraction system based on point clouds in Embodiment 1 or 2, and also has some difference from that of the nail shape extraction system based on point clouds in Embodiment 1 or 2, and these differences will be described below: Other details that are not described below should be considered as the same as those in Embodiment 1 and 2, and will not be repeated anymore.

    [0173] In Embodiment 3, as shown in FIG. 8, the nail shape extraction system and method are described in detail in the presence of the determination condition added in the step of point cloud extraction. Specifically, in Embodiment 3, the point cloud flattening device of the nail shape extraction system comprises a point cloud acquisition module and a point cloud flattening module which are connected to each other, wherein the point cloud acquisition module is connected to the segmentation growing device, and is configured to acquire the curved nail surface point cloud Cloud.sub.Nail-s transmitted from the segmentation growing device and convert the curved nail surface point cloud Cloud.sub.Nail-s into a flattened point cloud list {R.sub.e}, and the point cloud flattening module is configured to receive the flattened point cloud list {R.sub.e} transmitted from the point cloud acquisition module, establish an empty to-be-flattened point list {A.sub.e}, and perform a flattening action to flatten the curved nail surface point cloud Cloud.sub.Nail-s into a planar nail surface point cloud Cloud.sub.Nail-p with the same area.

    [0174] The point cloud flattening module comprises a pushing unit, a selection unit, a flattening action unit, an elimination unit and a circulation unit. Wherein, an input terminal of the pushing unit is connected to an output terminal of the point cloud acquisition module, an output terminal of the pushing unit is connected to the selection unit, the selection unit, the flattening action unit, the elimination unit and the circulation unit are connected cyclically, and an output terminal of the circulation unit is connected to an input terminal of the device in the step of point cloud flattening.

    [0175] As shown in FIG. 9, the step of point cloud flattening of the nail shape extraction method using the point cloud flattening device specifically comprises:

    [0176] SI: extracting the curved nail surface point cloud Cloud.sub.Nail-s output by the segmentation growing device, converting the curved nail surface point cloud Cloud.sub.Nail-s into a flattened point cloud list {R.sub.e} and outputting the flattened point cloud list {R.sub.e}, by the point cloud acquisition module:

    [0177] S2: establishing an empty to-be-flattened point cloud list {A.sub.e}, and performing the following action on points in the flattened point cloud list {R.sub.e} output by the point cloud acquisition module to obtain a new flattened point cloud list {R.sub.e}:

    [0178] S21: acquiring the flattened point cloud list {R.sub.e} output by the point cloud acquisition module and pushing all the points in the flattened point cloud list {R.sub.e} into the empty to-be-flattened point cloud list {A.sub.e}, by the pushing unit, such that the flattened point cloud list {R.sub.e} is emptied:

    [0179] S22: selecting one point from the to-be-flattened point cloud list {A.sub.e} as a current to-be-flattened point {Ae} and searching for all neighboring points {N.sub.e} of the current to-be-flattened point P.sub.e under a set condition, by the selection unit:

    [0180] S23: selecting non-flattened neighboring points N.sub.e(i) meeting an action condition from the neighboring points {N.sub.e}, performing a flattening action on the non-flattened neighboring points N.sub.e(i) meeting the action condition, then pushing all flattened neighboring points N.sub.e(i) into the flattened point cloud list {R.sub.e} and the to-be-flattened point cloud list {A.sub.e}, by the flattening action unit:

    [0181] S24: marking the current to-be-flattened point P.sub.e as a flattened point and eliminating the flattened point from the to-be-flattened point cloud list {A.sub.e}, by the elimination unit: and

    [0182] S25: selecting another point from the to-be-flattened point cloud list {A.sub.e} as a new to-be-flattened point P.sub.e, repeating S22-S24 by the circulation unit until the to-be-flattened point cloud list {A.sub.e} is emptied, such that the new flattened point cloud list {R.sub.e} representing the planar nail point cloud Cloud.sub.Nail-p is obtained.

    [0183] S23 specifically comprises: in the flattening action unit, flattening all the non-flattened neighboring points N.sub.e(i) among the neighboring points {N.sub.e} into a set plane, wherein the current to-be-flattened point {A.sub.e} preferably also falls within the set plane; then, pushing all the flattened neighboring points {N.sub.e} into the to-be-flattened point list {A.sub.e} to be used as a new current to-be-flattened point P.sub.e in next time of flattening. The neighboring points N.sub.e(i) can be flattened in many forms. For example, the neighboring points N.sub.e(i) can be flattened by equal arc lengths or by projection. Flattening by projection means that the neighboring points N.sub.e(i) are orthographically projected on a set plane, and projection points on the set plane are used as flattened neighboring points N.sub.e(i). In some examples of Embodiment 3, the neighboring points Ne(i) are flattened by equal arc lengths. Specifically, the relative position {right arrow over (v)} and distance d from each non-flattened neighboring point N.sub.e(i) to the current to-be-flattened point Pe are calculated, and then each neighboring point N.sub.e(i) is projected onto the set plane by calculation. according to the following formulas:

    [00001] v .fwdarw. = ( Ne x - P x Ne y - P y ) ( I ) d = ( Ne x - P x ) 2 + ( Ne y - P y ) 2 ( II ) N e ( i ) = N e ( i ) + d .Math. v .fwdarw. ( III )

    [0184] Ne.sub.x is an x-axis coordinate of the neighboring point N.sub.e(i) in the coordinate system in the point cloud library;

    [0185] Ne.sub.y is a y-axis coordinate of the neighboring point N.sub.e(i) in the coordinate system

    [0186] in the point cloud library;

    [0187] P.sub.x is an x-axis coordinate of the current to-be-flattened point P.sub.e in the coordinate system in the point cloud library;

    [0188] P.sub.y is a y-axis coordinate of the current to-be-flattened point P.sub.e in the coordinate system in the point cloud library.

    [0189] From the aspect of algorithm flow, the specific process of the step of point cloud flattening is as follows:

    [0190] Input: [0191] Input the curved nail surface point cloud Cloud.sub.Nail-s [0192] Input the current to-be-flattened point P.sub.e

    [0193] Output: [0194] Output the flattened point cloud list {R.sub.e}

    [0195] Initialize: [0196] Initialize the flattened point cloud list {R.sub.e} [0197] Initialize the to-be-flattened point list {A.sub.e}, push all points in the flattened point cloud list {R.sub.e} into the to-be-flattened point cloud list {A.sub.e} to empty the flattened point cloud list {R.sub.e}, {A.sub.e}?{R.sub.e}

    [0198] Algorithm loop: [0199] As long as the to-be-flattened point cloud list {.sub.e} is not empty, [0200] Select one point from the to-be-flattened point cloud list {A.sub.e} as the current to-be-flattened point P.sub.e, and [0201] Quickly search out N neighboring points {N.sub.e} closest to the current to-be-flattened point Pe by Octree [0202] For each non-flattened neighboring point N.sub.e(i) among all the neighboring points {N.sub.e}, calculate:

    [00002] N e ( i ) = N e ( i ) + d ? v .fwdarw.

    [0203] d.sub.i is the relative distance from the neighboring point N.sub.e(i) to the current to-be-flattened point P.sub.e [0204] {right arrow over (v)}.sub.I is the relative position from the neighboring point N.sub.e(i) to the current to-be-flattened point .sub.Pe [0205] Calculate the position of the flattened neighboring point N.sub.e(i) based on the above data, and perform the flattening action [0206] Traverse all non-flattened neighboring points N.sub.g(i), which fall within the set plane after being flattened, around the current to-be-flattened point P.sub.e, add the flattened neighboring point N.sub.e(i) into the flattened point list {R.sub.e} and the to-be-flattened point list {A.sub.e}, {R.sub.e}?{R.sub.e}U{N.sub.e} {A.sub.e}?{A.sub.e}U{N.sub.e}

    [0207] Mark the current to-be-flattened point P.sub.e as a flattened point, and eliminate the flattened point from the to-be-flattened point list {A.sub.e}, {A.sub.e}?{A.sub.e}\P.sub.e [0208] Select another point from the to-be-flattened point list {A.sub.e} as a new current to-be-flattened point P.sub.2, repeat the above process until the to-be-flattened point list {A.sub.e} is emptied, and output a new flattened point list {R.sub.e} representing the planar nail point cloud Cloud.sub.Nail-s

    [0209] In Embodiment 3, with the current to-be-flattened point P.sub.e as a central point, 6 neighboring points {N.sub.e} closest to the current to-be-flattened point P.sub.e are searched out and flattened respectively.

    [0210] Point clouds on the outermost circle, representing the contour, of the extracted curved nail surface point cloud Cloud.sub.Nail-s are approximately located in a same plane, and the plane is set as a contour plane. The set plane is parallel to the contour plane or coincides with the contour plane.

    [0211] The position of the set plane is flexible, and the set plane may be located in the contour plane, in the middle section of the curved nail surface point cloud CloudNuil-s, or above the nail surface point cloud Cloud.sub.Nail-s. In a case where the set plane is located in the middle section of the curved nail surface point cloud Cloud.sub.Nail-s, points in the curved nail surface point cloud Cloud.sub.Nail-s are distributed on two sides of the set plane. In a case where the set plane is located above the curved nail surface point cloud Cloud.sub.Nail-s, points in the curved nail surface point cloud Cloud.sub.Nail-s are all distributed on one side of the set plane, and points, representing the contour, in the curved nail surface point cloud Cloud.sub.Nail-s are farther away from the set plane.

    [0212] In Embodiment 3, the set plane is a plane with a highest point in the curved nail surface point cloud Cloud.sub.Nail-s among multiple planes parallel to the contour plane, and the highest point in the curved nail surface point cloud Cloud.sub.Nail-s is one or more points, having a maximum vertical distance to the contour plane, in the curved nail surface point cloud Cloud.sub.Nail-s.

    [0213] Preferably, the set plane is a plane with the first current to-be-flattened point P.sub.e selected in S22 among multiple planes parallel to the contour plane. In this way, the flattening process can be simplified, and the cycle number is reduced.

    [0214] In Embodiment 3, in the first cycle, the highest point in the in the curved nail surface point cloud Cloud.sub.Nail-s is selected as the current to-be-flattened point Pe, then the curved nail surface point cloud Cloud.sub.Nail-s is gradually flattened outwards with the highest point in the curved nail surface point cloud Cloud.sub.Nail-s as a flattening point, and there are a few errors between the planar surface of the planar nail surface point cloud Cloud.sub.Nail-p obtained after flattening and the curved surface of the curved nail surface point cloud Cloud.sub.Nail-s, such that the obtained planar nail surface point cloud Cloud.sub.Nail-p better fits the surface of the target nail.

    [0215] Preferably, in S1, after the curved nail surface point cloud Cloud.sub.Nail-s is acquired and before the curved nail surface point cloud Cloud.sub.Nail-s is converted into the flattened point list {R.sub.e}, the position of the curved nail surface point cloud Cloud.sub.Nail-s is corrected to facilitate subsequent calculation. In this case, SI specifically comprises:

    [0216] SI: acquiring, by the point cloud acquisition module, the curved nail surface point cloud Cloud.sub.Nail-s output by the segmentation growing device in the step of point cloud extraction, placing points in the curved nail surface point cloud Cloud.sub.Nail-s in an orthogonally aligned manner, then converting the curved nail surface point cloud Cloud.sub.Nail-s into the flattened point list {Re}, and outputting the flattened point list {R.sub.e}.

    [0217] The specific method for correcting the curved nail surface point cloud Cloud.sub.Nail-s in this embodiment is the same as the method used in the step of point cloud correction in Embodiment 1. In this embodiment, the pose and position of the curved nail surface point cloud Cloud.sub.Nail-s are transformed to ensure that the centroid of the corrected curved nail surface point cloud Cloud.sub.Nail-s coincides with the origin of the coordinate system in the point cloud library, wherein a front end of the nail points to a forward direction of an x-axis of the coordinate system, a left side of the nail points to a forward direction of a y-axis of the coordinate system, and a back of the nail points to a negative direction of a z-axis of the coordinate system.

    EMBODIMENT 4

    [0218] Embodiment 4 of the application provides a manufacturing system for a personalized nail tip, which is designed and implemented based on the nail shape extraction system and method based on point clouds designed in any one of Embodiments 1-3. The actual process or structure of the manufacturing system is similar to that of the nail shape extraction system and method based on point clouds, and also has some differences from that of the nail shape extraction system and method based on point clouds, and these differences will be emphatically described below. Other details that are not described can be considered as the same as those in Embodiments 1-3, and will not be repeated anymore.

    [0219] In Embodiment 4, as shown in FIG. 10, the manufacturing system for a personalized nail comprises a nail shape extension sub-system, the nail shape extraction system based on point clouds in any one of Embodiments 1-3, a parameter generation sub-system, and a product processing sub-system, wherein the nail shape extension sub-system, the nail shape extraction system, the parameter generation sub-system and the product processing sub-system are connected in sequence.

    [0220] Specifically, the connection relation and function of the manufacturing system for a personalized nail are as follows:

    [0221] The nail shape extension sub-system is configured to extract a 3D shape of a finger with a nail of a user, then measure 3D shape data of the finger, and transmit a measurement result to the nail shape extraction system:

    [0222] The nail shape extraction system based on point clouds is configured to convert the 3D shape data of the finger output by the nail shape extension sub-system into a 3D point cloud, extract a curved nail point cloud from the 3D point cloud, flatten the curved nail point cloud into a planar point cloud, extract a nail point cloud representing a contour from the planar point cloud, and then transmit the nail point cloud representing the contour to the parameter generation sub-system in the form of 2D shape data;

    [0223] The parameter generation sub-system is configured to combine the 2D shape data of the planar nail contour output by the nail shape extraction system based on point clouds and parameters of a personalized nail tip selected by a customer to generate a 2D digital model of the personalized nail tip, convert the generated 2D digital model into processing parameters, and transmit the processing parameters to the product processing sub-system;

    [0224] The product processing sub-system is configured to process a to-be-processed material into the personalized nail tip according to the processing parameters output by the parameter generation sub-system.

    [0225] Embodiment 4 of the application further provides a nail tip. As shown in FIG. 11, the nail tip is a personalized nail tip which is manufactured through the manufacturing system for a personalized nail tip in this embodiment. Although the manufactured nail tip is planar, it can perfectly fit the curved surface and contour of the nail of a target finger and thus can well fit the nail.