Density and position-based hair follicle extraction path planning method, system and application
Patent Information
- Application Number
- CN202311021840.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-14
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2043-08-14
AI Technical Summary
[0003]由于在提取过程中经常会出现图像旋转的现象,因此导致毛囊基于图像帧的位置随着旋转而改变,使得提取过程满足不了实际需求
[0039]有益效果:本发明提出了一种基于密度和位置的毛囊提取路径规划方法、系统及应用,针对在提取毛囊过程中经常会出现图像旋转,导致毛囊基于图像帧的位置随着旋转而改变的现象,通过考虑毛囊密度,血流方向在待提取的毛囊队列中选择较为健壮的毛囊点,随后基于张紧器坐标,在提取过程中,即使旋转和平移都不会改变毛囊点基于张紧器坐标系的坐标,进而保障毛囊提取点位置的稳定,便于对自动化设备的引导。
Smart Images

Figure CN117224228B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of image data analysis, and in particular to a method, system, and application for hair follicle extraction path planning based on density and location. Background Technology
[0002] During hair follicle extraction, the extraction path needs to be planned based on hair follicle density and location. Existing hair follicle queue extraction techniques typically involve manual planning or selecting the number of hair follicles to extract based on given distance parameters, as well as determining the distribution of hair follicle units. Specifically, firstly, primary and secondary hair follicle points are selected based on distance, until all hair follicles have been selected, and the hair follicle locations are within a threshold standard deviation.
[0003] Because image rotation often occurs during the extraction process, the position of the hair follicle based on the image frame changes with the rotation, making the extraction process unable to meet actual needs. Summary of the Invention
[0004] Objective: To propose a method, system, and application for hair follicle extraction path planning based on density and location, in order to solve the aforementioned problems existing in the prior art. Based on the tensioner coordinates, the extraction process ensures that the coordinates of the hair follicle point based on the tensioner coordinate system remain unchanged even during rotation and translation.
[0005] Technical Solution: Firstly, a hair follicle extraction path planning method based on density and location is proposed. Within a predetermined area, based on the analysis results of hair follicle density and location, hair follicle points for extraction are selected, and corresponding extraction paths are planned. This method includes the following steps:
[0006] Step 1: Read image data containing information about the hair follicles to be extracted, and define a region in the image data, while initializing the position parameter information of the hair follicles in the defined region;
[0007] Step 1.1: Establish a trajectory coordinate system corresponding to the predetermined area using the tensioner as the reference coordinate system; the trajectory coordinate system takes the lower left corner of the predetermined area as its origin;
[0008] Step 1.2: Initialize position parameter information in the trajectory coordinate system established in Step 1.1; the position parameter information includes: coordinates of the vertices of the predetermined region, coordinates of the hair follicles not extracted, and coordinates of the trajectory origin.
[0009] Step 2: Obtain the initial center point based on the coverage area of the predetermined region;
[0010] Step 3: Determine the extraction center point based on the density of hair follicles within the initial center point;
[0011] Step 4: Determine the hair follicle extraction point from the extraction center point;
[0012] Step 4.1: Read the location information of the extraction center point;
[0013] Step 4.2: Calculate the positional distance between the unextracted hair follicle points and the extraction center point;
[0014] Step 4.3: Sort the hair follicle points based on the calculation results of location distance;
[0015] Step 4.4: By traversing the sorting results, determine whether the current hair follicle point meets the density threshold condition;
[0016] Step 4.5: Select hair follicles that meet the density threshold as the hair follicles to be extracted.
[0017] Step 4.6: Based on the comparison results of the location distance and the preset expansion radius and the blood flow direction, perform a secondary sorting of the hair follicle points to be extracted;
[0018] Step 4.7: Use the results of the second sorting as the final determined hair follicle extraction points.
[0019] During the secondary sorting process, the sorting direction is changed by changing the line break. In the y-axis direction of the trajectory coordinate system established with the tensioner as the reference coordinate system, the last value in each group must be smaller than the second-to-last value.
[0020] In addition, the process of sorting hair follicle points based on the calculation results of location distance includes the following steps:
[0021] Step 4.3.1: When the direction of traversal and search is to the right of the x-axis of the trajectory coordinate system, sort them in ascending order;
[0022] Step 4.3.2: When the direction of traversal and search is the left direction of the x-axis of the trajectory coordinate system, sort them in descending order.
[0023] Step 5: Output the extracted hair follicle point information determined in Step 4;
[0024] Step 6: Generate the hair follicle extraction path based on the obtained hair follicle extraction point information.
[0025] In some possible implementations of the first aspect, the process of determining the extracted center point includes:
[0026] Read the position parameter information after initialization;
[0027] Within the predetermined area, the initial center point is obtained based on the length and expansion radius of the predetermined area;
[0028] The number of hair follicles around the initial center point is calculated, and it is determined whether the set density threshold is met.
[0029] The initial center point that meets the density threshold condition is used as the extraction center point.
[0030] In some possible implementations of the first aspect, during the process of obtaining the extraction center point and confirming the extraction hair follicle point, each hair follicle point is analyzed by traversing and querying each hair follicle point; in addition, during the traversal and query process, the search direction during the traversal process is determined by setting a switch control variable.
[0031] Secondly, a density- and location-based hair follicle extraction path planning system is proposed to implement a density- and location-based hair follicle extraction path planning method. This system includes:
[0032] An initialization module used to initialize parameter information for the area where hair follicles are located;
[0033] The central module used to determine the hair follicle extraction center;
[0034] A hair follicle extraction module used to confirm the hair follicle extraction point based on the extraction center confirmed by the central module;
[0035] An output module used to output the hair follicle point information obtained by the hair follicle extraction module;
[0036] A path generation module is used to automatically generate hair follicle extraction paths based on the hair follicle point information output by the output module.
[0037] Thirdly, a density- and location-based hair follicle extraction path planning device is provided, the device comprising: a processor, and a memory storing computer program instructions; the processor, when reading and executing the computer program instructions, implements the density- and location-based hair follicle extraction path planning method of the first aspect or some implementable embodiments of the first aspect.
[0038] Fourthly, an application of a hair follicle extraction path planning method in hair follicle extraction is provided.
[0039] Beneficial effects: This invention proposes a method, system, and application for hair follicle extraction path planning based on density and location. Addressing the phenomenon that image rotation frequently occurs during hair follicle extraction, causing the position of hair follicles relative to the image frame to change with rotation, this invention selects robust hair follicles from the queue of hair follicles to be extracted by considering hair follicle density and blood flow direction. Then, based on the tensioner coordinates, even rotation and translation during the extraction process will not change the coordinates of the hair follicle points relative to the tensioner coordinate system, thus ensuring the stability of the hair follicle extraction point position and facilitating the guidance of automated equipment. Attached Figure Description
[0040] Figure 1 This is a data processing flowchart of the present invention.
[0041] Figure 2 This is a flowchart illustrating how the present invention obtains information about the hair follicle points to be extracted.
[0042] Figure 3 This is a detailed flowchart of the process for obtaining information about the hair follicle points to be extracted according to the present invention.
[0043] Figure 4 This is a flowchart of the initialization process of the present invention.
[0044] Figure 5 This is a flowchart for determining the extraction center in this invention.
[0045] Figure 6 The flowchart for determining the extraction point of the hair follicle in this invention is shown. Detailed Implementation
[0046] In the following description, numerous specific details are set forth in order to provide a more thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention can be practiced without one or more of these details. In other instances, certain technical features well-known in the art have not been described in order to avoid obscuring the invention.
[0047] Example 1
[0048] In one embodiment, during the extraction of hair follicles, the position of the hair follicles changes based on the image frame due to image rotation. A hair follicle extraction path planning method based on density and position is proposed. During the extraction process, the hair follicle point coordinates are stabilized based on the tensioner coordinates, thereby guiding the intelligent device to automatically extract hair follicles.
[0049] like Figure 1 As shown, the process of implementing the hair follicle extraction path planning method based on density and location includes: first, initializing information; second, determining the center point of extraction; third, determining the extraction hair follicle points; fourth, outputting the information of the hair follicle points to be extracted; and finally, automatically generating the hair follicle extraction path based on the output hair follicle point information.
[0050] Specifically, the process of obtaining the hair follicle point information to be extracted is as follows: Figure 2 As shown, it includes the following steps:
[0051] Step 1: Initialize information;
[0052] Specifically, the process involves reading image data containing information about the hair follicles to be extracted, determining a predetermined region within the image data for hair follicle extraction, and initializing positional parameters within that region. Finally, an initial center point is selected from the predetermined region and stored in a constructed queue.
[0053] Step 2: Determine the extraction center point;
[0054] Specifically, center points for extraction are selected from the initial center point queue based on the length of the predetermined region and a preset expansion radius. Optionally, to ensure uniform extraction of hair follicles, center points with a density less than a threshold are discarded. The expansion radius is preset to 5 pixels.
[0055] First, an initial center point is selected from the predetermined area according to the initially planned extraction direction. Then, the initial center point is determined from left to right based on the length and expansion radius of the predetermined area. Next, the number of hair follicles within a preset range around the initial center point is calculated, and it is determined whether the set density threshold is met. Finally, the initial center point that meets the conditions is used as the extraction center point.
[0056] Step 3: Determine the hair follicle extraction point;
[0057] Specifically, based on the extraction center point selected in step 2, the distance between the hair follicle points within the preset range and the extraction center point is calculated; then, the hair follicle points within the range are sorted based on the obtained distance results; next, by traversing the sorting results, it is determined whether the current hair follicle point meets the set density threshold; finally, the hair follicle points that meet the density threshold are taken as the hair follicle points to be extracted.
[0058] Step 4: Output the information of the hair follicle points to be extracted;
[0059] Step 5: Generate a hair follicle extraction path based on the obtained hair follicle point information.
[0060] In a further embodiment, during the process of obtaining the extraction center point and confirming the extraction hair follicle point, the search direction during the traversal is determined by setting a switch control variable flag. In a preferred embodiment, when the switch control variable flag is 1, it indicates that the search direction is to the left; when the switch control variable flag is 0, it indicates that the search direction is to the right.
[0061] In addition, before outputting the hair follicle point information to be extracted, the system also includes a judgment on the number of hair follicle points to be replaced. If the number is less than two, the initial center point is reconfirmed by expanding the query range, and the subsequent extraction center point and hair follicle points are updated.
[0062] This embodiment proposes a hair follicle extraction path planning method based on density and location. Based on modular design, it can automatically plan the hair follicle queue extraction for the hair follicles to be extracted without relying on special interactive software. In actual application scenarios, it guides intelligent devices to automatically perform hair follicle extraction.
[0063] Example 2
[0064] In a further embodiment based on Example 1, the process of obtaining hair follicle point information in practical application is as follows: Figure 3 As shown, the process of implementing a density- and location-based hair follicle extraction path planning method includes the following steps:
[0065] Step 1: Receive image data containing information about the hair follicle points to be extracted;
[0066] Step 2: Define a region in the image data and initialize the location information of the hair follicles in the defined region;
[0067] Specifically, a trajectory coordinate system is established based on the tensioner as the fundamental coordinate system for path planning, and the position information of the predetermined area and the initial trajectory center point are initialized. During initialization, the vertex coordinates of the predetermined area and the hair follicle points not extracted within the predetermined area are first obtained; then, the trajectory origin is set.
[0068] Optionally, a trajectory coordinate system corresponding to the predetermined area can be established with the tensioner as the reference coordinate system, and the lower left corner of the predetermined area can be set as the origin of the coordinate system. The initial trajectory center point is the first starting point analyzed in the path planning process, while the trajectory center point is the point closest to the origin.
[0069] In the process of performing path planning analysis, the location information of the predetermined area and hair follicle is stored by constructing a queue. In the preferred embodiment, the constructed queue is roi, and the queue information storing the predetermined area roi is in the following order: roi[0] = top left; roi[1] = top right; roi[2] = bottom right; roi[3] = bottom left. In addition, the length of the predetermined area is obtained by calculating the number of columns of the queue roi, that is, the length of the predetermined area roi is: length = roi.cols; the origin of the trajectory is set at the bottom left corner, that is, roi[3].
[0070] In a preferred embodiment, such as Figure 4 As shown, the initialization process includes:
[0071] Step 2.1: Input the vertex coordinates of the predetermined region ROI and the hair follicle points that have not been extracted;
[0072] Step 2.2: Set the origin of the trajectory.
[0073] Step 3: Based on the width of the predetermined area and the width of the center point, obtain the number and distribution of the center points;
[0074] Specifically, the center point for extraction is selected from the initial center point queue by setting the length and expansion radius of the predetermined area; then, the final extraction center point is selected by setting the threshold judgment conditions.
[0075] like Figure 5 As shown, firstly, based on the constructed trajectory coordinate system, the rightward x-axis direction is taken as the selected initial direction, and the initial center point is determined from left to right according to the length and expansion radius of the predetermined area; then, the number of hair follicles within the range of the current initial center point is calculated; next, based on the preset hair follicle density comparison, it is determined whether the current initial center point meets the extraction conditions; finally, the initial center point that meets the conditions is taken as the extraction center point.
[0076] Step 4: Find the nearest unextracted hair follicle points within the extraction center point;
[0077] Step 5: Sort the obtained hair follicle points;
[0078] Step 6: Filter the sorting results according to the preset selection range;
[0079] Specifically, when filtering the sorted results, the search is performed from smallest to largest x-coordinate when searching to the right, and from largest to smallest x-coordinate when searching to the left. Based on the search results, hair follicles with a distance smaller than the expansion radius are extracted according to the blood flow direction, i.e., the direction with the larger y-coordinate. This effectively reduces the phenomenon of lower hair follicles being contaminated due to the extraction of upper hair follicles first.
[0080] In a preferred embodiment, such as Figure 6 As shown, based on the sorting results, the hair follicle point closest to the extraction center point is first found; then, the hair follicle points in the group are sorted according to the x-axis direction. During the sorting process, they are sorted from smallest to largest in the right direction and from largest to smallest in the left direction; next, based on the sorting results, the hair follicle points with a distance smaller than the expansion radius are sorted a second time according to the blood flow direction, and the sorting results are used as the final extraction order of the hair follicle points.
[0081] During the secondary sorting process, the sorting direction is changed by using line breaks. In this process, along the y-axis of the coordinate system, the last value in each group must be smaller than the second-to-last value. A line break indicates a change in the search direction, encompassing two cases: changing from right-to-left to left-to-right, and changing from left-to-right to right-to-left.
[0082] Step 7: Use the screening results to determine the hair follicle points to be extracted;
[0083] Step 8: Output the extracted hair follicle points;
[0084] Specifically, the results selected in step 7 are placed into a queue for storage and then output in the format of a C++ data vector.
[0085] Step 9: Automatically generate the hair follicle extraction path based on the output results;
[0086] Specifically, the obtained hair follicle point queue is sent to the robotic arm control center of the automated extraction equipment, and then a hair follicle extraction path is generated for subsequent hair follicle point extraction.
[0087] In this embodiment, during the selection of hair follicle points, the robust hair follicle points are selected from the queue of hair follicles to be extracted by considering two attributes: hair follicle density and blood flow direction, thereby achieving accurate locating of hair follicle points.
[0088] Example 3
[0089] In one embodiment, a density- and location-based hair follicle extraction path planning system is proposed to implement a density- and location-based hair follicle extraction path planning method. The system includes the following modules: an initialization module, a center module, a hair follicle extraction module, an output module, and a path generation module.
[0090] The initialization module initializes the parameter information of the area where the hair follicle is located; the center module determines the extraction center of the hair follicle; the hair follicle extraction module confirms the extraction point of the hair follicle based on the extraction center confirmed by the center module; the output module outputs the information of the hair follicle point to be extracted confirmed by the hair follicle extraction module; and the path generation module automatically generates the hair follicle extraction path based on the extraction point information output by the output module.
[0091] In a further embodiment, when executing the density- and location-based hair follicle extraction path planning method, image data of the region to be analyzed is first read, and after determining the predetermined region, the parameter information of the region where the hair follicle is located is initialized using an initialization module. Candidate initial center points are selected from the selected region and stored in a constructed queue.
[0092] Secondly, based on the initialization results, candidate initial center points are selected from the selected area and stored in the constructed queue. The center module selects the center point for extraction from the candidate initial center point queue based on the predetermined region length and expansion radius. Simultaneously, considering the hair follicle density, the final extraction center point is confirmed.
[0093] Next, based on the selected extraction center point, the hair follicle extraction module calculates the distance between the hair follicle points within the extraction center point range and the extraction center point itself, and sorts the hair follicle points within the range based on the obtained distance results. For the sorted results, the module iterates through the sorted results to determine whether the current hair follicle point meets the extraction conditions, and selects those hair follicle points as the hair follicle points to be extracted.
[0094] Next, the output module outputs the hair follicle point information obtained by the hair follicle extraction module.
[0095] Finally, the path generation module automatically generates the hair follicle extraction path based on the hair follicle extraction point information output by the output module.
[0096] As described above, although the invention has been shown and described with reference to specific preferred embodiments, it should not be construed as limiting the invention itself. Various changes in form and detail may be made without departing from the spirit and scope of the invention as defined in the appended claims.
Claims
1. A method for planning hair follicle extraction paths based on density and location, characterized in that, Includes the following steps: Step 1: Read image data containing information about the hair follicles to be extracted, and define a region in the image data, while initializing the position parameter information of the hair follicles in the defined region; Step 2: Obtain the initial center point based on the coverage area of the predetermined region; Step 3: Determine the extraction center point based on the density of hair follicles within the initial center point; Step 4: Determine the hair follicle extraction point from the extraction center point, specifically including: Step 4.1: Read the location information of the extraction center point; Step 4.2: Calculate the positional distance between the unextracted hair follicle points and the extraction center point; Step 4.3: Sort the hair follicle points based on the calculation results of location distance; Step 4.4: By traversing the sorting results, determine whether the current hair follicle point meets the density threshold condition; Step 4.5: Select hair follicles that meet the density threshold as the hair follicles to be extracted. Step 4.6: Based on the comparison results of the positional distance and the preset expansion radius and the blood flow direction, perform a secondary sorting of the hair follicle points to be extracted; during the secondary sorting process, the sorting is performed by changing the direction by changing the line break; during the sorting process, in the y-axis direction of the trajectory coordinate system established with the tensioner as the reference coordinate system, the last value in the same group needs to be smaller than the second to last value. Step 4.7: Use the results of the secondary sorting as the final determined hair follicle extraction points; Step 5: Output the extracted hair follicle point information determined in Step 4; Step 6: Generate the hair follicle extraction path based on the obtained hair follicle extraction point information.
2. The hair follicle extraction path planning method based on density and location according to claim 1, characterized in that, Step 1 includes: Step 1.1: Establish a trajectory coordinate system corresponding to the predetermined area using the tensioner as the reference coordinate system; the trajectory coordinate system takes the lower left corner of the predetermined area as its origin; Step 1.2: Initialize position parameter information in the trajectory coordinate system established in Step 1.1; the position parameter information includes: coordinates of the vertices of the predetermined region, coordinates of the hair follicles not extracted, and coordinates of the trajectory origin.
3. The hair follicle extraction path planning method based on density and location according to claim 1, characterized in that, The process of determining the extracted center point includes the following steps: Read the position parameter information after initialization; Within the predetermined area, the initial center point is obtained based on the length and expansion radius of the predetermined area; The number of hair follicles within a preset range around the obtained initial center point is calculated, and it is determined whether the set density threshold is met. The initial center point that meets the density threshold condition is used as the extraction center point.
4. The hair follicle extraction path planning method based on density and location according to claim 1, characterized in that, In the process of obtaining the extraction center point and confirming the extraction hair follicle point, each hair follicle point is analyzed by traversing and querying each hair follicle point. During the traversal query process, the search direction is determined by setting a switch control variable.
5. The hair follicle extraction path planning method based on density and location according to claim 1, characterized in that, The process of sorting hair follicle points based on location distance calculations includes the following steps: Step 4.3.1: When the traversal search direction is to the right of the x-axis of the trajectory coordinate system, sort in ascending order; Step 4.3.2: When the traversal search direction is to the left of the x-axis of the trajectory coordinate system, sort in descending order.
Citation Information
Patent Citations
Hair follicle point identification method, system and device and storage medium
CN114694141A
Hair follicle collection path determination device and method
CN115886998A
Hair follicle transplantation visual auxiliary system and hair follicle transplantation robot
CN116196106A