Automatic haircut method and device based on artificial intelligence, computer equipment and readable storage medium
Through the automatic haircut method based on artificial intelligence, the depth camera and ultrasonic sensors are used to obtain fine head information, and combined with fixtures and cutters for trimming, the problems of low efficiency and insufficient accuracy of traditional haircut methods are solved, achieving efficient, accurate and personalized The effect of haircut.
Patent Information
- Application Number
- CN202411224673.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2024-12-13
AI Technical Summary
Traditional haircutting methods are inefficient and the hairstyle effect is difficult to accurately control. The existing automatic haircut technology has shortcomings in obtaining head information, personalized haircut design, and safety and accuracy of the haircut process, and cannot meet the efficient, accurate and personalized haircut services. need.
Using an automatic haircut method based on artificial intelligence, the facial and head dot sets are obtained through depth cameras and ultrasound sensors, and the fine head dot sets are obtained by combining spatial curved surface fitting. The fixtures and scissors are used to trim according to the calibration hair distribution information to achieve efficient and efficient Accurate haircut.
It realizes efficient, accurate and personalized automatic haircut services, meets users' high-standard needs for haircut effects, and improves the safety and accuracy of the haircut process.
Smart Images

Figure CN119131152A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent pruning, and in particular to an automatic haircutting method, device, computer equipment and readable storage medium based on artificial intelligence. Background Art
[0002] With the continuous development of science and technology, the hairdressing industry is also seeking innovations in intelligence and automation. Traditional hairdressing methods rely on manual operations, which are inefficient and difficult to accurately control the hairstyle. The current automatic hairdressing technology has deficiencies in the accuracy of head information acquisition, the personalization of hairstyle design, and the safety and accuracy of the hairdressing process, and cannot meet people's needs for efficient, accurate and personalized hairdressing services. Summary of the invention
[0003] The object of the present invention is to provide an automatic haircutting method, device, computer equipment and readable storage medium based on artificial intelligence.
[0004] In a first aspect, an embodiment of the present invention provides an automatic haircutting method based on artificial intelligence, comprising:
[0005] Scan the target user's facial area to obtain a basic facial point set;
[0006] Detecting the head of the target user to obtain a basic head point set;
[0007] The basic skull point set and the basic facial point set are combined and optimized to obtain a refined head point set;
[0008] Using a depth camera to perform basic hair estimation on the target user to obtain initial hair distribution information;
[0009] Determine a scalp area, and use a fixture to calibrate the hair length in the scalp area to obtain calibrated hair length information of the target user;
[0010] calibrating the initial hair distribution information according to the calibrated hair length information to obtain calibrated hair distribution information;
[0011] Based on the refined head point set, obtaining a target hairstyle from a preset NFT hairstyle database;
[0012] The hair is trimmed by using a clamp and a clipper based on the target hairstyle and the calibrated hair distribution information to complete the haircut for the target user.
[0013] In a possible implementation, scanning the facial area of the target user to obtain a basic facial point set includes:
[0014] Use a depth camera to scan the target user's facial area to obtain facial depth information and facial RGB information;
[0015] Obtaining the basic facial point set according to the facial depth information and the facial RGB information;
[0016] The detecting the head of the target user to obtain a basic head point set includes:
[0017] Using an ultrasonic sensor to detect the head of the target user to obtain the basic head point set;
[0018] The step of combining and optimizing the basic skull point set and the basic facial point set to obtain a refined head point set includes:
[0019] The basic skull point set and the basic facial point set are used to perform spatial surface fitting to obtain the refined head point set.
[0020] In a possible implementation, determining the scalp area includes:
[0021] Determine whether there is hair occlusion;
[0022] If so, the blocking hair is clamped by the clamp, and the scalp area is determined according to machine vision;
[0023] If not present, the scalp area is determined based on machine vision.
[0024] In a possible implementation, the step of calibrating the hair length in the scalp area using a fixture to obtain the calibrated hair length information of the target user includes:
[0025] Dividing the scalp area into a plurality of scalp areas to be treated;
[0026] Controlling the clamp to clamp the hair of a target scalp area by a mechanical arm, wherein the target scalp area is any one of the multiple scalp areas to be processed;
[0027] Controlling the fixture to move along the normal direction of the head surface by a mechanical arm;
[0028] When the hair friction force of the clamp reaches a preset hair friction force threshold, it is determined that the clamp straightens the hair in the target scalp area;
[0029] The clamp is controlled by a mechanical arm to continue to move along the normal direction of the head surface. When the hair friction force of the clamp changes suddenly, the moving distance of the clamp is recorded as the calibrated hair length information of the target scalp area.
[0030] In a possible implementation, the step of calibrating the hair length in the scalp area using a fixture to obtain the calibrated hair length information of the target user includes:
[0031] Dividing the scalp area into a plurality of scalp areas to be treated;
[0032] Controlling the clamp to clamp the hair of a target scalp area by a mechanical arm, wherein the target scalp area is any one of the multiple scalp areas to be processed;
[0033] Controlling the fixture to move along the normal direction of the head surface by a mechanical arm;
[0034] When the hair friction force of the clamp reaches a preset hair friction force threshold, it is determined that the clamp straightens the hair in the target scalp area;
[0035] The clamp is controlled by a robotic arm to continue moving in the direction of force reduction. When the clamp only has radial force acting on it, the clamp is controlled to move in the radial direction. When the hair friction force of the clamp changes suddenly, the moving distance of the clamp is recorded as the calibrated hair length information of the target scalp area.
[0036] In a possible implementation, acquiring a target hairstyle from a preset NFT hairstyle database based on the refined head point set includes:
[0037] Determining facial features information of the target user based on the refined head point set;
[0038] Determining the identity information of the target user according to the facial features information;
[0039] Determine whether there is preset NFT hairstyle data corresponding to the identity information in the preset NFT hairstyle database;
[0040] If yes, the preset NFT hairstyle data corresponding to the identity information is used as the target hairstyle;
[0041] If not, the target hairstyle is obtained from the preset NFT hairstyle database in response to the user operation.
[0042] In a possible implementation, the trimming with a clamp and a clipper based on the target hairstyle and the calibrated hair distribution information to complete the haircut for the target user includes:
[0043] Based on the refined head point set, determining facial features information and head posture of the target user;
[0044] Determine a safe area based on the facial features information;
[0045] Based on the avoidance strategy for the safety area, the head posture is acquired in real time, and the haircut for the target user is completed by trimming the hair based on the target hairstyle and the calibrated hair distribution information using a clamp and a clipper.
[0046] In a second aspect, an embodiment of the present invention provides an automatic hair cutting device based on artificial intelligence, comprising:
[0047] An acquisition module is used to scan the facial area of the target user to obtain a basic facial point set;
[0048] The head of the target user is detected to obtain a basic head point set; the basic head point set and the basic facial point set are combined and optimized to obtain a refined head point set; the basic hair of the target user is estimated using a depth camera to obtain initial hair distribution information; the scalp area is determined, and the hair length is calibrated in the scalp area using a fixture to obtain the calibrated hair length information of the target user; the initial hair distribution information is calibrated according to the calibrated hair length information to obtain calibrated hair distribution information; based on the refined head point set, a target hairstyle is obtained from a preset NFT hairstyle database;
[0049] The trimming module is used to perform trimming based on the target hairstyle and the calibrated hair distribution information using a clamp and a clipper to complete a haircut for the target user.
[0050] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor and a non-volatile memory storing computer instructions, wherein when the computer instructions are executed by the processor, the computer device executes the method described in the first aspect.
[0051] In a fourth aspect, an embodiment of the present invention provides a readable storage medium, wherein the readable storage medium includes a computer program, and when the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the method described in the first aspect.
[0052] Compared with the prior art, the beneficial effects provided by the present invention include: adopting an artificial intelligence-based automatic haircutting method, device, computer equipment and readable storage medium disclosed in the present invention, obtaining a basic point set by scanning the face and head of the target user and optimizing it to obtain a fine head point set, estimating the hair distribution through a depth camera, determining the scalp area to calibrate the hair length, calibrating the hair distribution information, obtaining the target hairstyle from a preset NFT hairstyle database based on the fine point set, and finally using clamps and clippers to complete the haircut according to the target hairstyle and the calibrated hair distribution information, thereby realizing an efficient, accurate and personalized automatic haircutting service. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can also be obtained based on these drawings without creative work.
[0054] Figure 1 A schematic diagram of the steps of an automatic haircutting method based on artificial intelligence provided by an embodiment of the present invention;
[0055] Figure 2 A schematic diagram of hair length estimation provided by an embodiment of the present invention;
[0056] Figure 3 Another schematic diagram of hair length estimation provided by an embodiment of the present invention;
[0057] Figure 4 A schematic diagram of a scalp area provided by an embodiment of the present invention;
[0058] Figure 5 A schematic diagram of a hair cutting section provided by an embodiment of the present invention;
[0059] Figure 6 A schematic block diagram of the structure of an automatic hair cutting device based on artificial intelligence provided by an embodiment of the present invention;
[0060] Figure 7 A schematic block diagram of the structure of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0062] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings.
[0063] In order to solve the technical problems in the aforementioned background technology, Figure 1 This is a flow chart of an automatic haircutting method based on artificial intelligence provided in an embodiment of the present disclosure. The automatic haircutting method based on artificial intelligence is introduced in detail below.
[0064] Step S201, scanning the facial area of the target user to obtain a basic facial point set;
[0065] Step S202, detecting the head of the target user to obtain a basic head point set;
[0066] Step S203, combining and optimizing the basic skull point set and the basic facial point set to obtain a refined head point set;
[0067] Step S204, using a depth camera to perform basic hair estimation on the target user to obtain initial hair distribution information;
[0068] Step S205, determining a scalp area, and using a fixture to calibrate the hair length in the scalp area to obtain calibrated hair length information of the target user;
[0069] Step S206, calibrating the initial hair distribution information according to the calibrated hair length information to obtain calibrated hair distribution information;
[0070] Step S207, based on the refined head point set, obtaining a target hairstyle from a preset NFT hairstyle database;
[0071] Step S208, using a clamp and a clipper to perform trimming based on the target hairstyle and the calibrated hair distribution information, to complete the haircut for the target user.
[0072] In an embodiment of the present invention, illustratively, the server controls the depth camera to start scanning the facial area of the target user. The depth camera emits infrared light or structured light, illuminates the user's face, and receives the reflected light. By calculating the flight time or phase difference of the light, the depth camera can obtain the distance between each point on the face and the camera, that is, the depth information. At the same time, the depth camera also captures the RGB image of the face, which contains rich color and texture information.
[0073] For example, when the depth camera scans a male target user, it first captures his forehead. The depth information shows the distance between each point on the forehead and the camera, and the RGB image shows details such as skin color and pores. Then the eye area is scanned, and the depth information accurately measures the degree of concavity of the eyes, and the RGB image clearly shows the outline of the eyes, the color of the eyelashes and the pupil. Then comes the nose, the depth information can depict the height of the bridge of the nose and the protrusion of the nose tip, and the RGB image shows the skin color and texture of the nose. Finally, the mouth and chin, the depth camera also obtains accurate depth and rich color texture information.
[0074] After receiving the depth information and RGB information, the server converts them into a basic facial point set through a specific algorithm. Each point contains three-dimensional coordinates (x, y, z) and corresponding color information (r, g, b). These point sets preliminarily outline the shape and features of the user's face.
[0075] The server controls the ultrasonic sensor to start detecting the target user's head. The ultrasonic sensor transmits ultrasonic waves to the head and receives the reflected sound waves. Based on the propagation time and intensity of the sound waves, the server can calculate the distance between each point on the head and the sensor, thereby constructing a basic head point set.
[0076] Taking a female target user as an example, the ultrasonic sensor starts detecting from the top of the head. When the ultrasonic wave encounters the skull, it will be reflected back. The server determines the position of the skull based on the reflection time and intensity and records it as a point. Then it moves downward in sequence, detecting the top of the forehead, the back of the head, the temples, etc., constantly acquiring new points, and gradually forming a basic skull point set. These point sets reflect the general shape and outline of the skull.
[0077] The server integrates the basic skull point set and the basic facial point set. First, the corresponding points of the two point sets are associated by matching the spatial coordinates. Then, the spatial surface fitting algorithm is used to smooth and optimize these points, fill in possible gaps and errors, and obtain a more complete and accurate head point set.
[0078] For example, for the male target user mentioned above, the server matches the point set obtained by facial scanning with the point set obtained by head detection. For the forehead, the points on the forehead in the facial point set are associated and fused with the points above the forehead in the head point set. For the back of the head, the points on the back of the head in the head point set are connected and optimized with the points above the neck in the facial point set. Through continuous adjustment and fitting, a continuous, smooth and accurate fine head point set is finally formed, which can accurately depict the shape and details of the user's head.
[0079] The server continues to control the depth camera to scan and analyze the target user's hair. The depth camera can capture the general shape and protrusion of the hair, and combined with the image processing algorithm, estimate the initial distribution information of the hair, including the approximate length, thickness and growth direction of the hair.
[0080] For example, for a female target user with long hair, the depth camera first scans the hair on the top of the head to estimate the thickness and length of the hair. Then, along the direction of hair growth, it gradually scans the hair on the sides and back of the head. By analyzing the depth information and shape of the hair in different areas, the server preliminarily determines the distribution of the hair, such as which areas have longer and thicker hair and which areas have shorter and thinner hair.
[0081] The server uses a machine vision algorithm to determine whether the hair is blocking the scalp area. If there is any blocking, the server controls the clamp to lift the blocking hair to expose the scalp area. Then, the scalp area is divided into multiple small areas to be processed.
[0082] For example, for a male target user with thick hair, the server finds that the hair above the forehead covers the scalp. The control fixture gently clamps this part of the hair to expose the scalp above the forehead. This area is then divided into several small squares as the scalp area to be processed.
[0083] For each scalp area to be processed, the server controls the clamp to clamp the hair through the robotic arm. The clamp moves along the normal direction of the head surface. When the friction force of the clamp on the hair reaches the preset threshold, the server determines that the hair is straightened. Then, the clamp continues to move in the normal direction. When the friction force on the hair changes suddenly, the server records the movement distance of the clamp as the calibration length of the hair in this area.
[0084] Assume that when processing the scalp area above the right temple, the clamp clamps the hair and moves in the normal direction. When the tension of the hair is significantly increased and reaches the preset friction threshold, the server determines that the hair has been straightened. Then the clamp continues to move, and suddenly the friction is sharply reduced. The server records the movement distance of the clamp at this time, for example, 5 cm, and then 5 cm is used as the calibration length of the hair in this area.
[0085] Alternatively, another calibration method is to use a clamp that, after straightening the hair, continues to move in the direction of force reduction until the clamp only has radial force. Then the clamp is controlled to move in the radial direction, and when the friction force of the hair changes suddenly, the distance the clamp moves is recorded as the calibration length.
[0086] By processing multiple scalp areas, the server can obtain accurate hair length information at different locations on the target user's head.
[0087] The server compares and integrates the previously obtained calibrated hair length information of each scalp area with the initial hair distribution information. The inaccurately estimated parts of the initial hair distribution information are corrected and adjusted according to the calibrated length, thereby obtaining more accurate calibrated hair distribution information.
[0088] For example, for the female target user mentioned above, the hair length of a certain area on the top of the head is estimated to be 30 cm in the initial hair distribution information, but the actual length obtained through calibration is 28 cm. The server will correct the hair length of this area to 28 cm in the initial distribution information. By calibrating and adjusting each area one by one, we can finally obtain complete and accurate calibrated hair distribution information, which fully reflects the actual length and distribution of the user's hair.
[0089] The server first analyzes the target user's facial features based on the detailed head point set, such as the size and position of the eyes, the shape of the nose, the width of the mouth, etc. Then it determines the user's identity information based on these facial features.
[0090] Assume that the server identifies a male target user with specific facial features and searches the preset NFT hairstyle database to see if there is a preset NFT hairstyle data corresponding to his identity information. If it exists, it will be directly used as the target hairstyle.
[0091] For example, if the database stores a short hairstyle that the user has previously selected, the server extracts it as the target hairstyle. If there is no corresponding hairstyle data in the database, the server responds to the user's operation, such as the user browses and selects a new hairstyle through a mobile phone APP, and the server uses the hairstyle selected by the user as the target hairstyle.
[0092] The server determines the facial features and head posture of the target user based on the refined head point set. Based on the facial features, the server delineates safe areas such as eyes and ears. During the trimming process, the server obtains changes in head posture in real time and makes adjustments based on the avoidance strategy for safe areas.
[0093] For example, when trimming hair near the ears, the server controls the clamp and the clipper to avoid the ear area to ensure that no harm is caused to the user. At the same time, according to the target hairstyle and the calibrated hair distribution information, the server accurately controls the clamp to pick up the hair that needs to be trimmed and operates the clipper to trim.
[0094] For the female target user mentioned above, if the target hairstyle is shoulder-length hair, the server will compare the current calibrated hair distribution information and calculate the length and position that needs to be trimmed. For example, if the hair in a certain area of the back of the head needs to be trimmed by 5 cm, the server will control the clamp to accurately clamp this part of the hair, and the trimmer will accurately cut the corresponding length to ensure that the trimmed hair meets the requirements of the target hairstyle. By constantly repeating this process, trimming various areas of the head, and finally completing the entire haircut process, creating an ideal hairstyle for the target user.
[0095] Throughout the haircutting process, the server always maintains precise control and data processing of each link to achieve efficient, safe and accurate AI-based automatic haircutting services.
[0096] In the embodiment of the present invention, scanning the facial area of the target user to obtain a basic facial point set may be implemented through the following example.
[0097] Use a depth camera to scan the target user's facial area to obtain facial depth information and facial RGB information;
[0098] Obtaining the basic facial point set according to the facial depth information and the facial RGB information;
[0099] The detecting the head of the target user to obtain a basic head point set includes:
[0100] Using an ultrasonic sensor to detect the head of the target user to obtain the basic head point set;
[0101] The step of combining and optimizing the basic skull point set and the basic facial point set to obtain a refined head point set includes:
[0102] The basic skull point set and the basic facial point set are used to perform spatial surface fitting to obtain the refined head point set.
[0103] In an embodiment of the present invention, exemplarily, the server starts a depth camera, and the infrared light or structured light of the depth camera is projected on the face of the target user. For a young male target user, when the light shines on his forehead, the depth camera can accurately measure the distance between each point on the forehead and the camera, forming the depth information of the forehead. At the same time, the camera also captures the RGB information of the forehead, clearly showing the skin color, pores and possible minor flaws. When the light moves to the eye area, the depth camera obtains the depth data of the eye, accurately reflects the protrusion of the eyeball and the contour of the eyelid, while the RGB information vividly shows the color of the eye, the distribution of eyelashes and the texture of the eyelid. When scanning the nose, the depth information depicts the height of the bridge of the nose and the shape of the nose tip, and the RGB information captures the skin color changes and surface gloss of the nose. Finally, when the light reaches the mouth and chin area, the depth camera measures the thickness of the lips and the contour of the chin, and the RGB information shows the color of the lipstick, lip lines and the skin color of the chin.
[0104] After receiving a large amount of facial depth information and RGB information from the depth camera, the server begins data processing. It associates the depth value and RGB value of each pixel and converts it into a point containing three-dimensional coordinates (x, y, z) and color (r, g, b). For example, for a pixel in the center of the forehead, its depth value indicates the distance of the point from the camera, combined with its position in the image (x, y), to form a three-dimensional coordinate, and its RGB value records the color of the point. By performing such processing on the pixels of the entire facial area, the server constructs a basic facial point set composed of many such points, which preliminarily outlines the shape and color features of the target user's face.
[0105] The server controls the ultrasonic sensor to start working and emit ultrasonic waves to the target user's head. For a female target user, when the ultrasonic wave encounters her skull, it will be reflected. The server calculates the distance between each point of the skull and the sensor based on the time and intensity of the reflected wave. For example, directly above the top of the head, the reflected wave received by the ultrasonic sensor indicates the specific value of the distance from the sensor at that point, and the server records it as a point. Then, the sensor detects the top of the forehead, the back of the head, the temple and other positions in turn, continuously acquiring new distance data, thereby constructing a basic head point set that reflects the shape and contour of the head.
[0106] The server imports the basic skull point set and the basic facial point set into a special algorithm. First, by matching coordinates, the corresponding points between the two point sets are found. For example, above the forehead, some points in the basic facial point set can correspond to the corresponding points in the basic skull point set. Then, the server uses a spatial surface fitting algorithm to smooth and optimize these points. Assuming that in the nose bridge area, the server fine-tunes the curve of the nose bridge according to the distribution of surrounding points to make it more natural and smooth. For the back of the head, by integrating the skull point set and the facial point set, possible gaps are filled to make the model of the entire head more complete and accurate. After repeated calculations and adjustments, the server finally obtains a fine head point set that can accurately depict every detail of the target user's head, including the overall shape of the head, subtle facial features, and the transition area between the skull and the face.
[0107] In the embodiment of the present invention, the determination of the scalp area may be implemented through the following examples.
[0108] Determine whether there is hair occlusion;
[0109] If so, the blocking hair is clamped by the clamp, and the scalp area is determined according to machine vision;
[0110] If not present, the scalp area is determined based on machine vision.
[0111] In an embodiment of the present invention, illustratively, when a customer walks into a barber shop, sits in a barber chair and prepares to receive an automatic haircut service based on artificial intelligence, the server starts the entire process.
[0112] The server first obtains the initial image of the customer's head through the cameras installed around the barber chair. These cameras can capture the customer's head from different angles, providing the server with comprehensive visual information.
[0113] The server analyzes these images using machine vision algorithms to determine whether there is any hair blocking the scalp area.
[0114] Assume that this is a female customer with long and thick hair. When analyzing the image, the server finds that the hair above her forehead, on both sides of her temples, and on the back of her head seriously obscures her scalp, making it impossible for the server to directly and clearly determine the boundaries and range of the scalp area.
[0115] Faced with this situation, the server controls the clamp installed on the robotic arm to start working. According to the server's instructions, the robotic arm accurately moves the clamp to the position where the hair is blocked. The clamp gently clamps the hair blocking the forehead and then lifts it up.
[0116] While the clamp is clamping the hair, the server continuously receives and analyzes the image data from the camera. Through the machine vision algorithm, the server can clearly see the scalp area above the forehead that was originally blocked by the hair. It can accurately identify the color, texture and transition area of the scalp with the surrounding hair, thereby accurately determining the scope and boundaries of this part of the scalp area.
[0117] Then, the robot arm moves the clamp to the temples on both sides and repeats the action of clamping the hair. Similarly, the server determines the scalp area at the temples on both sides through real-time image analysis.
[0118] For the hair blocking the back of the head, the robotic arm operates the clamp again to pick up the hair, and the server uses this to determine the scalp area at the back of the head.
[0119] However, if the customer is a male with shorter, thinner hair, the server will find that the hair does not significantly obstruct the scalp area when analyzing the initial image.
[0120] In this case, the server directly processes the image through a machine vision algorithm, which can clearly identify the scalp area of each part of the customer's head, including the top of the head, forehead, sides and back of the head, without the need to clamp the hair with a clamp.
[0121] For example, the server can accurately outline the boundaries of the scalp area by analyzing the differences in color, texture, and brightness between the scalp and hair. For the top of the head, the server can determine the range of the scalp based on the distribution and sparseness of the hair. In the forehead area, it can distinguish the transition zone between the forehead skin and the hair, thereby clearly defining the starting position of the scalp. For the sides and the back of the head, the corresponding scalp area is also determined through detailed analysis of the image.
[0122] Whether it is to determine the scalp area by clamping the hair with a clamp or directly determining it based on an unobstructed image, the server can accurately and comprehensively grasp the scalp area information of various parts of the customer's head, providing a key basis for subsequent hair length calibration and haircutting operations. Throughout the process, the server always maintains efficient data processing and precise control to ensure that each step can be carried out accurately and without error, so as to provide customers with satisfactory haircutting services.
[0123] Suppose a new customer comes in with a medium-length hairstyle, with some areas obscured by hair. The server first makes a preliminary judgment on the image and finds that the hair on the top of the head is relatively short and does not obstruct the scalp, but the sides and back of the head are obscured to a certain extent.
[0124] The server controls the robotic arm to first clip the hair on both sides. During this process, the camera continuously captures real-time images, and the server accurately determines the area range of the scalp on both sides based on the scalp features revealed in the image, such as skin color, pore distribution, and blood vessel patterns.
[0125] Then, the robot arm moves the clamp to the back of the head and repeats the action of clamping the hair. The server analyzes the newly acquired image and identifies the specific location and boundary of the scalp at the back of the head.
[0126] For the area on the top of the head that is not blocked by hair, the server directly determines the exact range of this part of the scalp through a detailed analysis of the color, texture and brightness in the image.
[0127] For example, a customer with thick curly hair comes in. When the server analyzes the initial image, it finds that almost the entire scalp is severely obscured by the hair.
[0128] Under the control of the server, the robot arm first operates the clamp above the forehead. Because the hair is curly, the clamp needs to clamp the hair more carefully to avoid pulling and causing discomfort to the customer. The server continues to receive image data, and as the hair is gradually clamped, it can gradually determine the area of scalp above the forehead.
[0129] Then, the robotic arm moves to the sides, back of the head and top of the head in turn. Each time the clamp is operated to clamp the hair, the server performs precise image analysis and ultimately determines all scalp areas.
[0130] By continuously handling customers with various hair styles and hair conditions, the server has accumulated rich experience and is able to determine the scalp area more quickly and accurately, laying a solid foundation for providing high-quality AI-based automatic haircutting services.
[0131] In the embodiment of the present invention, the hair length calibration is performed in the scalp area using a clamp to obtain the calibrated hair length information of the target user, which can be implemented through the following examples.
[0132] Dividing the scalp area into a plurality of scalp areas to be treated;
[0133] Controlling the clamp to clamp the hair of a target scalp area by a mechanical arm, wherein the target scalp area is any one of the multiple scalp areas to be processed;
[0134] Controlling the fixture to move along the normal direction of the head surface by a mechanical arm;
[0135] When the hair friction force of the clamp reaches a preset hair friction force threshold, it is determined that the clamp straightens the hair in the target scalp area;
[0136] The clamp is controlled by a mechanical arm to continue to move along the normal direction of the head surface. When the hair friction force of the clamp changes suddenly, the moving distance of the clamp is recorded as the calibrated hair length information of the target scalp area.
[0137] In the embodiment of the present invention, for example, when a customer sits on a barber chair, the server starts the hair length calibration process. First, the server divides the customer's scalp area into multiple scalp areas to be processed. Assume that the entire scalp area is evenly divided into multiple areas such as the forehead, the top of the head, the sides and the back of the head.
[0138] The server selects the forehead as the target scalp area to start calibration. Under the precise control of the server, the robotic arm moves the clamp and clamps the hair in the forehead area.
[0139] According to the instructions from the server, the robot arm controls the fixture to move along the normal direction of the head surface. At this time, the friction between the fixture and the hair gradually increases.
[0140] Assuming that the preset hair friction threshold is a certain value, when the clamp moves, the server monitors in real time that the hair friction of the clamp reaches the preset threshold, and determines that the clamp has straightened the hair in the target scalp area.
[0141] Then, the robot arm continues to control the fixture to move along the normal direction of the head surface. The server continuously monitors the friction force of the fixture on the hair.
[0142] For example, for a male customer with hard hair, when the clamp continues to move, the server suddenly detects a sudden change in the friction force of the clamp on the hair, that is, the friction force decreases sharply. This indicates that the clamp has reached the end of the hair. The server immediately records the movement distance of the clamp at this time and uses it as the calibration hair length information of the target scalp area of the forehead.
[0143] The server then selects the top of the head as the next target scalp area for calibration. The robotic arm again accurately operates the clamp to clamp the hair in the top area and repeats the previous steps.
[0144] The robotic arm controls the fixture to move along the normal direction of the head surface, and the server monitors that the friction force of the fixture on the hair reaches the preset threshold, confirming that the hair is straightened.
[0145] The server continues to move the fixture and pays close attention to the changes in the friction of the hair. For this male customer, probably because the hair on the top of his head is relatively short, the server quickly detects the sudden change in friction and then records the movement distance of the fixture as the calibration hair length information for the top of the head area.
[0146] Next is the scalp area on both sides. The robot arm operates the clamp to clamp the hair and moves in the normal direction.
[0147] For a female customer with smoother hair, the server may need to make a more discerning judgment when monitoring the friction. When the preset threshold is reached and the clamp continues to move, the server detects a slight change in the friction of the hair and records the distance the clamp moves in time, thereby determining the hair calibration length information of the scalp area on both sides.
[0148] Finally, the back of the head is moved. The robot arm controls the clamp to clamp the hair, and the same process is repeated.
[0149] If a customer has layered hair of varying lengths, the server may have to make multiple adjustments and judgments while monitoring the friction, but will eventually be able to accurately record the distance the clamp moves in the back of the head as the calibrated hair length information for that area.
[0150] By sequentially operating and precisely monitoring each scalp area to be treated, the server successfully obtains the calibrated hair length information of different areas of the customer's entire head, providing accurate data support for subsequent haircutting operations.
[0151] Let's assume that another customer has curled hair. When the server calibrates the forehead area, the robot arm controls the fixture to clamp the hair and move it in the normal direction. When the hair friction reaches the threshold and continues to move, the server must pay special attention to the characteristics of the friction change caused by the curling of the hair. It may take more careful judgment to accurately capture the sudden change in friction and record the accurate calibrated hair length.
[0152] For the top of the head, since the hair is more fluffy after curling, the server needs to comprehensively consider the actual length of the hair and the impact of the fluffiness during the monitoring process to ensure that the recorded calibration length accurately reflects the real length of the hair.
[0153] When processing the two sides, you may encounter hair of different lengths. The server monitors the friction in real time and continuously adjusts the control of the robotic arm to ensure that the clamp can accurately measure the end of the hair and obtain reliable calibration length information.
[0154] For the back of the head area, since the customer's sitting position and head posture may change, the server needs to consider the impact of these factors on the hair length measurement. By constantly adjusting the position of the robotic arm and controlling the movement of the fixture, the accurate calibrated hair length is finally obtained.
[0155] Through meticulous treatment and precise measurement of different types of customer hair, the server is able to provide each customer with personalized and accurate hair length calibration, laying a solid foundation for achieving ideal haircut results.
[0156] In the embodiment of the present invention, the hair length calibration is performed in the scalp area using a clamp to obtain the calibrated hair length information of the target user, which can be implemented through the following examples.
[0157] Dividing the scalp area into a plurality of scalp areas to be treated;
[0158] Controlling the clamp to clamp the hair of a target scalp area by a mechanical arm, wherein the target scalp area is any one of the multiple scalp areas to be processed;
[0159] Controlling the fixture to move along the normal direction of the head surface by a mechanical arm;
[0160] When the hair friction force of the clamp reaches a preset hair friction force threshold, it is determined that the clamp straightens the hair in the target scalp area;
[0161] The clamp is controlled by a robotic arm to continue moving in the direction of force reduction. When the clamp only has radial force acting on it, the clamp is controlled to move in the radial direction. When the hair friction force of the clamp changes suddenly, the moving distance of the clamp is recorded as the calibrated hair length information of the target scalp area.
[0162] In the embodiment of the present invention, for example, when a customer walks into a barbershop and sits down to get a haircut, the server starts the hair length calibration process. First, the server divides the customer's scalp area into multiple scalp areas to be processed, such as the left side of the forehead, the right side of the forehead, the front of the top of the head, the middle of the top of the head, the back of the top of the head, the left side of the head, the right side of the head, the left back of the head, the right back of the head, and other areas.
[0163] The server selects the target scalp area on the left side of the forehead as the starting point for calibration. Under the precise command of the server, the robotic arm moves the clamp and accurately clamps the hair in this area.
[0164] Then, the robot arm controls the fixture to move along the normal direction of the head surface according to the server's instructions. During this process, the server closely monitors the changes in the friction between the fixture and the hair.
[0165] Assume that the preset hair friction threshold is a standard value obtained based on a large number of experiments and data analysis. When the clamp moves, the server detects that the hair friction of the clamp gradually increases until it reaches the preset hair friction threshold. At this time, the server determines that the clamp has straightened the hair in the target scalp area.
[0166] Then, the server controls the robot arm to adjust the movement direction of the fixture, so that the fixture continues to move in the direction of reduced force. The server continuously monitors the force on the fixture, and when the force on the fixture is only radial force, the server controls the robot arm again to move the fixture in the radial direction.
[0167] For example, for a male customer with coarse hair, the server suddenly detects a sudden change in the friction force of the clamp on the hair during the movement of the clamp in the radial direction. This means that the clamp has reached the end of the hair. The server quickly and accurately records the movement distance of the clamp at this time and uses it as the calibration hair length information for the target scalp area on the left side of the forehead.
[0168] Next, the server switches the target to the scalp area on the right side of the forehead. Under the precise control of the server, the robotic arm operates the clamp to clamp the hair in this area again, and then repeats the previous steps. The clamp moves along the normal direction of the head surface, and the server detects that the friction force reaches the threshold and determines that the hair is straightened. The clamp then moves in the direction of force reduction until only radial force is applied, and then moves in the radial direction. When the server detects a sudden change in friction force, the movement distance is recorded as the calibration hair length of the right forehead area.
[0169] For the front area of the top of the head, the robot arm clamps the hair and performs calibration operations under the control of the server. The server accurately controls the movement and direction adjustment of the clamp based on the real-time monitoring of friction data. For a female customer with fine hair, the server may need to be more sensitive to the change in friction to ensure accurate judgment of whether the hair is straightened and when it reaches the end.
[0170] When processing the middle area of the top of the head, you may encounter uneven hair distribution. The server continuously receives real-time data from the robot arm and fixture, dynamically adjusts the control strategy to ensure the accuracy of calibration. When the fixture moves radially and a sudden change in friction occurs, the server records the movement distance in time and obtains accurate calibration hair length information.
[0171] The same is true for the calibration of the back area of the top of the head. The server flexibly controls the movement of the robotic arm and the clamp according to the characteristics of the hair of different customers, accurately captures the moment of friction force mutation, records the corresponding movement distance, and completes the hair length calibration of the area.
[0172] Then comes the left side of the head. The robotic arm precisely grasps the hair and performs a series of complex movements and direction adjustments under the command of the server. The server pays close attention to the friction data and records the movement distance at the right time as the calibration hair length for that area.
[0173] During the calibration process of the right head area, hair may get tangled. The server analyzes the change of friction in real time, adjusts the action of the fixture in time, and untangles the hair to ensure the smooth progress of the calibration. When a sudden change in friction is detected, the movement distance is accurately recorded.
[0174] For the left back of the head, since the customer's head posture may have a certain impact on the calibration, the server will take these factors into consideration and accurately control the movements of the robot arm and the fixture. When the fixture moves radially and a sudden change in friction occurs, the movement distance is recorded to complete the calibration.
[0175] The calibration of the right back of the head area is the last step of the whole process. The server still maintains high concentration and precise control to ensure that accurate calibration hair length information is obtained.
[0176] Through careful operation and precise monitoring of each scalp area to be treated, the server successfully completed a comprehensive and accurate hair length calibration for the customer, providing crucial accurate data support for subsequent haircutting operations.
[0177] Let's assume that another customer's hair has been specially treated with a unique texture and elasticity. When calibrating the left forehead area, the server needs to more finely adjust the speed and direction of the clamp according to the real-time monitoring of the friction change. When the preset friction threshold is reached and the direction of movement changes, the server continues to pay attention to the change of radial force to ensure that the clamp is controlled to move radially at the right time.
[0178] For the front area of the top of the head, if the customer's hair is obviously layered, the server needs to process the different layers of hair separately when controlling the clamp for calibration to obtain the accurate length information of each layer.
[0179] When processing the left side of the head, the hair may be tangled. The server analyzes the friction data in real time and instructs the robot arm and the clamp to cleverly avoid the tangled area, or to untie the tangled area before performing the calibration operation.
[0180] For the right back of the head area, if the customer moves his head slightly during the calibration process, the server will quickly recalculate and adjust the movement path and force of the fixture based on the new head position and posture data to ensure the accuracy of the calibration results.
[0181] By constantly dealing with various complex hair conditions and individual differences of customers, the server is able to complete the hair length calibration work with a high degree of accuracy and adaptability, laying a solid foundation for providing high-quality and personalized haircutting services to every customer.
[0182] In the embodiment of the present invention, the target hairstyle is obtained from a preset NFT hairstyle database based on the refined head point set, which can be implemented through the following example.
[0183] Determining facial features information of the target user based on the refined head point set;
[0184] Determining the identity information of the target user according to the facial features information;
[0185] Determine whether there is preset NFT hairstyle data corresponding to the identity information in the preset NFT hairstyle database;
[0186] If yes, the preset NFT hairstyle data corresponding to the identity information is used as the target hairstyle;
[0187] If not, the target hairstyle is obtained from the preset NFT hairstyle database in response to the user operation.
[0188] In the embodiment of the present invention, for example, after the server obtains the refined head point set, it immediately starts to perform in-depth analysis on the data to determine the facial features of the target user. Assume that a female user is sitting in a barber chair, and the refined head point set received by the server contains the precise position and shape information of each part of her face.
[0189] The server uses complex algorithms and pattern recognition technology to extract key features of the facial features from these point sets. For example, by analyzing the point set around the eyes, the size, shape and position of the eyes can be determined; based on the point set in the nose area, the height, width and curve of the nose bridge can be determined; and through the point set in the mouth and chin area, the thickness of the lips and the contour of the chin can be understood.
[0190] After determining the facial features, the server further determines the target user's identity based on these features. This may involve comparing with an existing user database or applying a specific identity recognition algorithm. For example, based on the unique facial features and combination of the female user, the server determines that she may be a registered user named "Ms. Li" who has a record of her preferred hairstyle.
[0191] Next, the server will check the preset NFT hairstyle database to determine whether there is preset NFT hairstyle data corresponding to the identity information of "Ms. Li". Assume that the database does contain data of a fashionable short hairstyle that Ms. Li has previously selected and saved.
[0192] After the server confirms that the corresponding hairstyle data exists, it extracts the preset NFT hairstyle data as the target hairstyle for Ms. Li's haircut. Then, the server begins to plan the specific steps and operations of the haircut based on the target hairstyle and the hair length information obtained previously.
[0193] However, if the server does not find the preset NFT hairstyle data related to the identity information corresponding to the facial features of the current target user in the database, it will immediately switch to response mode.
[0194] For example, for a new user, Mr. Wang, the server does not find his relevant hairstyle record in the database. At this time, the server will communicate with Mr. Wang through the interactive device (such as touch screen, voice prompt, etc.) in the barber shop.
[0195] Mr. Wang may browse various hairstyle examples in the preset NFT hairstyle database through the touch screen. When he sees a business short hairstyle that he likes, he clicks to select it. After receiving Mr. Wang's selection operation, the server extracts the hairstyle he selected from the database as the target hairstyle for this haircut.
[0196] Alternatively, Mr. Wang may tell the server the hairstyle he wants by voice, such as "I want a medium-length hair with layers". Based on Mr. Wang's description, the server will select several hairstyles that meet this description from the preset NFT hairstyle database and show them to Mr. Wang. Mr. Wang finally selected one of them, and the server identified it as the target hairstyle, and then entered the subsequent haircut preparation stage.
[0197] For example, another new user, Ms. Zhao, walks into the barber shop. The server determines her identity by analyzing her facial features, but does not find any relevant hairstyle records in the database. Ms. Zhao connects to the server through the mobile app and selects a romantic curly hairstyle from the more hairstyle options provided on the app. The server receives the selection information from Ms. Zhao's mobile phone, sets the selected hairstyle as the target hairstyle, and starts preparing for the haircut.
[0198] In this way, the server can accurately and flexibly obtain the appropriate target hairstyle from the preset NFT hairstyle database based on the target user's facial features and identity, and provide personalized hairdressing services for each user.
[0199] In the embodiment of the present invention, the use of a clamp and a clipper to perform trimming based on the target hairstyle and the calibrated hair distribution information to complete a haircut for the target user may be implemented through the following examples.
[0200] Based on the refined head point set, determining facial features information and head posture of the target user;
[0201] Determine a safe area based on the facial features information;
[0202] Based on the avoidance strategy for the safety area, the head posture is acquired in real time, and the haircut for the target user is completed by trimming the hair based on the target hairstyle and the calibrated hair distribution information using a clamp and a clipper.
[0203] In the embodiment of the present invention, for example, after the server obtains the target hairstyle and calibrated hair distribution information, it first determines the facial features and head posture of the target user based on the fine head point set. Assuming that a male target user is sitting on a barber chair, the server can clearly obtain his facial features such as the position of his eyes, the shape of his ears, the outline of his nose, and the specific position of his mouth through in-depth analysis of the fine head point set. At the same time, using sensors installed on and around the barber chair, the head posture of the user's head, such as the current tilt angle, rotation direction, and pitch degree, is monitored in real time.
[0204] Based on the facial information obtained, the server quickly determines the safe area. For example, the area around the eyes, above and around the ears, and around the nostrils and mouth are all designated as safe areas. These areas need to be handled with special care during the haircut to avoid causing harm to the user.
[0205] Next, based on the avoidance strategy for these safe areas, the server starts to obtain head posture in real time. Suppose when trimming the hair above the ear, the server continues to receive data from the sensor and learns that the user's head suddenly turns slightly to the right.
[0206] To ensure safety, the server immediately adjusts the movement of the robotic arm. The clamp and shears that were originally prepared to move above the ear pause and wait for the user's head posture to stabilize or adjust to a suitable position. Once the server confirms that the user's head posture is stable and in a safe state, the robotic arm starts again.
[0207] The clamp accurately clamps the hair that needs to be trimmed, and according to the calibrated hair distribution information and the requirements of the target hairstyle, the server controls the clamp to move the hair to the appropriate position. For example, if the target hairstyle requires the hair at this position to be cut 3 cm shorter, the server accurately calculates the distance the clamp needs to move to ensure that the hair is stretched to the correct length.
[0208] Then, the clippers start working and precisely cut off the excess hair. During this process, the server always keeps monitoring the head posture and is ready to respond to possible changes at any time.
[0209] Suppose that when trimming the hair on the back of the head, the server finds that the user is a little tired because of maintaining the same posture for a long time, and the head unconsciously leans forward. The server responds immediately and controls the clamp to temporarily loosen the hair to avoid trimming in the wrong position. At the same time, the server guides the user to adjust the head posture through voice prompts, and the trimming operation can be continued after the user returns to the appropriate posture.
[0210] For hair trimming on the top of the head, the server accurately controls the coordination of the clamp and the clipper based on the real-time head posture and calibrated hair distribution information. If the target hairstyle requires a layered look on the top of the head, the server will clip and trim the hair in sequence according to the predetermined layer lengths to ensure that each trimming is in line with the design of the target hairstyle.
[0211] During the entire haircut process, the server repeats this operation. When processing hair in different areas, it always determines the safe area based on the facial features information, combines the head posture obtained in real time, flexibly adjusts the movements of the clamps and shears, and gradually completes the haircut for the target user.
[0212] For example, for a female target user, when trimming the bangs area, the server determines the eyes as a key safety area based on the facial features. When the user's head shakes slightly due to blinking or unconscious facial movements, the server responds quickly, suspends the trimming operation, and continues after the head stabilizes.
[0213] For trimming the hair on both sides, the server closely monitors the left and right rotation of the user's head to ensure that the clamps and clippers do not accidentally touch the ears. If the user answers a phone call during a haircut and tilts his head to one side, the server will immediately stop the current trimming action and wait for the user to return to normal posture.
[0214] When the trimming process is nearing the end, the server will make final adjustments and improvements to some details. For example, it will check whether the hairline is neat and the hair near the ears is trimmed properly. If there are any areas that do not meet the target hairstyle and calibrated hair distribution information, the server will control the clamps and shears to make fine adjustments again until the ideal haircut effect is achieved.
[0215] Finally, the server successfully completed the haircut for the target user and created a hairstyle that met the user's expectations. Throughout the process, the server accurately judged the facial features and safety areas, and responded to the head posture in real time, achieving efficient, safe and accurate haircut services.
[0216] Suppose another young male user comes for a haircut. After determining the facial features and the safe area, the server begins the trimming process. When the user's hair is trimmed to the sideburns, he turns his head to communicate with the barber. The server immediately senses this change and stops the clamps and clippers to avoid accidental injuries. When the user faces forward again, the server continues trimming, accurately processing each hair according to the target hairstyle and calibrated hair distribution information.
[0217] For the lower back of the head, the user may tilt their head back due to the adjustment of sitting posture. The server responds promptly, suspends trimming, and quickly resumes work after the user restores the appropriate posture, ensuring that every trimming is accurate.
[0218] When processing the hair near the whorl on the top of the head, due to the special growth direction of the hair, the server cleverly controls the clamps and clippers based on the real-time head posture and finely calibrated hair distribution information, so that the trimmed hair meets the requirements of the target hairstyle and is natural and smooth.
[0219] By constantly responding to various situations, the server can provide satisfactory hairdressing services to every user, demonstrating a high degree of intelligence and precision.
[0220] In order to describe the solution provided by the embodiment of the present application in detail, a more detailed implementation process is provided below.
[0221] This program mainly includes:
[0222] Depth camera is used to estimate head parameters (such parameters include facial point cloud, facial features, posture information, etc.). There can be multiple depth cameras, fixed around the person to be haircut, to estimate the head posture of the person to be haircut from multiple angles in real time. Or it can be fixed on a robotic arm, which can freely adjust the angle through the robotic arm to estimate the head parameters from different angles.
[0223] Robotic arm, clamp, clipper, ultrasonic detection module. The robotic arm is equipped with a clamp, clipper and ultrasonic detection module. The clamp is used to estimate the length of hair, the clipper is used to trim hair, and the ultrasonic wave is used to estimate the parameters of the head model.
[0224] Specific steps:
[0225] 1. Head surface estimation:
[0226] For head estimation, the face is first scanned to obtain facial point cloud information. This step can be completed using a depth camera or a binocular camera. Taking a depth camera as an example, when a depth camera scans a human face, it has both depth information and RGB information. The facial point cloud information can be obtained from the depth information, and the facial features can be identified from the RGB image through an artificial intelligence algorithm (such as using a face-parsing semantic segmentation model to segment the facial features). For a depth camera, the depth information is aligned with the RGB information, and the depth information and RGB information can be matched to obtain the spatial point cloud information of each major area (facial features) of the face.
[0227] Then use a robotic arm to touch the head or use an ultrasonic sensor to detect the head to obtain a discrete spatial point set of the head. After obtaining the two point sets, the head contour is estimated for the head scattered point set and the facial point cloud is corrected and spliced. Here, since the human skull is a continuous smooth surface, the spatial information of the entire head can be obtained by spatial surface fitting. After obtaining the head parameters, the facial features information can be refined, and finally a relatively detailed and complete head parameter information can be obtained.
[0228] Facial point set R1 = {R1(x,y,z)|-∞ <x,y,z<+∞}
[0229] 2. Estimation of hair body distribution and length distribution:
[0230] Different areas of the human head are divided visually. Here, if the hair is too long and blocks part of the facial area, a robotic arm or a human can be used to push the hair that interferes with the visual algorithm to reveal the target area. For example, sometimes when combing hair, bangs easily block the forehead area. In this case, the hair can be combed up manually or by a robotic arm with a comb to completely expose the boundary between the forehead and the scalp area.
[0231] Skull point set R2 = {R2(x,y,z)|-∞ <x,y,z<+∞}
[0232] Facial point set R3 = {R1(x,y,z)∪R2(x,y,z)|-∞ <x,y,z<+∞}
[0233] Hair skin area R4 = {R4(x,y,z)∈R3|-∞ <x,y,z<+∞}
[0234] Head rotation position P n = {P n (x,y,z)∈R3|-∞ <x,y,z<+∞,n∈N}
[0235] In addition, the facial features should also be located, and the mouth, nose, eyes, ears, eyebrows and other areas should be divided into regions, as well as the beard area.
[0236] Eyebrow Point Set R 眉 = {R5(x,y,z)|-∞ <x,y,z<+∞}
[0237] Mouth point set R 口 ={R6(x,y,z)∪R2(x,y,z)|-∞ <x,y,z<+∞}
[0238] Nose area R 鼻 ={R7(x,y,z)∈R3|-∞ <x,y,z<+∞}
[0239] Eyes 眼 ={R8(x,y,z)∈R3|-∞ <x,y,z<+∞}
[0240] Ear 耳 ={R9(x,y,z)∈R3|-∞ <x,y,z<+∞}
[0241] These areas are acquired mainly for the following reasons:
[0242] Used to estimate head pose.
[0243] There are many methods for estimating head posture through key point detection. The main estimation method is to estimate by finding key points on the face, such as key points near the eyes, nose, and mouth.
[0244] Matching is performed through 3D point cloud. Assuming that the head parameter information of the corresponding person is available (for example, using the NFT data of 202410204206.X), the head posture information can be estimated through point cloud matching.
[0245] Prevent damage to relevant parts when trimming hair, especially eyes, eyebrows and ears.
[0246] Since the robot is trimming the hair, there should be certain avoidance strategies when dealing with the more vulnerable areas of the face. For example, when the robot trims the hair near the ears, it needs to detect the ear position in real time to prevent accidental damage to the ears, or reserve a certain safe area for manual repair.
[0247] For hair estimation, visible light and depth camera can be used to estimate the detailed information of hair, such as growth direction, length and other detailed information. However, the hair information estimated by this method is affected by factors such as illumination and depth camera signal noise and occlusion between hair, and there will be a certain estimation deviation. Therefore, it is necessary to correct the estimation result. The combing module combines the head parameters and the robot arm parameters to obtain the hair length at different scalp positions. Since hair is a dense target, sampling can be used for distribution and length estimation. The distribution state is matched with the head parameters to obtain the length of hair in each part. The storage format of the hair model is the analytical equation of the hair bundle position and the hair bundle three-dimensional space.
[0248] The design of the combing module in this scheme is shown below. In order to facilitate the explanation of the working principle of the combing module, a two-dimensional plane is used as an example, which can be directly extended to three-dimensional space.
[0249] The clamp is a force-sensing clamp, which is fixed on the mechanical arm. When the clamp clamps the hair on the scalp (usually a tuft of hair is clamped here, and the information obtained is also the overall information of a tuft of hair), the length and position information of the clamped hair can be analyzed according to the force of the clamp. Assume that the center of the human head is the origin.
[0250] First, we analyze the length of the hair. There are two ways to estimate it.
[0251] Length estimation method 1, please refer to Figure 2 :
[0252] After the clamp clamps the hair, the robot arm controls the clamp to move in the normal direction of the head surface (red dashed arrow in the figure). When the friction force of the clamp on the hair is greater than a certain value f, the hair is considered to have been straightened, and the force of the clamp at that moment is recorded. The robot arm continues to control the clamp to move in the normal direction and continuously records the force of the clamp. The moment before the friction force of the clamp suddenly changes is when the clamp clamps the end of the hair.
[0253] In order to explain the length estimation method more concisely, an approximate method is used to illustrate it in two-dimensional space. First, assume that the head in the above figure is a standard circle, and the positions of the hair growth point and the point where the clamp clamps the hair on the head are P and P respectively. i , P j , the initial position of the fixture is P m The process is as follows:
[0254] Step 1: Get P j Coordinates. The head posture is determined by the depth camera, and the position O of the center of the head is obtained. O is used as the reference coordinate system, and the point at the end of the fixture is P m (x m,y m ). For simplicity, we can only consider the two-dimensional plane. Assuming that the head is round, the head equation is ax2+by2=r2 (a, b are constants, and the equation is the curve equation fitted from the head point cloud, which is an approximation of the head surface). Then OP m The intersection point with the head equation can be solved as P j (x j ,y j ).
[0255] Step 2: Get P n Coordinates. The fixture is along OP m When the clamp moves in the same direction as the hair, it will be subject to friction from the hair. At this time, the position of the clamp vertex is P n (x n ,y n ).
[0256] Step 3, step 2 to get P n (x n ,y n ) coordinates, the fixture is subjected to the friction of the hair, and the friction is sensed by the mechanical sensor on the fixture as P n P m The component of force in the direction perpendicular to P n P m The component of force in the direction of n (x n ,y n ) is the starting point, and the intersection of the straight line with the direction vector of the resultant force on the fixture and the head is P i (x i ,y i )point.
[0257] Step 4: The fixture continues along OP m Move in the same direction and record the position P of the fixture before the friction of the hair disappears. k (x k ,y k ), as well as the force conditions at that time. In addition to continuously recording the force conditions during the movement to correct the position estimation error of the Pi point, it is also necessary to calculate the position change of the head and place the head in the OP m The offset component Δd head in the direction is removed from the motion direction of the fixture. The length of the hair near the Pi region is |P k P i |.
[0258] Length estimation method 2, please refer to Figure 3 :
[0259] After the clamp clamps the hair, the robot arm controls the clamp to move in the normal direction of the head surface (red dashed arrow in the figure). When the friction force of the clamp on the hair is greater than a certain value f, it is considered that the hair has been straightened at this time, and the force of the clamp at this moment is recorded. The robot arm continues to control the clamp to move in the direction of reducing the lateral force, and continuously records the force of the clamp until the clamp only has radial force. After that, the clamp moves in the radial direction and continuously records the force of the clamp. The position of the clamp when the friction force suddenly changes is the end of the currently clamped hair bundle.
[0260] Step 1: Get P j Coordinates. The head posture is determined by the depth camera, and the position O of the center of the head is obtained. O is used as the reference coordinate system, and the point at the end of the fixture is P m (x m ,y m ). For simplicity, we can only consider the two-dimensional plane. Assuming the head is round, the head equation is ax 2 +by 2 =r 2 (a, b are constants, and the equation is the curve equation fitted from the head point cloud, which is an approximation of the head surface).
[0261] Step 2: Get P n Coordinates. The fixture is along OP m When the clamp moves in the same direction as the hair, it will be subject to friction from the hair. At this time, the position of the clamp vertex is P n (x n ,y n ). At this time, the fixture is subjected to P j P n The force in the direction perpendicular to P j P n Direction of force.
[0262] Step 3: Adjust the fixture to make it perpendicular to P j P n The force in the direction is the smallest, and the position of the fixture is recorded as P c .P c The intersection point of O and the head equation is denoted as P i .
[0263] Step 4: The fixture continues along OP c Move in the same direction and record the position P of the fixture before the friction of the hair disappears. k (x k ,y k ) and the force conditions at that time. During the exercise process, it is necessary to continuously record the force conditions and keep it perpendicular to the OP c The force in the direction is the smallest. In addition, the position change of the head needs to be calculated and the head needs to be placed in the OP mThe offset component Δdhead in the direction is removed from the motion direction of the gripper. The length of the hair near the Pi region is |PkPi|.
[0264] The head is divided into different grid areas. When the length of the hair strand at a certain position on the head is estimated, the length of the position can be regarded as the length of the hair in the grid area to which the position belongs. Figure 4 In the left and right grids, the black dots are the locations where the hair strand length is estimated, and the square area is the grid area to which the two black dots belong. The length of the hair at the black dots is the length at the grid.
[0265] Expected hairstyle:
[0266] The expected hairstyle distribution can be generated manually, such as a hair stylist using the NFT of the customer's head information to customize the hairstyle (for example, using the NFT data of 202410204206.X). The main purpose is to obtain a reference model that is the same as the aforementioned gridded hair length representation method. The model records the hair length and other characteristics (such as hair color, curvature, etc.) of the target hairstyle in various areas of the head.
[0267] By comparing the parameters of the expected hairstyle with the current head state, the difference between the hair length at a certain grid position of the current head and the length of the target hairstyle can be calculated. This length difference is the hair part that needs to be removed. This length can be directly obtained from the difference between the hair length at different positions estimated before and the hair length at the corresponding position of the target hairstyle at the head shape. To intuitively express the comparison between the target hairstyle length at a certain position and the actual hair length, please refer to Figure 5 , Figure 5 The relationship between the target length and the actual length under two different hair length estimation methods. Assume that PiPe is the hair length value of the expected hairstyle at point Pi, and the hair part in the wireframe is the excess part that needs to be cut off.
[0268] Compute hair volume differences and perform directed pruning procedures:
[0269] According to the hair length distribution of different head positions of the expected hairstyle estimated above and the estimated actual hairstyle length, the amount of hair that needs to be cut at different parts of the head can be obtained. At this time, the hair cutting operation can be performed.
[0270] Hair cutting involves two main steps:
[0271] 1. Clamp the hair to be cut. The steps here are the same as the length estimation steps, except that the clamp will stop when it clamps the hair and moves to the target length.
[0272] 2. Perform trimming. The parts on the clamp with cutting function, such as electric scissors or laser cutting parts, can trim the hair directly at the end of the clamp.
[0273] Because the length value at a point is used as the length of the head mesh area, in order to ensure the consistency of the length within the mesh, it is necessary to randomly clip the hair belonging to the mesh area for multiple times for trimming. During the trimming process, the head posture needs to be estimated in real time to compensate for the trimming error.
[0274] Please refer to Figure 6 , Figure 6 An automatic hair cutting device 110 based on artificial intelligence provided by an embodiment of the present invention includes:
[0275] An acquisition module 1101 is used to scan the facial area of the target user to obtain a basic facial point set;
[0276] The head of the target user is detected to obtain a basic head point set; the basic head point set and the basic facial point set are combined and optimized to obtain a refined head point set; the basic hair of the target user is estimated using a depth camera to obtain initial hair distribution information; the scalp area is determined, and the hair length is calibrated in the scalp area using a fixture to obtain the calibrated hair length information of the target user; the initial hair distribution information is calibrated according to the calibrated hair length information to obtain calibrated hair distribution information; based on the refined head point set, a target hairstyle is obtained from a preset NFT hairstyle database;
[0277] The trimming module 1102 is used to perform trimming based on the target hairstyle and the calibrated hair distribution information using a clamp and a clipper to complete a haircut for the target user.
[0278] It should be noted that the implementation principle of the aforementioned automatic haircutting device 110 based on artificial intelligence can refer to the implementation principle of the aforementioned automatic haircutting method based on artificial intelligence, and will not be repeated here. It should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the automatic haircutting device 110 based on artificial intelligence can be a separate processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The implementation of other modules is similar. In addition, these modules can be fully or partially integrated together, or they can be implemented independently. The processing element described here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0279] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (digital signal processors, DSP), or one or more field programmable gate arrays (FPGA), etc. For another example, when a module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0280] The embodiment of the present invention provides a computer device 100, which includes a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device 100 executes the aforementioned automatic haircutting device 110 based on artificial intelligence. Figure 4 As shown, Figure 4The computer device 100 provided in the embodiment of the present invention is a structural block diagram. The computer device 100 includes an automatic hair cutting device 110 based on artificial intelligence, a memory 111, a processor 112 and a communication unit 113.
[0281] To achieve data transmission or interaction, the memory 111, the processor 112, and the communication unit 113 are electrically connected to each other directly or indirectly. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The automatic haircutting device 110 based on artificial intelligence includes at least one software function module that can be stored in the memory 111 in the form of software or firmware or fixed in the operating system (OS) of the computer device 100. The processor 112 is used to execute the automatic haircutting device 110 based on artificial intelligence stored in the memory 111, such as the software function modules and computer programs included in the automatic haircutting device 110 based on artificial intelligence.
[0282] An embodiment of the present invention provides a readable storage medium, which includes a computer program. When the computer program is running, it controls the computer device where the readable storage medium is located to execute the aforementioned automatic hair cutting device 110 based on artificial intelligence.
[0283] For illustrative purposes, the foregoing description is made with reference to specific embodiments. However, the above illustrative discussion is not intended to be exhaustive or to limit the present disclosure to the precise form disclosed. Numerous modifications and variations are possible in accordance with the above teachings. These embodiments are selected and described in order to best illustrate the principles of the present disclosure and its practical application, so that those skilled in the art can best utilize the present disclosure and utilize various embodiments with different modifications to suit the intended specific application.
Claims
1. An automatic haircutting method based on artificial intelligence, characterized in that: include: Scan the target user's facial area to obtain a basic facial point set; Detecting the head of the target user to obtain a basic head point set; The basic skull point set and the basic facial point set are combined and optimized to obtain a refined head point set; Using a depth camera to perform basic hair estimation on the target user to obtain initial hair distribution information; Determine a scalp area, and use a fixture to calibrate the hair length in the scalp area to obtain calibrated hair length information of the target user; calibrating the initial hair distribution information according to the calibrated hair length information to obtain calibrated hair distribution information; Based on the refined head point set, obtaining a target hairstyle from a preset NFT hairstyle database; The hair is trimmed by using a clamp and a clipper based on the target hairstyle and the calibrated hair distribution information to complete the haircut for the target user.
2. The method according to claim 1, characterized in that The scanning of the target user's facial area to obtain a basic facial point set includes: Use a depth camera to scan the target user's facial area to obtain facial depth information and facial RGB information; Obtaining the basic facial point set according to the facial depth information and the facial RGB information; The detecting the head of the target user to obtain a basic head point set includes: Using an ultrasonic sensor to detect the head of the target user to obtain the basic head point set; The step of combining and optimizing the basic skull point set and the basic facial point set to obtain a refined head point set includes: The basic skull point set and the basic facial point set are used to perform spatial surface fitting to obtain the refined head point set.
3. The method according to claim 1, characterized in that The step of determining the scalp area comprises: Determine whether there is hair occlusion; If so, the blocking hair is clamped by the clamp, and the scalp area is determined according to machine vision; If not present, the scalp area is determined based on machine vision.
4. The method according to claim 1, characterized in that: The step of using a fixture to calibrate the hair length in the scalp area to obtain the calibrated hair length information of the target user includes: Dividing the scalp area into a plurality of scalp areas to be treated; Controlling the clamp to clamp the hair of a target scalp area by a mechanical arm, wherein the target scalp area is any one of the multiple scalp areas to be processed; Controlling the fixture to move along the normal direction of the head surface by a mechanical arm; When the hair friction force of the clamp reaches a preset hair friction force threshold, it is determined that the clamp straightens the hair in the target scalp area; The clamp is controlled by a mechanical arm to continue to move along the normal direction of the head surface. When the hair friction force of the clamp changes suddenly, the moving distance of the clamp is recorded as the calibrated hair length information of the target scalp area.
5. The method according to claim 1, characterized in that The step of using a fixture to calibrate the hair length in the scalp area to obtain the calibrated hair length information of the target user includes: Dividing the scalp area into a plurality of scalp areas to be treated; Controlling the clamp to clamp the hair of a target scalp area by a mechanical arm, wherein the target scalp area is any one of the multiple scalp areas to be processed; Controlling the fixture to move along the normal direction of the head surface by a mechanical arm; When the hair friction force of the clamp reaches a preset hair friction force threshold, it is determined that the clamp straightens the hair in the target scalp area; The clamp is controlled by a robotic arm to continue moving in the direction of force reduction. When the clamp only has radial force acting on it, the clamp is controlled to move in the radial direction. When the hair friction force of the clamp changes suddenly, the moving distance of the clamp is recorded as the calibrated hair length information of the target scalp area.
6. The method according to claim 1, characterized in that The step of obtaining a target hairstyle from a preset NFT hairstyle database based on the refined head point set includes: Determining facial features information of the target user based on the refined head point set; Determining the identity information of the target user according to the facial features information; Determine whether there is preset NFT hairstyle data corresponding to the identity information in the preset NFT hairstyle database; If yes, the preset NFT hairstyle data corresponding to the identity information is used as the target hairstyle; If not, the target hairstyle is obtained from the preset NFT hairstyle database in response to the user operation.
7. The method according to claim 1, characterized in that The method of trimming the target hair style and the calibrated hair distribution information using a clamp and a clipper to complete a haircut for the target user includes: Based on the refined head point set, determining facial features information and head posture of the target user; Determine a safe area based on the facial features information; Based on the avoidance strategy for the safety area, the head posture is acquired in real time, and the haircut for the target user is completed by trimming the hair based on the target hairstyle and the calibrated hair distribution information using a clamp and a clipper.
8. An automatic hair cutting device based on artificial intelligence, characterized in that: include: An acquisition module is used to scan the facial area of the target user to obtain a basic facial point set; Detecting the head of the target user to obtain a basic head point set; The basic skull point set and the basic facial point set are combined and optimized to obtain a refined head point set; Using a depth camera to perform basic hair estimation on the target user to obtain initial hair distribution information; Determine a scalp area, and use a fixture to calibrate the hair length in the scalp area to obtain calibrated hair length information of the target user; calibrating the initial hair distribution information according to the calibrated hair length information to obtain calibrated hair distribution information; Based on the refined head point set, obtaining a target hairstyle from a preset NFT hairstyle database; The trimming module is used to perform trimming based on the target hairstyle and the calibrated hair distribution information using a clamp and a clipper to complete a haircut for the target user.
9. A computer device, characterized in that: The computer device comprises a processor and a non-volatile memory storing computer instructions. When the computer instructions are executed by the processor, the computer device executes the method according to any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium includes a computer program, and when the computer program is executed, the computer device where the readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
User information NFT generation method and system
CN118035973A
