Method and system for extracting nail contour
Patent Information
- Application Number
- JP2023552543
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-03-24
- Filing Date
- 2021-04-28
- Publication Date
- 2025-03-06
- Estimated Expiration
- 2041-04-28
AI Technical Summary
【0024】 従来技術と比べて、本考案は次の有益な効果を有する。
Smart Images

Figure 0007641048000012 
Figure 0007641048000014 
Figure 0007641048000015
Abstract
Description
[Technical field]
[0001] The present application relates to the field of image processing, and more particularly to a method and system for extracting a nail contour based on a three-dimensional point cloud result. [Background technology]
[0002] In recent years, as people have become more interested in the beauty of their nails, a convenient nail art product called nail tips has appeared on the market. Nail tips are molded tips that can be directly attached to the nails using an adhesive layer. Compared with traditional nail art using nail polish, nail tips have the advantages of being easy to handle, inexpensive, and can be used anytime and anywhere, and are becoming more and more popular among people who like fashion and style.
[0003] Generally, nail tips are shipped with a fixed shape. In addition, for the aesthetics of the product, the peripheral contour generally has a perfect edge radius under a flat state. However, the fixed perfect edge radius does not fit the actual nail contour of the user and cannot be fully adapted to various nail shapes of users, so there are problems with the nail tips being incompletely attached or sticking out when attached to the user's nail.
[0004] Currently, the main solution to this problem is to extract the user's nail contour using image recognition. For example, Patent Document 1 discloses a printing method for a nail art device, in which a photographing device photographs a user's finger, and a control module determines the position, shape and size of the nail based on the video or photo of the user's finger photographed by the photographing device, and recognizes the nail contour.
[0005] However, the printing method of this nail art device extracts two-dimensional data of a two-dimensional image, which does not perfectly fit the three-dimensional nail shape having arcs, and the extracted nail contour does not fit the true nail contour. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] China Patent Application Publication No. 109770520 Summary of the Invention [Problem to be solved by the invention]
[0007] In order to solve the above technical problems, there is an urgent need for a new nail contour extraction method that can extract a three-dimensional nail contour having a radius that better fits the periphery of a user's nail. [Means for solving the problem]
[0008] As a first aspect, the present application provides a method for extracting a nail contour, comprising the steps of: A three-dimensional scan is performed on the target finger, and the three-dimensional data of the target finger is obtained. Finger Acquire the finger 3D data Finger At least, all the nails' 3D data Nail A data collection step including: Finger 3D Data Finger Convert it into 3D point cloud data and save it as Finger Point Cloud Finger Get the finger point cloud Finger is at least the nail surface point cloud Cloud of all nails Nail-s A data point cloud processing step including: Finger point cloud Finger The finger point cloud Cloud Finger From the nail curved point cloud Nail-s A nail point cloud acquisition process for acquiring a nail point cloud; Claw curved point cloud Nail-s of No change in surface area Then, the nail plane point cloud Cloud Nail-p A nail point cloud flattening process to obtain a nail point cloud; Nail plane point cloud Nail-p Based on the contour, the contour point cloudContour and a nail contour rendering step of rendering the shape of the nail to obtain a nail plate mold of the nail.
[0009] Further, preferably, the data point cloud processing step comprises: Finger point cloud Finger The orientation and position of the output finger point cloud are set to the preset orientation and position. Finger-o A point cloud orientation correction sub-step is further included, The preset posture and position are the output finger point cloud Cloud Finger-o This means that the center of mass of the finger overlaps with the origin of the coordinate system in the PCL point cloud library, the tip of the finger points in the positive direction of the x-axis in the coordinate system, and the back of the finger points in the negative direction of the z-axis in the coordinate system.
[0010] Furthermore, preferably, after the point cloud orientation correction sub-step, the data point cloud processing step further comprises: Check whether the back of the finger in the transformed finger point cloud points in the negative direction of the z-axis in the coordinate system. If the back of the finger is pointing in the positive direction of the z-axis in the coordinate system, the converted finger points are rotated 180 degrees around the x-axis and then output as the finger point cloud. Finger-o year, If the back of the finger is pointing in the negative direction of the z-axis in the coordinate system, the converted finger point cloud is output as is. Finger-o The method further includes a checking sub-step of:
[0011] Further, preferably, the nail point cloud acquisition step includes: Using the domain growing division method, the finger point cloud Finger Divide the finger point cloud Cloud Finger From the nail curved point cloud Nail-s The point cloud division sub-step includes:
[0012] Furthermore, preferably, after the point cloud division sub-step, the nail point cloud acquisition step includes: Search radius R rs Based on the search radius R rs A search radius smaller than R rsEnter the search radius R rs The angle θ between the normal vector of the point at ' and the neighboring point Rrs’ and the angle threshold θ thres Add 2 as a judgment condition, Search radius R rs and search radius R rs The difference in the included angle between the normal vector of the point at ' and the neighboring points is the angle threshold θ thres If it is greater than 2, the method further includes a cluster constraint sub-step of stopping the expansion.
[0013] Furthermore, preferably, before the point cloud division sub-step, the nail point cloud acquisition step includes: The method further includes a seed point S0 selection sub-step, which includes first determining and obtaining the nail plate surface area Nrange(x, y) of the nail, selecting one point within the nail plate surface area Nrange(x, y) as a seed point S0, and starting the expansion process with the seed point S0.
[0014] Furthermore, preferably, in the nail point cloud flattening process, Nail-s Divide horizontally along the x-axis into n-layer point cloud L i Then, for each layer, the point cloud L i The nail plane point cloud Cloud in the planar state is then expanded to an equal length and flattened. Nail-p Get the.
[0015] Furthermore, preferably, in the nail point cloud flattening step, specifically, Point cloud L for each layer i For each point p in j The x-axis coordinate value of each point is unified, and the y-axis and z-axis coordinate values are kept unchanged, resulting in a roughly circular arc-shaped point cloud set stand_L i and Point cloud set for each layer stand_L i All points p in the center of the nail are expressed as y coordinates. y Divide it into two parts according to L_part1 i , L_part2 i And, Circular arc point group L_part1 i, L_part2 i Arrange them in order from near to far along the center line of the nail, and use L_ordered_part i and obtaining the
[0016] Furthermore, preferably, after the nail point cloud flattening process, Obtained nail plane point cloud Nail-p The method further includes an edge processing step of processing the edge of the image to smooth the edges.
[0017] As a second aspect, the present application further provides a nail contour extraction system. The extraction system is used to realize the nail contour extraction method in any of the above-mentioned technical solutions. Specifically, the nail contour extraction system includes: A three-dimensional scan is performed on the target finger, and the three-dimensional data of the target finger is obtained. Finger Acquire the finger 3D data Finger At least, all the nails' 3D data Nail a data collection device including: A data conversion device is communicatively connected to the data collection device, and the data conversion device converts the finger three-dimensional data Data Finger The finger point cloud is received and converted into 3D point cloud data. Finger Get the finger point cloud Finger is at least the nail surface point cloud Cloud of all nails Nail-s A data conversion device including: A PCL point cloud library in communication with the data conversion device; A segmentation module in the PCL Point Cloud Library, the segmentation module comprising: Finger The finger point cloud Cloud Finger From the nail curved surface point cloud Cloud Nail-s A segmentation module configured to extract A flattening module is in communication with the PCL point cloud library, and the flattening module is a nail curved surface point cloud cloud. Nail-s of No change in surface area Then, expand and flatten the nail plane point cloud CloudNail-p a flattening module configured to obtain A rendering module is in communication with the flattening module, the rendering module is configured to generate a nail plane point cloud Cloud Nail-p Receive the nail plane point cloud Cloud Nail-p Contour point cloud Contour and a rendering module for performing rendering based on the shape of the nail to obtain a nail plate impression of the nail.
[0018] Further, preferably, the data conversion device includes a correction module, and the correction module is Finger The orientation and position of the output finger point cloud are set to the preset orientation and position. Finger-o It is configured so that it can be converted to
[0019] Further, preferably, the nail contour extraction system comprises: A checking module, communicatively connected with the correction module, configured to receive and check the direction of the back of the finger in the transformed finger point cloud; If the back of the finger in the transformed finger point cloud points in the positive direction of the z-axis in the coordinate system, the finger point cloud is rotated 180 degrees around the x-axis using the correction module before being output as the finger point cloud Cloud. Finger-o year, If the back of the finger in the transformed finger point cloud points in the negative direction of the z-axis in the coordinate system, the transformed finger point cloud is output as is. Finger-o The method further includes a check module.
[0020] Further, preferably, the nail contour extraction system further includes a seed point S0 selection module, which is configured to select a nail curved surface point cloud Cloud Nail-s Obtain the above nail plate surface area Nrange(x, y), and select a point in the nail plate surface area Nrange(x, y) as a seed point S0, and the segmentation module starts the expansion process with the seed point S0.
[0021] Further, preferably, the segmentation module is Nail-s Divide horizontally along the x-axis into n-layer point cloud L i Then, for each layer, the point cloud L i The nail plane point cloud Cloud in the planar state is then expanded to an equal length and flattened. Nail-p It is configured to be able to obtain.
[0022] Further, preferably, the planarization module calculates the point cloud L of each layer. i For each point p in j The x-axis coordinate value of each point is unified, and the y-axis and z-axis coordinate values are kept unchanged, resulting in a roughly circular arc-shaped point cloud set stand_L i Then, the point cloud set stand_L for each layer is obtained. i All points p in the center of the nail are expressed as y coordinates. y Divide it into two parts according to L_part1 i , L_part2 i Finally, the circular arc point group L_part1 i , L_part2 i Arrange them in order from near to far along the center line of the nail, and use L_ordered_part i The present invention is configured to be able to obtain
[0023] Further, preferably, the PCL point cloud library comprises: Obtained nail plane point cloud Nail-p The image processing device further includes an edge processing module for processing the image to smooth the edges. Effect of the Invention
[0024] Compared with the prior art, the present invention has the following beneficial effects:
[0025] First, the present invention obtains the nail point cloud having radians by the 3D point cloud, and then flattens it. After flattening, the outline point cloud shape of the nail point cloud is more closely matched with the outline of the nail having radians.
[0026] Secondly, the present invention transfers the transformed finger points onto a desired pose and position, which makes the calculation and processing of the finger points much more convenient.
[0027] Third, the present invention adds a cluster constraint to precisely calculate whether a point in the finger point cloud belongs to the nail point cloud, thereby more effectively separating the nail surface point cloud from the finger point cloud.
[0028] Fourth, the present invention first determines the nail plate area, and then selects a point in the nail plate area as a seed point to start the expansion process, thereby ensuring that what is obtained in the expansion process is the nail surface point. Since the expansion process is only performed once, the time required for the expansion algorithm is reduced and the efficiency of the algorithm is improved.
[0029] Fifth, in the present invention, the nail is divided into layers along the nail growth direction, and each layer is flattened, so that the nail plane point cloud is flattened in the width direction. The shape contour obtained by rendering based on the contour point cloud of the nail plane point cloud can fit the nail better in terms of the side dimensions.
[0030] Sixthly, the present invention improves the aesthetics of the resulting nail plate mold by smoothing edges through edge processing of the acquired nail plane point cloud. [Brief description of the drawings]
[0031] [Figure 1] 3A to 3C are conceptual diagrams showing steps of a nail contour extraction method according to the first embodiment. [Diagram 2] FIG. 1 is a block diagram of a nail contour extraction system according to a first embodiment. [Diagram 3] FIG. 4 is a conceptual diagram of a process of the nail contour extraction method according to the first embodiment (point cloud division sub-process). [Figure 4] FIG. 11 is a conceptual diagram of a process of a nail contour extraction method according to the second embodiment (point cloud direction correction sub-process). [Diagram 5] FIG. 11 is a block diagram of a nail contour extraction system according to a second embodiment (correction module). [Figure 6] FIG. 11 is a conceptual diagram of a process of a nail contour extraction method according to the second embodiment (check sub-process). [Figure 7] FIG. 11 is a block diagram of a nail contour extraction system according to a second embodiment (check module). [Figure 8] This is a conceptual diagram of normals of a group of nearby points within a search radius Rrs. [Figure 9a] The finger point cloud segmentation result based on the search radius Rrs. [Figure 9b] The finger point cloud segmentation results based on the reduced search radius Rrs. [Figure 10] 13A to 13C are conceptual diagrams showing steps of a nail contour extraction method according to a third embodiment. [Figure 11] FIG. 13 is a conceptual diagram of normals of a group of neighboring points within a search radius Rrs′ in the third embodiment. [Figure 12] 13 shows the division result of the finger points within a search radius Rrs′ in the third embodiment. [Figure 13] FIG. 13 is a process conceptual diagram of the nail contour extraction method according to the third embodiment (seed point S0 selection sub-process). [Figure 14] FIG. 13 is a block diagram of a nail contour extraction system according to a third embodiment (selection sub-module). [Figure 15] FIG. 13 is a conceptual diagram of the structure under the nail plate area in the third embodiment. [Figure 16] FIG. 13 is a conceptual structural diagram in which the nail curved surface point cloud in the fourth embodiment is divided into layers along the nail growth direction. [Figure 17] FIG. 13 is a conceptual structural diagram in which points on a point cloud in each layer in the fourth embodiment are unified under the same plane. [Figure 18] FIG. 13 is a conceptual diagram of a structure in which a group of points unified under the same plane in the fourth embodiment is flattened. [Figure 19] 13A to 13C are conceptual diagrams showing steps of a nail contour extraction method according to a fifth embodiment. [Figure 20] FIG. 13 is a block diagram of a nail contour extraction system according to a fifth embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0032] The technical solutions in the embodiments of the present application will be described below with reference to the drawings.
[0033] It should be understood that the specific examples in this specification are merely intended to enable those skilled in the art to better understand the embodiments of the present application, and are not intended to limit the scope of the embodiments of the present application.
[0034] In addition, in various embodiments of the present application, the size of the numbers of each step does not mean the order of execution, and the execution order of each step should be determined by its function and internal logic, and it should be understood that this does not constitute any limitation on the steps performed by the embodiments of the present application.
[0035] Furthermore, the various embodiments described in this specification can be implemented alone or in combination, and the embodiments of the present application are not limited thereto.
[0036] Unless otherwise stated, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by those skilled in the art. The terms used in this application are only used for the purpose of describing specific embodiments and are not intended to limit the scope of this application. The term "and / or" used in this application includes any and all combinations of one or more of the associated listed items.
[0037] First embodiment The first embodiment of the present application provides a method for extracting a nail contour, which particularly relates to a method for extracting a nail contour based on a result of a three-dimensional point cloud.
[0038] Specifically, referring to FIG. 1, the nail contour extraction method in the first embodiment includes the following steps: A three-dimensional scan is performed on the target finger, and the three-dimensional data of the target finger is obtained. Finger Acquire the finger 3D data Finger At least, all the nails' 3D data Nail A data collection step including: Finger 3D Data FingerConvert it into 3D point cloud data and save it as Finger Point Cloud Finger Get the finger point cloud Finger is at least the nail surface point cloud Cloud of all nails Nail-s A data point cloud processing step including: Finger point cloud Finger Divide the finger point cloud Cloud Finger Surface point cloud from the claw Nail-s A nail point cloud acquisition process for acquiring a nail point cloud; Claw curved point cloud Nail-s of No change in surface area Then, the nail plane point cloud Cloud Nail-p A nail point cloud flattening process to obtain a nail point cloud; Nail plane point cloud Nail-p Based on the contour, the contour point cloud Contour and a nail contour rendering step of rendering the shape of the nail to obtain a nail plate mold of the nail.
[0039] Compared with the conventional technology, the nail contour extraction method provided in the first embodiment obtains a nail curved surface point cloud Cloud of a nail having a non-flat surface and a radian. Nail-s The nail plane point cloud Cloud formed by flattening Nail-p The flattened nail plane point cloud Cloud Nail-p Outer contour point cloud of Contour The shape of the claw fits more closely to the outer peripheral contour of the claw having a radius.
[0040] In this way, the flattened nail plane point cloud Cloud Nail-p Outer contour point cloud of Contour Based on the shape of the nail, a planar nail mold is obtained by rendering. The nail tip manufactured using the nail mold as a mold can conform to the surface curvature of the nail, and when the nail tip is applied to the surface of the user's nail, the outer circumferential contour of the nail tip coincides with the outer circumferential contour of the nail, and the application is not incomplete or protruding.
[0041] In other words, the method of extracting the nail contour provided by the first embodiment acquires a three-dimensional image of the nail surface, processes it into a point cloud, and then extracts the point cloud of the nail curved surface Cloud Nail-s Divide and flatten the nail plane point cloud Cloud Nail-p Then, the nail plane point cloud Cloud Nail-p Based on the outer contour of the contour point cloud Contour The shape of the nail plate mold is rendered to obtain a flat nail plate mold. Compared with the prior art which uses a two-dimensional image to obtain a nail plate mold, the peripheral contour shape of the nail contour extracted in the first embodiment is completely consistent with the peripheral contour of the user's nail, and the nail tip manufactured by rendering the nail plate mold based on this can be perfectly attached to the user's nail without incomplete attachment or protruding.
[0042] Please refer to Fig. 2. The first embodiment further provides a nail contour extraction system. The nail contour extraction system can obtain the nail contour by using the above-mentioned nail contour extraction method. Specifically, the nail contour extraction system includes a data collection device 1, a data conversion device 2, a PCL 3, a flattening module 5 and a rendering module 6, which are connected in communication with each other in sequence, and the PCL 3 includes a segmentation module 4.
[0043] Specifically, as shown in FIG. 1 and FIG. 2, during the data collection process, a data collection device 1 is used to perform three-dimensional scanning of the target finger, and three-dimensional finger data Data Finger In order to extract the nail contour of the target finger, the data collection device 1 includes at least the entire nail of the target finger and the skin around the nail in the three-dimensional scanning range of the target finger in the data collection step. This results in the acquisition of three-dimensional finger data Data Finger At least the entire nail 3D data Data Nail This usually includes three-dimensional data of the skin around the nail. Skin At least
[0044] The data collection device 1 may use a laser radar or a depth camera, or may be a three-dimensional scanner, structured illumination camera, or twin-lens camera that mainly uses a laser radar or a depth camera. Thus, in the data collection process, the data collection device 1 can use the triangulation principle, the TOF principle, etc. to make the radar perform three-dimensional scanning of the target finger, and can also use the structured illumination principle, the binocular visual distance principle, and the TOF distance principle to make the depth camera perform three-dimensional scanning of the target finger, thereby quickly and accurately collecting three-dimensional finger data. Finger can be obtained.
[0045] The three-dimensional scanning ranging principles such as the triangulation principle, TOF ranging principle, structured illumination ranging principle, and binocular visual ranging principle mentioned above are all conventional technologies and are widely used in daily life, so the principles will not be described in detail here.
[0046] In addition, the triangulation principle, TOF principle, structured illumination principle, binocular visual ranging principle, etc. each have their own advantages and disadvantages in actual applications, and the requirements for the measurement environment, optical fiber, distance, etc., as well as the actual measurement accuracy and product cost, are different for each principle. Therefore, in the actual application of this embodiment, a selection must be made based on the actual type of data collection device 1.
[0047] Specifically, as shown in FIG. 1 and FIG. 2, during the data point cloud processing step, the data conversion device 2 converts the finger three-dimensional data Data Finger After receiving the finger 3D data Finger This is converted into 3D point cloud data in PCD format, and the finger point cloud Cloud Finger Specifically, the data conversion device 2 acquires the finger three-dimensional data Data Finger The data is converted into a data format supported by the PCL point cloud library 3. The format is, for example, PCD, PLY, etc., and the actual format is selected based on the data format collected by the data collection device 1 and the data format supported by the segmentation module 4.Finger The data includes three-dimensional data of the nail. Nail and 3D data of the skin around the nail Skin Since at least one of the three-dimensional data is included, Finger Point Cloud Cloud after converting the format to a data format supported by the PCL Point Cloud Library 3, such as PCD format Finger is a point cloud of a nail curved surface of a nail with a non-flat surface and a curvature degree. Nail-s And the skin point cloud of the skin around the nail Skin At least one of the following is included:
[0048] Of course, in the case of other device examples according to the first embodiment, if the data collection device 1 is equipped with a data conversion function, the data collection device 1 can be made to double as the data conversion device 2 in the data point cloud processing step, and the collected finger three-dimensional data Data Finger By directly converting the data format of the point cloud to PCD format, Finger may be obtained.
[0049] PCL (Point Cloud Library) 3 is a cross-platform, large-scale open source library written in C++ that was built based on previous research on point clouds. Finger For example, when converting the format to PCD format, the PCD format data is a format supported by the PCL Point Cloud Library 3, and the finger 3D data Data Finger Finger point cloud after conversion to PCD format Finger When you input the above into PCL Point Cloud Library 3, the corresponding algorithm in PCL Point Cloud Library 3 is used to create the finger point cloud. Finger The following processing can be performed on the
[0050] First acquired 3D finger data Finger The data includes three-dimensional data of the entire nail. Nail and 3D data of the skin around the nail Skin Since it contains the finger 3D data DataFinger The point cloud is processed and further converted to obtain the point cloud. Finger The nail surface point cloud Cloud Nail-s and skin point cloud of the skin around the nail Skin In the extraction of the nail contour, the nail curved surface point cloud Cloud Nail-s and skin point cloud Skin The required nail surface point cloud Cloud is obtained by separating Nail-s needs to be extracted.
[0051] Based on this, as shown in FIG. 3, the nail point cloud acquisition step specifically includes a point cloud division sub-step. In the point cloud division sub-step, a finger point cloud Cloud is divided into two parts by using a division module 4 in the PCL point cloud library 3. Finger Divide the finger point cloud Cloud Finger Point Cloud of Curved Surface of Nail Nail-s and skin point cloud Skin is divided into a claw surface point cloud Cloud Nail-s Extract.
[0052] In more detail, as shown in FIG. 2 and FIG. 3, in the point cloud division sub-step in the first embodiment, a region growing-segmentation method is used to divide the finger point cloud Cloud. Finger The specific division method is as follows: input: ● Input point group {P} ● Search radius R rs Enter Curvature threshold cur thres , angle threshold θ thres Enter output: Output area cluster list R after point cloud division Initialization: ● Initialize the area cluster list R Initialize a point list {A} and push all points in the point cloud onto the list {A}. Calculate the normal vector {N} for each point in the input point cloud. Calculate the curvature {c} of each point in the input point cloud Algorithm Loop: Unless list {A} is empty: ◆Current Area List {R c} and the current seed list {S c Clear} ◆ Current curvature minimum point P in list {A} min and find its minimum curvature point P min Remove from list {A} {A} ← {A} \P min ◆ At the same time, the previously mentioned minimum curvature point P removed from list {A} min Now Area List {R c} and the current seed list {S c} {S c}←{S c}∪P min , {R c}←{R c}∪P min ◆Current Seed List c For each point in {S c For (i)}, loop: ■ Using kd tree, we can find points {S c (i)} all neighboring points {Nb c Quickly search for ■{Nb c} for each point {Nb c For (j)}, loop: List {Nb c} satisfying the condition {Nb c (j)}, and check whether point {S c (i)} and the current neighboring point {Nb c (j)}, the included angle of the normal vector is within the angle threshold θ thres If it is smaller than cos -1 (S c (i) Nb c (j)≦θ thres ), then: ■Points satisfying the condition {Nb c (j)} is currently listed in the area list {R c}, plus {R c}←{R c}∪Nb c (j) The points that satisfy the condition {Nb c (j)} from list {A} {A}←{A}∪Nb c (j) ■Points satisfying the condition {Nb c (j)}'s curvature is the curvature threshold cur thres If it is smaller than the point {Nb c (j)} is currently in the seed list {S c} {S c}←{S c}∪Nb c (j) ◆ The divided and output area cluster list R is added to the current area list {R c Add} {R}←{R}∪R c
[0053] In this way, the finger point cloud Finger Divide the skin point cloud Skin Then, the nail surface point cloud Cloud Nail-s can be expanded and extracted.
[0054] Specifically, as shown in FIG. 1 and FIG. 2, during the nail point cloud flattening process, the flattening module 5 connected to the division module 4 is used to convert the nail curved surface point cloud Cloud acquired by the data conversion device 2 in the nail point cloud acquisition process. Nail-s of No change in surface area By expanding and flattening the nail plane point cloud Cloud Nail-p Get the.
[0055] Finally, during the nail contour rendering process, the nail plane point cloud Cloud is generated using the rendering module 6 in communication with the flattening module 5. Nail-p After receiving the nail plane point cloud Cloud Nail-p Contour point cloud ContourThe shape of the nail is rendered to obtain a nail plate mold of the nail.
[0056] In subsequent manufacturing, the edge contour point cloud Cloud in the above-mentioned method and system Contour The edge contour of the nail obtained by rendering based on the shape of the nail can later be used to create a mold for a nail tip based on the shape of the edge contour, and can be used as a basis for manufacturing nail tips and researching nail shapes.
[0057] It should be noted that the nails referred to in this application may be fingernails or toenails.
[0058] Second embodiment The second embodiment of the present application provides a nail contour extraction method and system. The extraction method and system are both based on the design and implementation of the nail contour extraction method and system in the first embodiment, and although the actual process or structure is similar, there are some differences, and the following description will focus on the differences. The detailed description other than the differences can be regarded as the same as in the first embodiment, and will not be described in detail.
[0059] The PCL Point Cloud Library 3 utilizes a visualization window to plot a coordinate system (x, y, z), which specifies the location of the point cloud in the three-dimensional world. With reference to Figures 4 and 5, in the second embodiment, the following finger point cloud Cloud Finger In order to facilitate the processing of the finger point cloud and obtain accurate and efficient processing results, the data point cloud processing step includes a point cloud direction correction sub-step, and the nail contour extraction system further includes a correction module 7. In the point cloud direction correction sub-step, the correction module 7 is used to convert and obtain the finger point cloud Cloud obtained by the data conversion device 2 in the data point cloud processing step. Finger The posture and position of the finger are converted and the output finger point cloud Cloud Finger-o Get the output point cloud Cloud Finger-o The attitude and position of the robot is transformed onto a desired preset attitude and position.
[0060] The correction module 7 may be provided independently and communicatively connected to the data conversion device 2 , or may be integrated within the data conversion device 2 or may be part of the data conversion device 2 .
[0061] Specifically, the desired preset orientation and position are stored in the finger point cloud Cloud Finger By changing the output point cloud Finger-o The center of mass of the finger is overlapped with the origin of the coordinate system in the PCL Point Cloud Library 3, and the tip of the finger points in the positive direction of the x-axis in the coordinate system, and the back of the finger points in the negative direction of the z-axis in the coordinate system.
[0062] More specifically, the tip of the finger refers to the end closest to the nail base, and the direction in which the tip of the finger points is the direction in which the nail grows, and the back of the finger refers to the side of the finger where the nail grows, and the direction in which the back of the finger points is from the pad of the finger towards the nail.
[0063] Based on this requirement, first, in the data point cloud processing process, the finger 3D data Data Finger By converting the finger point cloud Finger (hereinafter also referred to as the input finger point cloud) is acquired, the point cloud direction correction sub-process is performed, and the input finger point cloud Cloud Finger The posture and position of the finger are converted, and the finger point cloud Cloud at the desired posture and position is created. Finger-o (Hereinafter, we will refer to this as the output finger point group)
[0064] In this embodiment, the correction module 7 in the point cloud direction correction sub-step performs the rotation matrix of tf to rotate the input finger point cloud Cloud Finger The posture and position of the input finger point cloud Cloud Finger Output Finger Point Cloud Finger-o The specific official steps for conversion are as follows:
[0065]
number
[0066]
number
[0067] This allows the output point cloud Cloud obtained after rotation transformation with tf Finger-o The output finger point cloud Cloud matches the preset pose and position. Finger-o The output point cloud that follows is Finger-o This can provide good preconditions for processing on
[0068] The output finger point cloud Cloud obtained after rotation transformation using the above tf Finger-oHowever, there may be a situation where the back of the finger points in the positive direction of the z-axis in the coordinate system. Based on this, referring to Fig. 6 and Fig. 7, after the point cloud direction correction sub-step, the data point cloud processing step further includes a check sub-step, and the nail contour extraction system further includes a check module 8. In the check sub-step, the check module 8 is used to perform a check on the direction of the back of the finger in the transformed finger point cloud, and check whether it points in the negative direction of the z-axis in the coordinate system.
[0069] The check module 8 is communicatively connected to the correction module 7, and the check module 8 may be installed independently and communicatively connected to the data conversion device 2, or may be integrated within the data conversion device 2, or may be part of the data conversion device 2.
[0070] If the check module 8 confirms that the back of the finger in the transformed finger point cloud is pointing in the positive direction of the z-axis in the coordinate system, the correction module 7 rotates the transformed finger point cloud 180 degrees around the x-axis and outputs it as the output finger point cloud Cloud. Finger-o This provides the result to the subsequent output.
[0071] If the check module 8 confirms that the back of the finger in the transformed finger point cloud is pointing in the negative direction of the z-axis in the coordinate system, the transformed finger point cloud is output as is. Finger-o This provides the result to the subsequent output.
[0072] In this way, the output point cloud Finger-o It can be ensured that the back surface of the middle finger points in the negative direction of the z axis in the coordinate system.
[0073] Bounding boxes, also known as minimum bounding rectangles, are algorithms that find the optimal enclosing space of a discrete set of points. The basic idea is to approximately replace a complex geometric object with a geometric body (called a bounding box) that has a slightly larger volume and simpler characteristics. PCL Point Cloud Library 3 obtains the bounding box of a point cloud and uses the bounding box to calculate and process the data.
[0074] Specifically, the specific check steps of the above-mentioned check sub-steps are as follows.
[0075] Finger point cloud obtained after rotation transformation with tf Finger Middle: average z-coordinate TIFF0007641048000003.tif64 and the median z of the bounding box m Calculate and make a judgment.
[0076]
number
[0077]
number
[0078]
number
[0079] More specifically, if:
[0080]
number
[0081] If,
[0082]
number
[0083] Third embodiment The third embodiment of the present application provides a nail contour extraction method and system. The extraction method and system are both based on the design and implementation of the nail contour extraction method and system in the first or second embodiment, and although the actual process or structure is similar, there are some differences, and the following description will focus on the differences. The detailed description other than the differences can be regarded as the same as in the first and second embodiments, and will not be described in detail.
[0084] As shown in Figure 8, the nail surface point cloud Nail-s and skin point cloud SkinWhen the nail curved surface point cloud Cloud is separated by the point cloud division sub-step and division module 4 in the first embodiment, under the above-mentioned cluster constraint conditions, Nail-s The division and expansion of a point is performed by dividing the normal vectors at two adjacent points by the included angle Δθ and the curvature threshold cur thres Since it depends only on
[0085] In particular, the fingernail grooves are not clear, or the finger point cloud Finger If the noise in the point cloud model is significant, Finger The undulations of the point cloud in the middle are not so large. Nail-s and skin point cloud Skin When the undulations of the boundary area are relatively small, the skin point cloud Cloud Skin There is also a somewhat large error in the normals of the neighboring points in the skin point cloud. Skin The dot in the middle is incorrectly in the current seed list. c} and finally added to the area cluster list R output after division. In other words, the skin point cloud Cloud Skin The points in the nail surface point cloud are mistakenly Nail-s It will be added inside.
[0086] Specifically, as shown in Fig. 9a, the search radius R rs In this case, the skin point cloud Skin The angles θ1 and θ2 of the normal vectors of the adjacent points and the neighboring points in the thres By satisfying the condition that it is smaller than, the above-mentioned condition below is satisfied. ■Points satisfying the condition {Nb c (j)}'s curvature is the curvature threshold cur thres If it is smaller than the point {Nb c (j)} is currently in the seed list {S c} and push it to {S c}←{S c}∪Nb c (j) This causes the following operations to be performed: The divided and output area cluster list R is added to the current area list {R c}, {R}←{R}∪{R c}.
[0087] In this way, the skin point cloud Skin The point cloud in the area cluster list R is added to the nail surface point cloud Cloud in the PCL point cloud library 3. Nail-s The area of is extended to the outside of the undulations, i.e., to the skin part, which results in the situation in Figure 9a appearing, and ultimately results in failure to split the nail.
[0088] In such a situation, in some embodiments of the present invention, the search radius R rs A method for reducing the normal vector is adopted, which allows for more precise calculations and allows for more accurate calculations of the normal vectors of n points.
[0089] However, as shown in Fig. 9b, the search radius R rs Although the reduction of the normal vectors of n points helps to calculate them accurately, the finger point cloud Cloud Finger R reduces noise in the model rs The noise level increases relative to the area of the point cloud, and the error of the algorithm during area expansion in the PCL Point Cloud Library 3 increases due to the relatively increased noise, and the groove portion is inappropriately expanded, which affects the accuracy of the results.
[0090] Based on this, referring to Figs. 10 and 11, the third embodiment improves on this, and a cluster constraint sub-process is further provided after the point cloud division sub-process of the nail point cloud acquisition process, and the cluster constraint sub-process improves the accuracy of the calculation result by adding a cluster constraint condition to the division module 4.
[0091] The cluster confinement sub-step includes the following steps:
[0092] Search radius R rsBased on the search radius R rs Enter the search radius R rs ' is the search radius R rs smaller than the search radius R rs The angle θ between the normal vector of the point at ' and the neighboring point Rrs’ and the angle threshold θ thres Add 2 as a judgment condition and make a judgment. If the current point is θ Rrs -θ Rrs’ >θ thres If it is 2, stop expanding. If the current point is θ Rrs -θ Rrs’ ≦θ thres If it is 2, put the current point into the current area list {R c}. Where: θ Rrs is the search radius R rs is the angle between the normal vector of a point at and a neighboring point, θ Rrs’ is the search radius R rs ' is the angle between the normal vector of a point at and a neighboring point.
[0093] As shown in FIG. 11, for two points n1 and n2, the point n1 has Δθ1=θ1'-θ1, and Δθ1>θ thres 2, and n1 is currently in the area list {R c}, and point n2 is Δθ2=θ2'-θ2, and Δθ2≦θ thres 2, and n2 is currently the area list {R c} Where: θ1 is the search radius R rs is the angle between the normal vector of point n1 and a neighboring point, θ1' is the search radius R rs ' is the angle between the normal vector of point n1 and a neighboring point, θ2 is the search radius R rs is the angle between the normal vector of point n2 and a neighboring point, θ2' is the search radius R rs ' is the angle between the normal vector of point n2 and a neighboring point.
[0094] In this way, a cluster constraint is added, and the angle between the normal vector of the point and the current neighboring point is set to an angle threshold θ thres For points that satisfy the condition that rs Then, reduce the cluster constraints again and search radius R rs and the search radius R rs The angle between the normal vector of the neighboring point in ' is the angle threshold θ thres Only if it is smaller than 2, nail it. Surface Point Cloud Cloud Nail-s It is determined that the point is in the current area list {R c} and remove points that do not satisfy the condition to obtain the nail surface point cloud Cloud Nail-s The erroneous expansion of the finger point cloud is effectively reduced, and as shown in Figure 12, Finger Claw curved point cloud from inside Nail-s This provides a division effect in which the following is accurately extracted and divided:
[0095] Here, the search radius R rs ' is the search radius R rs Specifically, the search radius R rs ' is the search radius R rs It can be set to 1% to 80% of the search radius R rs ' is the search radius R rs In this way, the amount of work in the PCL point cloud library 3 can be increased rationally, and the finger point cloud cloud can be created under conditions where the desired division accuracy is met. Finger Then, we divide and expand the point cloud in the middle of the image, and extract a more accurate point cloud of the nail surface. Nail-s can be obtained by dividing it.
[0096] In more detail, the division module 4 executes the operations of the point cloud division sub-step and the cluster constraint sub-step described above to obtain the nail surface point cloud Cloud Nail-sWhen performing area expansion of the input finger point cloud Cloud, the point with the smallest curvature is repeatedly extracted from list {A} and set as seed point S0 to start the expansion process until the remaining points in list {A} are empty. Finger All expansions have been completed in all areas of the input point cloud Cloud Finger Surface point cloud from the claw Nail-s is obtained.
[0097] However, the division module 4 in the above process is the nail curved surface point cloud Cloud Nail-s However, the point with the smallest curvature in the list {A} is repeatedly extracted as the seed point S0 to start the expansion process. These processes result in unnecessary skin points Cloud Skin In addition, the expansion process is repeated and becomes redundant, so the nail surface point cloud Cloud Nail-s The expansion efficiency becomes extremely low.
[0098] 13 and 14, in the third embodiment, the nail point cloud acquisition step further includes a seed point S0 selection substep before the point cloud division substep, and the nail contour extraction system further includes a selection module 9 communicatively connected to the division module 4. In the seed point S0 selection substep, the selection module 9 is used to first determine and acquire the nail plate surface area Nrange(x, y), and then one point is selected from the nail plate surface area Nrange(x, y) as a seed point S0, and the division module 4 starts the expansion process with the seed point S0.
[0099] In this way, the expansion process is Nail-s The nail surface area Nrange(x, y) is started from the nail plate surface area Nrange(x, y), and the nail surface point cloud Cloud is surely expanded in only one expansion process. Nail-s This reduces the time required for the expansion algorithm and improves the efficiency of the algorithm.
[0100] More specifically, the nail plate surface area Nrange(x, y) is determined based on the output finger point group CloudFinger-o, which is perpendicular to the coordinate axis obtained after rotating and transforming the input finger point group by tf. As shown in Figure 15, the shaded area is the determined nail plate surface area Nrange(x, y), which is a rectangular range surrounded by one range value on the x axis and one range value on the y axis, and its formula is as follows: Nrange(x, y) = {x∈(x lower limit ,x upper limit ),y∈(y lower limit ,y upper limit )} Where: x min is the nail surface point cloud Cloud Nail-s is the minimum value on the x-axis of x max is the nail surface point cloud Cloud Nail-s is the maximum value on the x-axis of y min is the nail surface point cloud Cloud Nail-s is the minimum value on the y-axis of y max is the nail surface point cloud Cloud Nail-s is the maximum value on the y-axis.
[0101] This rectangular area is the nail surface point cloud Cloud Nail-s Based on this, the ratio of the widths on the x-axis and y-axis can be selected and determined, and is preferably set to be symmetric on both sides of the x-axis and the y-axis. In a preferred method of this embodiment, 1 / 2 of the y-axis width and 3 / 4 of the x-axis width of the entire nail plate surface area Nrange(x, y) are determined as the range of the rectangular nail plate surface area Nrange(x, y). That is, x lower limit =(x min ×(4-(3-a))+x max ×(3-a)) / 4 x upper limit =(x min ×(4-(3+a))+x max×(3+a)) / 4 y lower limit =(y min ×(2-(1-b))+y max ×(1-b)) / 2 y upper limit =(y min ×(2-(1+b))+y max ×(1+b) / 2, Where: a is the rectangle width radius in the x-axis direction, b is the rectangle width radius in the y-axis direction.
[0102] In this way, after the nail plate surface area Nrange(x, y) is determined, the division module 4 in the PCL point cloud library 3 separates the points of the nail plate surface area Nrange(x, y) and then arbitrarily selects one point from the separated points as a seed point S0 for the first expansion, thereby ensuring that this single expansion occurs within the nail plate surface area Nrange(x, y). Nail-s The expansion process is simple and only needs to be done once. Nail-s The expansion efficiency is greatly improved.
[0103] Fourth embodiment The fourth embodiment of the present application provides a method and system for extracting a nail contour. The extraction method and system are both based on the design and implementation of the method and system for extracting a nail contour in the first to third embodiments, and although the actual steps or structures are similar, there are some differences, and the following will focus on the differences from the first to third embodiments. Detailed explanations other than the differences can be considered to be the same as those in the first to third embodiments, and will not be described in detail.
[0104] In the nail point cloud flattening process, the nail curved surface point cloud Cloud is flattened using the flattening module 5. Nail-s of No change in surface area Flatten the nail plane point cloud Cloud Nail-p Then, the nail surface point cloud Cloud Nail-sSince has radians, the nail plane point cloud Cloud Nail-p Nail tips made using this as a mold cannot be attached perfectly to the nail.
[0105] In order to improve this point, in the nail point cloud flattening process of the fourth embodiment, as shown in FIG. 16, the nail curved surface point cloud Cloud is first flattened using a flattening module 5. Nail-s Divide horizontally along the x-axis into n-layer point cloud L i Then, for each layer, the point cloud L i The nail plane point cloud Cloud in the planar state is then flattened to have equal lengths as a whole. Nail-p Get the.
[0106] Point cloud L for each layer i For the point cloud of L i ={p∈Cloud Nail-s |p x <=limitL i &p x >=limitR i} and Where: L i is the point cloud L of the current layer after dividing horizontally along the x-axis. i and p is the point cloud L of the current layer i It is the point in the middle, p x is the x-coordinate value of point p, limitL i is the current layer point cloud L i is the x-axis minimum value of limitR i is the current layer point cloud L i is the maximum x-axis value.
[0107] Claw curved point cloud Nail-s The point clouds for each layer in L i Check all points in one by one, and find the x-axis coordinate value p of point p. x limitL i ≦p x ≦limitR iAs long as the condition is satisfied, the point p is placed in the current layer L i By adding it to the current area list, c}.
[0108] More specifically, the point cloud L of each layer i The x-axis range of the points in has the following:
[0109]
number
[0110] Here, the number of layers n is not a single fixed, invariant number, but a point cloud of the nail surface. Nail-s It is determined by the length on the x-axis and the density of the input points.
[0111] Of course, the nail curved surface point cloud Cloud Nail-s The density of the point cloud can also be obtained by inputting the length on the x-axis and the number of layers n.
[0112] In this way, the nail surface point cloud Cloud is generated along the nail growth direction, i.e., the positive direction of the x-axis. Nail-s After dividing the layers, the point cloud L i We perform equal length flattening on the points of each layer L i The length on the y-axis remains unchanged before and after flattening, and the nail plane point cloud Cloud Nail-p The nail curved surface point cloud Cloud Nail-sBy flattening only in the positive direction of the x-axis, the nail is adapted to the nail growth direction and the relatively symmetric characteristics along the nail growth direction, reducing the error caused by converting the curved surface into a plane, and the nail plane point cloud Cloud Nail-p The shape and length of the nail side dimensions can be maintained as much as possible without changing them. Nail-p Contour point cloud Contour The shape contour obtained by rendering based on the above can better fit the nail in terms of the side dimensions of the nail, and the nail tip manufactured based on this can be completely attached to the nail when attached, and problems such as incomplete attachment or protrusion do not occur.
[0113] However, as shown in FIG. 17, in the nail point cloud flattening process, the point cloud L i For each point p in j The x-axis coordinate value of each point is unified, and the y-axis and z-axis coordinate values are kept unchanged, resulting in a roughly circular arc-shaped point cloud set stand_L i Get the.
[0114] Briefly, for convenience of the following flattening calculation, we denote the point clouds L i For each point p in j Specifically, the point cloud L of each layer is unified on the same layer. i Mapping f to the plane x=XL i Mapping on top of each layer, the point cloud L i From the aforementioned approximately circular arc-shaped point cloud set stand_L i get. stand_L i =f(L i ) f:p∈L i →p x =XL ix
[0115] Next, as shown in Figure 18, the point cloud set stand_L i Let all points p in the claw surface point cloud Cloud Nail-s y coordinate of the center line of the inner nail yDivide it into two parts according to L_part1 i , L_part2 i where: L_part1 i ={p|p y <=Center y} L_part2 i ={p|p y >Center y}, Where: stand_L i is the point cloud of each layer L i For each point p in j a set of approximately arc-shaped points obtained after unifying the x-axis coordinate values of the points and keeping the y-axis and z-axis coordinate values unchanged; f is a mapping, p is the point cloud set stand_L i It is the point in the middle, p x is the x-coordinate value of point p, XL ix Plane XL i is the x-axis coordinate value of L_part1 i is the point cloud set stand_L of the current layer. i A set of circular arc-shaped points on one side of the center line of the middle claw. L_part2 i is the point cloud set stand_L of the current layer. i A set of circular arc-shaped points on the other side of the center line of the middle claw, p y is the y-coordinate value of point p, Center y is the nail surface point cloud Cloud Nail-s This is the y-axis value of the center line of the middle jaw.
[0116] stand_L i L_part1 i , L_part2 i Then, the circular arc point group L_part1 of each part is i , L_part2 iArrange the points in order from near to far along the center line of the nail, then use the point cloud L_ordered_part i get.
[0117] The specific algorithm is as follows: input: ●Point cloud L_part1 i Enter Radius threshold R thres Enter output: ● Point cloud after sorting and arrangement L_ordered_part i Output Initialization: ●Arranged point group L_ordered_part i Initialize Initialize the point list {P} and the point group L_part i Push all points of into a list {P} Calculate the normal vector {N} for each point in the input point cloud. Calculate the curvature {c} of each point in the input point cloud Algorithm Loop: ● Check all points in the list {P} one by one, and check if the y-axis coordinate value of {P0} is the y-coordinate of the center line of the finger. y Find {P0} that satisfies the closest ●Furthermore, remove {P0} from the list {P} {p}←{p}\P0 At the same time, {P0} is added to the point cloud L_ordered_part i Push to L_ordered_part i ←L_ordered_part i ∪P0 Unless the list {P} is empty: ◆Point cloud L_ordered_part i The point p in which the current sequence is maximum end Find ◆Current point p in list {A} end Point P with the smallest straight-line distance from min Find the point P minRemove from list {A} {A} ← {A} \P min ◆ At the same time P min the point cloud L_ordered_part i Push to L_ordered_part i ←L_ordered_part i ∪P min ◆ When the list {P} is empty, the ordered set of points L_ordered_part i Output
[0118] Next, the circular arc point group L_ordered_part after the order processing i A line point group L_expand_part i where: d_curve=d_straight, And d_curve is approximately equal to the straight-line distance between points P1 and P2, d_curve≒√(P1 y -P2 y ) 2 +(P1 z -P2 z ) 2 and The corresponding points P1' and P2' after expansion are
[0119]
number
[0120] Finally, all the line points L_expand_part i New Cloud_expand Nail Integrate into Cloud_expand Nail =ΣL_expand_part i This new integrated Cloud_expand Nail That is, the nail plane point cloud CloudNail-p It is.
[0121] Fifth embodiment The fifth embodiment of the present application provides a method and system for extracting a nail contour. The extraction method and system are both based on the design and implementation of the method and system for extracting a nail contour in the first to fourth embodiments, and although the actual process or structure is similar to the first to fourth embodiments, there are some differences, and the following will focus on the differences. Detailed explanations other than the differences can be considered to be the same as those in the first to fourth embodiments, and will not be described in detail.
[0122] As shown in Figures 19 and 20, in the fifth embodiment, before rendering the nail contour, the nail contour extraction method further includes a boundary extraction step, and the nail contour extraction system further includes a boundary extraction module 10, which is communicatively connected with both the flattening module 5 and the rendering module 6. In the boundary extraction step, the boundary extraction module 10 is used to extract the nail plane point cloud Cloud Nail-p Cloud of contour points of the outer edge of Contour After extracting the contour points, the rendering module 6 is used to Contour The shape of the nail is drawn and rendered to obtain a nail plate mold.
[0123] The boundary extraction module 10 extracts the nail plane point cloud Cloud Nail-p Contour point cloud Contour On the other hand, if the flattened nail plane point cloud Cloud Nail-p If the contour points are extracted directly, the edges will have a noticeable jagged shape due to noise in the original point cloud and errors in dividing the nail. Contour The lack of smoothness of the nail surface affects the aesthetics of the nail contour obtained by rendering. Nail-p The edges of the nail are smoothed to preserve the original edge features of the nail as much as possible. Nail-p Edge Contour Point Cloud ContourThis makes it possible to make the process smoother and more fluid.
[0124] The boundary extraction module 10 is in communication with both the flattening module 5 and the rendering module 6, and the boundary extraction module 10 may be provided independently and in communication with the PCL point cloud library 3, or may be integrated within or be part of the PCL point cloud library 3.
[0125] In this way, during the nail contour rendering process, the nail plane point cloud Cloud Nail-p Contour point cloud in Contour Extract.
[0126] Next, the nail point cloud flattening step further includes an edge processing step after the boundary extraction step, and the nail contour extraction system further includes an edge processing module 11, which is in the PCL point cloud library 3 and is communicatively connected to both the boundary extraction module 10 and the rendering module 6. In the boundary extraction step, the contour point cloud Cloud obtained using the edge processing module 11 is Contour is subjected to a smoothing process to smoothen edges.
[0127] The edge processing module 11 is in communication with both the boundary extraction module 10 and the rendering module 6. The edge processing module 11 may be provided separately and in communication with the PCL point cloud library 3, or may be integrated within or be part of the PCL point cloud library 3.
[0128] Specifically, in the edge processing step, the edge processing module 11 uses a curve fitting method to extract contour points that are insufficiently smooth (hereinafter, referred to as the input contour point cloud Cloud 11) extracted by the boundary extraction module 10 in the boundary extraction step. Contour-i A smooth contour point cloud (hereafter referred to as the output contour point cloud Cloud) is generated by curve fitting to the edges of the contour point cloud. ContourA smooth nail curve is obtained by obtaining the edge processing step. The specific steps of the edge processing step are as follows: (1) The nail plane point cloud Cloud is generated by the boundary extraction module 10 provided by the PCL point cloud library 3. Nail-p Input contour point cloud Contour-i Extract. (2) Extracted input contour point cloud Contour-i To obtain the curve Contour_hull1, perform curve fitting on the above. (3) Input contour point cloud along the x-axis Contour-i Find the x-axis coordinate x1 of the widest point of . (4) Input contour point cloud Contour-i For all points in , we take the point with coordinate x1 greater than x1 and obtain the set hull1. (5) For all points on the fitting curve Contour_hull1, take points smaller than the coordinate x1 to obtain a set hull2. (6) The obtained sets hull1 and hull2 are integrated to obtain the final contour point cloud. Contour get.
[0129] The contour point cloud of the contour obtained in this way Contour Under the premise of ensuring the matching of the arc degree and edge contour of the nail, the rendering can be more compatible with the actual edge contour of the nail, and the aesthetics of the nail contour obtained by rendering can be improved, thereby improving the aesthetics of the nail tip produced by the prepared nail tip mold.
[0130] Those skilled in the art will recognize that the modules and algorithm steps of each embodiment described in connection with the embodiments disclosed herein may be realized as electronic hardware, computer software, or a combination of both. Also, the software modules may be located in any form of computer storage medium. In order to show the compatibility of hardware and software, the above description generally describes the configurations and processes of each embodiment according to their functions. Whether those functions are performed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may realize the described functions in different ways for each specific application, but such realization should not be considered as departing from the scope of the present invention.
[0131] It should be understood that each of the embodiments disclosed above can be realized in various different forms, and the claims should not be construed as being limited to the embodiments described herein. Specifically, these embodiments are provided so that this disclosure will be complete and comprehensive, and will fully convey the concept of the embodiments of the present invention to those skilled in the art. This disclosure is intended to cover all alternatives, modifications, and equivalents of the embodiments within the spirit and scope of the disclosure as defined by the appended claims. Also, in the detailed description of the embodiments of the present disclosure, a large amount of details and specific details have been set forth to enable a complete understanding. However, it will be apparent to those skilled in the art that the embodiments of the present disclosure can be practiced even without these specific details. [Explanation of symbols]
[0132] 1 Data collection equipment 2 Data conversion device 3. PCL Point Cloud Library 4 Split Module 5 Flattening Module 6 Rendering Module 7 Correction Module 8 Check Module 9 Selection Module 10 Boundary Extraction Module 11 Edge Processing Module
Claims
1. A method for extracting a nail contour, comprising the following steps: A three-dimensional scan is performed on the target finger, and three-dimensional data of the target finger is obtained. Finger and acquiring the finger three-dimensional data Data Finger a data collection step in which the data includes at least three-dimensional nail data Data of all nails; The finger three-dimensional data Data Finger Convert it into 3D point cloud data and put it into the Cloud Finger , and the finger point cloud Cloud Finger is at least the nail surface point cloud Cloud of all nails. Nail-s A data point cloud processing step including: The finger point cloud Finger The finger point group Cloud Finger From the nail curved surface point group Cloud Nail-s A nail point cloud acquisition process for acquiring a nail point cloud; The claw curved surface point group Cloud Nail-s The nail plane point cloud Cloud in the flat state is created by flattening the nail plane without changing the surface area. Nail-p A nail point cloud flattening process to obtain a nail point cloud; The nail plane point group Cloud Nail-p Based on the contour, the contour point cloud Cloud Contour and a nail contour rendering step of rendering the shape of the nail to obtain a nail plate mold of the nail.
2. The data point cloud processing step includes: The finger point cloud Finger The posture and position of the output finger point cloud on the preset posture and position is Finger-o A point cloud orientation correction sub-step is further included, The preset posture and position are the output finger point cloud Cloud Finger-o This means that the center of mass of overlaps with the origin of the coordinate system in the PCL point cloud library, the tip of the finger points in the positive direction of the x-axis in the coordinate system, and the back of the finger points in the negative direction of the z-axis in the coordinate system. The finger point cloud in the nail point cloud acquisition step Finger The output finger point cloud Cloud Finger-o 2. The method for extracting a nail contour according to claim 1, further comprising the steps of:
3. After the point cloud orientation correction sub-process, The data point cloud processing step includes: Check whether the back surface of the finger in the transformed finger point cloud points in the negative direction of the z-axis in the coordinate system; When the back surface of the finger is pointing in the positive direction of the z-axis in the coordinate system, the converted finger point cloud is rotated 180 degrees around the x-axis and then output as the output finger point cloud Cloud Finger-o or If the back surface of the finger is pointing in the negative direction of the z-axis in the coordinate system, the converted finger point cloud is Finger-o 3. The method for extracting a nail contour according to claim 2, further comprising a checking sub-step of:
4. The nail point cloud acquisition step includes: Using the region growing and division method, Finger Divide the finger point cloud Cloud Finger From the nail curved surface point group Cloud Nail-s The method for extracting a nail contour according to claim 1 , further comprising a point cloud division sub-step of acquiring a point cloud.
5. Before the point cloud division sub-process, the nail point cloud acquisition process includes: First, the nail plate surface area Nrange(x, y) of the nail is determined and acquired, and then one point in the nail plate surface area Nrange(x, y) is set as a seed point S 0 and the seed point S 0 The domain growing process is started by a seed point S 0 The method for extracting a nail contour according to claim 4 , further comprising a selection sub-step.
6. In the claw point cloud flattening step, the claw curved surface point group Cloud Nail-s Divide horizontally along the x-axis to create n-layer point cloud L i Then, the point group L of each layer i All of the points are expanded on the same layer and flattened, and the nail plane point cloud Cloud Nail-p 2. The method for extracting a nail contour according to claim 1, further comprising: acquiring a first image of the nail contour;
7. Specifically, the nail point group flattening process includes: The point group L of each layer i Each point p in j The x-axis coordinate value of each point is unified, and the y-axis and z-axis coordinate values are kept unchanged, so that a substantially circular arc-shaped point cloud set stand_L i and The point cloud set stand_L of each layer i All points p in the center of the nail are expressed as the y coordinate Center y Divide it into two parts according to L_part1 i , L_part2 i And, Arc-shaped point group L_part1 of each part i , L_part2 i are arranged on a straight line in order from the one closest to the center line of the nail, and L_ordered_part i and obtaining The L_ordered_part i Using the nail plane point cloud Cloud Nail-p 7. The method for extracting a nail contour according to claim 6, further comprising the step of: acquiring a first value of the first dimension of the nail contour;
8. After the nail point group flattening process, The acquired nail plane point cloud Cloud Nail-p 2. The method for extracting a nail contour according to claim 1, further comprising an edge processing step of smoothing edges by processing the edges of the image.
9. A nail contour extraction system used to realize the nail contour extraction method according to claim 1, A three-dimensional scan is performed on the target finger, and three-dimensional data of the target finger is obtained. Finger and acquiring the finger three-dimensional data Data Finger At least, all the nails' 3D data Nail a data collection device including: A data conversion device is communicatively connected to the data collection device, and the data conversion device converts the finger three-dimensional data Data Finger The finger point cloud is then received and converted into three-dimensional point cloud data. Finger , and the finger point cloud Cloud Finger is at least the nail surface point cloud Cloud of all nails. Nail-s A data conversion device including: a PCL device in communication with the data conversion device and having a PCL point cloud library; A segmentation module is included in the PCL device, and the segmentation module is configured to Finger The finger point group Cloud Finger From the nail curved surface point cloud Cloud Nail-s A segmentation module configured to extract A flattening module is communicatively connected to the PCL device, and the flattening module is configured to flatten the nail curved surface point cloud Cloud Nail-s is expanded and flattened without changing the surface area, and the nail plane point cloud Cloud Nail-p a flattening module configured to obtain A rendering module is communicatively connected to the planarization module, the rendering module rendering the nail plane point cloud Cloud Nail-p Receive the nail plane point cloud Cloud Nail-p Contour point cloud of Contour and a rendering module for performing rendering based on the shape of the nail and obtaining a nail plate mold of the nail.
10. The data conversion device has a correction module, and the correction module is configured to Finger The posture and position of the output finger point cloud on the preset posture and position is Finger-o It is structured so that it can be converted to The segmentation module is Finger The output finger point cloud Cloud Finger-o 10. The nail contour extraction system according to claim 9, further comprising:
11. The nail contour extraction system comprises: A check module is communicatively connected with the correction module, the check module being configured to receive and check the direction of the back of the finger in the transformed finger point cloud; If the back surface of the finger in the transformed finger point cloud points in the positive direction of the z-axis in the coordinate system, the finger point cloud is rotated 180 degrees around the x-axis using the correction module and then outputted to the output finger point cloud Cloud Finger-o year, When the back surface of the finger in the transformed finger point cloud is pointing in the negative direction of the z axis in the coordinate system, the transformed finger point cloud is directly output to the output finger point cloud Cloud. Finger-o The nail contour extraction system according to claim 10, further comprising a check module for checking whether the nail contour is correct or not.
12. The nail point cloud acquisition step includes: Using the region growing and division method, Finger Divide the finger point cloud Cloud Finger From the nail curved surface point group Cloud Nail-s A point cloud division sub-step of obtaining The nail contour extraction system comprises: A seed point S in communication with the segmentation module. 0 The selection module further includes a selection module for the nail curved surface point cloud Cloud Nail-s The nail plate surface area Nrange(x, y) on the nail plate is obtained, and one point in the nail plate surface area Nrange(x, y) is set as a seed point S 0 and the segmentation module selects the seed point S 0 10. The nail contour extraction system according to claim 9, wherein the region growing and segmentation method is configured to start a growing process by:
13. The flattening module calculates the nail curved surface point cloud Cloud Nail-s Divide horizontally along the x-axis to create n-layer point cloud L i Then, the point group L of each layer i All of the points are expanded on the same layer and flattened, and the nail plane point cloud Cloud Nail-p 10. The nail contour extraction system according to claim 9, wherein the nail contour extraction system is configured to acquire the following:
14. The planarization module calculates the point cloud L of each layer. i Each point p in j The x-axis coordinate value of each point is unified, and the y-axis and z-axis coordinate values are kept unchanged, so that a substantially circular arc-shaped point cloud set stand_L i Then, the point cloud set stand_L of each layer is obtained. i All points p in the center of the nail are expressed as the y coordinate Center y Divide it into two parts according to L_part1 i , L_part2 i Finally, the circular arc point group L_part1 i , L_part2 i are arranged on a straight line in order from the one closest to the center line of the nail, and L_ordered_part i , and L_ordered_part i Using the nail plane point cloud Cloud Nail-p 14. The nail contour extraction system according to claim 13, characterized in that the nail contour extraction system is configured to be able to acquire the following:
15. The PCL device is The acquired nail plane point cloud Cloud Nail-p 10. The nail contour extraction system according to claim 9, further comprising an edge processing module for processing the edge of the image to smooth the edge.
Citation Information
Patent Citations
Printing method of nail art device
CN109770520A
Systems and methods for creating custom-fit artificial nails using non-contact optical measurement devices
JP2006519030A
Nail three-dimensional shape estimation system, method for using nail three-dimensional shape estimation system, terminal device, nail three-dimensional shape estimation method and program
JP2020177578A
Nail contour detecting device, nail contour detecting method and storage medium
US20190095747A1