Image recognition-based nail art spray drawing method and system
By combining high-resolution camera multi-angle shooting with polygon contour fitting and deep learning network to identify nail contours, the pattern template is adaptively changed and the spraying path is optimized, which solves the problems of inaccurate pattern positioning and poor spraying quality in nail art spraying, and realizes accurate adaptation and efficient spraying of personalized nail art.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2026-03-24
AI Technical Summary
Existing nail art printing technology lacks the ability to accurately identify individual differences in nails, has limited pattern adaptation capabilities, and lacks optimized path planning, resulting in inaccurate pattern positioning and poor printing quality.
By capturing images from multiple angles using a high-resolution camera, combining a polygon contour fitting algorithm and a deep learning network to identify nail contours, adaptively changing pattern templates, optimizing the spraying path using a genetic algorithm, and performing precise spraying operations using a six-degree-of-freedom robotic arm.
It achieves precise adaptation and efficient printing of nail patterns, improves the personalization accuracy and overall quality of nail art printing, ensures that the pattern perfectly fits the nail surface of different shapes and sizes, and reduces the problems of repeated printing and unnatural color transitions.
Smart Images

Figure CN120816479B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image recognition technology, and in particular to a nail art spraying method and system based on image recognition. Background Technology
[0002] Nail art, as an important part of the beauty industry, traditionally relied primarily on manual hand-painting to create various patterns and designs on the nail surface. With technological advancements, the nail art industry has gradually incorporated automation, resulting in stencil-based nail art machines and simple digital inkjet printing equipment. Existing automated nail art equipment typically uses preset, fixed stencils or simple geometric patterns, decorating the nail surface through mechanical positioning and basic inkjet printing techniques. These devices have improved nail art efficiency to some extent, reduced reliance on the skills of professional nail technicians, and provided a technological foundation for standardized nail art services.
[0003] However, existing automated nail art technologies have significant shortcomings. First, they lack the ability to accurately identify individual differences in nails, failing to personalize designs based on different users' nail shapes and sizes, resulting in inaccurate pattern positioning or pattern distortion. Second, existing devices have limited pattern adaptation capabilities, mainly relying on simple proportional scaling, which cannot handle complex geometric features of nails such as curvature variations and irregular contours. Third, the path planning algorithms are simplistic and crude, typically employing line-by-line scanning or simple geometric paths, lacking comprehensive optimization for printing efficiency and quality, easily leading to problems such as repeated printing and unnatural color transitions.
[0004] Based on the analysis of the aforementioned technical deficiencies, it can be inferred that the core technical problems faced by existing technologies are progressive and interconnected. Inaccurate nail contour recognition directly leads to distorted pattern adaptation, and the limitations of pattern adaptation further affect the effectiveness of path planning. Inappropriate path planning, in turn, restricts the precision of robotic arm control, forming a chain of technical problems. Therefore, it is necessary to establish a complete technical system encompassing image recognition to contour extraction, pattern adaptation to path optimization, and motion control to quality feedback, to solve the technical connection problems between each stage and achieve truly intelligent and personalized nail art printing. Summary of the Invention
[0005] This application provides a nail art printing method and system based on image recognition, which solves the technical problems of inaccurate nail outline recognition, limited pattern adaptation capability, lack of optimized path planning, and lack of real-time quality control in existing nail art printing technology, thereby improving the personalization adaptation accuracy and overall quality level of nail art printing.
[0006] In a first aspect, this application provides a nail art printing method based on image recognition. The method includes: taking multi-angle photos of a nail using a high-resolution camera to obtain a set of original nail images including a front view, a left view, and a right view; performing contour recognition processing on the original nail images using a polygon contour fitting algorithm to obtain nail contour parameters including key feature point coordinates, contour boundary lines, and geometric centers; adaptively transforming a preset pattern from a pattern template library according to the nail contour parameters to obtain an adapted pattern template that matches the geometric features of the nail; performing path planning processing on the adapted pattern template using a genetic algorithm to obtain a printing path file including a coordinate sequence, printing parameters, and a timestamp; and controlling a six-degree-of-freedom robotic arm to perform printing operations according to the printing path file.
[0007] Optionally, the step of capturing and processing the nail from multiple angles using a high-resolution camera to obtain a set of original nail images including a front view, a left view, and a right view includes:
[0008] A ring-shaped LED light source array is used to uniformly illuminate the nail surface, resulting in a lighting environment that eliminates shadows and glare interference.
[0009] The shooting area is monitored and processed based on the finger position detection algorithm to obtain the trigger signal that the fingernail has completely entered the shooting area;
[0010] Based on the trigger signal, multiple cameras are synchronously controlled to perform shooting and processing to obtain front view image, left view image and right view image of the fingernail;
[0011] The front view image, left view image, and right view image are denoised using an adaptive Gaussian filter to obtain a clear image with noise removed.
[0012] The clear image is converted from the RGB color space to the HSV color space to obtain the original nail image set.
[0013] Optionally, the step of performing contour recognition processing based on the original nail image group using a polygon contour fitting algorithm to obtain nail contour parameters including the coordinates of key feature points, contour boundary lines, and geometric centers includes:
[0014] The original nail images are input into the NailNet deep learning network for feature extraction to obtain a multi-layer feature map containing nail boundary information.
[0015] The multi-layer feature map is processed by deep feature learning through five convolutional layers and three fully connected layers to obtain a high-dimensional feature vector of the nail contour.
[0016] The high-dimensional feature vector is optimized and trained based on the polygon geometric constraint loss function PNIoU to obtain the contour parameter prediction model.
[0017] The output of the contour parameter prediction model is simplified into polygons using the Douglas-Peucker algorithm to obtain the coordinates of key feature points and the contour boundary line of the nail contour.
[0018] The nail contour parameters are obtained by solving the geometric center problem using the centroid calculation formula based on the coordinates of the key feature points and the contour boundary line.
[0019] Optionally, the step of inputting the original nail image set into the NailNet deep learning network for feature extraction processing to obtain a multi-layer feature map containing nail boundary information includes:
[0020] The original nail image group was subjected to 256×256 pixel size standardization processing to obtain network input images of uniform specifications;
[0021] The network input image is input into the first convolutional layer for basic feature extraction processing, resulting in a primary feature map processed by 64 3×3 convolutional kernels.
[0022] The primary feature map is subjected to dimensionality reduction through a max pooling layer to obtain a pooled feature map with reduced spatial resolution;
[0023] Based on the pooled feature map, contour boundary feature extraction is performed through the second and third convolutional layers to obtain contour feature maps processed by 128 and 256 5×5 convolutional kernels, respectively.
[0024] The contour feature map is processed by activation function and batch normalization to obtain the multi-layer feature map containing nail boundary information.
[0025] Optionally, the step of adaptively transforming a preset pattern in the pattern template library according to the nail contour parameters to obtain an adapted pattern template that matches the nail's geometric features includes:
[0026] The pattern template library is filtered based on user preference settings and the nail outline parameters to obtain a set of candidate patterns that conform to the nail size range and shape characteristics.
[0027] The aspect ratio of the pattern templates in the candidate pattern set is adjusted according to the coordinates of the key feature points to obtain a scaled pattern that matches the nail outline.
[0028] The scaled pattern is rotated based on the geometric center to obtain a rotated pattern that is aligned with the direction of the fingernail.
[0029] The rotating pattern is subjected to perspective transformation based on the outline boundary line to obtain a perspective pattern that compensates for the curvature of the nail surface.
[0030] The perspective pattern is processed by a coordinate mapping algorithm to determine the pixel position, thereby obtaining the adaptive pattern template that records the position of each pixel on the nail surface.
[0031] Optionally, the process of performing path planning on the adapted pattern template using a genetic algorithm to obtain a printing path file containing coordinate sequences, printing parameters, and timestamps, and controlling a six-degree-of-freedom robotic arm to perform printing operations based on the printing path file, includes:
[0032] The adapted pattern template is processed by a connected component analysis algorithm to decompose the region, resulting in a pattern partitioning result containing multiple independent inkjet printing areas.
[0033] Each inkjet printing area in the pattern partitioning result is processed by an internal path planning algorithm to obtain the local path coordinates of each area.
[0034] The objective function based on the genetic algorithm is used to perform global optimization of the local path coordinates to obtain the optimal path sequence that includes printing time, color transition and repetition penalty;
[0035] The optimal path sequence is calibrated based on the physical characteristics of the nozzle to obtain the printing path file containing nozzle pressure, moving speed and timestamp;
[0036] The inkjet path file is input into the six-degree-of-freedom robotic arm control system for motion control processing to obtain the inkjet operation execution result.
[0037] Optionally, the step of inputting the inkjet path file into the six-degree-of-freedom robotic arm control system for motion control processing to obtain the inkjet operation execution result includes:
[0038] The inkjet path file is processed by the task planning layer to obtain the angle sequence data of each joint of the robotic arm.
[0039] Based on the angle sequence data, a predictive control algorithm is used to perform trajectory tracking to obtain a motion trajectory that keeps the nozzle perpendicular to the nail surface and at a constant distance of 5 mm.
[0040] The motion trajectory is processed by a PID controller to obtain control commands for each joint motor.
[0041] The printing process is visually adjusted based on the real-time monitoring signal from the side camera to obtain printing status prediction data optimized by the Kalman filter.
[0042] Based on the predicted printing status data, the printing parameters are dynamically adjusted to obtain the printing operation result of completing the nail pattern printing.
[0043] Secondly, this application provides an image recognition-based nail art inkjet printing system, the image recognition-based nail art inkjet printing system comprising:
[0044] The shooting module is used to capture and process nails from multiple angles using a high-resolution camera to obtain a set of original nail images including a front view, a left view, and a right view;
[0045] The recognition module is used to perform contour recognition processing on the original nail image group using a polygon contour fitting algorithm to obtain nail contour parameters including the coordinates of key feature points, contour boundary lines, and geometric centers.
[0046] The transformation module is used to adaptively transform the preset patterns in the pattern template library according to the nail contour parameters to obtain an adapted pattern template that matches the geometric features of the nail.
[0047] The planning module is used to perform path planning on the adapted pattern template using a genetic algorithm to obtain a printing path file containing coordinate sequences, printing parameters, and timestamps, and to control a six-degree-of-freedom robotic arm to perform printing operations based on the printing path file.
[0048] Thirdly, an image recognition-based nail art printing device is provided, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the image recognition-based nail art printing device to execute the aforementioned image recognition-based nail art printing method.
[0049] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to perform the above-described image recognition-based nail art spraying method.
[0050] The technical solution provided in this application obtains a set of original nail images, including a front view, a left view, and a right view, by capturing the nail from multiple angles using a high-resolution camera. Compared to the single-angle shooting method in existing technologies, multi-angle image acquisition can comprehensively capture the three-dimensional geometric information of the nail, providing a richer and more accurate data foundation for subsequent contour recognition. A polygon contour fitting algorithm is used for contour recognition processing to obtain nail contour parameters including the coordinates of key feature points, contour boundaries, and the geometric center. This algorithm is more suitable for handling complex nail shape features than traditional ellipse fitting methods, accurately describing the true contours of different types of nails such as square, round, and almond-shaped nails, avoiding fitting errors caused by simple geometric shape assumptions. Preset patterns in the pattern template library are adaptively transformed according to the nail contour parameters to obtain an adapted pattern template that matches the nail's geometric features. This contour parameter-based transformation method achieves precise pattern adaptation, considering not only size scaling but also rotation adjustment and perspective transformation, enabling the pattern to perfectly fit the nail surface of different shapes and sizes, significantly improving the accuracy of pattern positioning and the naturalness of the visual effect.
[0051] Genetic algorithms are used for path planning to generate a printing path file containing coordinate sequences, printing parameters, and timestamps. This algorithm comprehensively considers multiple objectives such as printing time, color transitions, and repetition penalties through a global optimization strategy. Compared to traditional line-by-line scanning or simple geometric paths, it has significant advantages, generating more reasonable and efficient printing paths, reducing unnecessary idle travel and repeated printing, and optimizing color transition effects. The six-degree-of-freedom robotic arm's control method for printing operations offers higher flexibility and precision compared to fixed tracks or simple mechanical structures, adapting to complex three-dimensional spatial motion requirements and ensuring the printhead maintains the optimal posture and distance from the nail surface. In the specific application of nail art printing, the polygon contour fitting algorithm fully considers the unique characteristics of nail shapes, offering greater professionalism and accuracy compared to general object detection algorithms. The application of genetic algorithms in path optimization combines the artistic requirements of nail art designs with the technical constraints of printing processes, achieving a balance between efficiency and quality. Attached Figure Description
[0052] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0053] Figure 1 This is a schematic diagram of one embodiment of the nail art spraying method based on image recognition in this application.
[0054] Figure 2 This is a schematic diagram of one embodiment of the nail art inkjet printing system based on image recognition in this application.
[0055] Figure 3 This is a schematic block diagram of the nail art inkjet printing device based on image recognition in an embodiment of the present invention. Detailed Implementation
[0056] This application provides a method and system for nail art spraying based on image recognition. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0057] For ease of understanding, the specific process of the embodiments of this application is described below. Please refer to [link / reference]. Figure 1 One embodiment of the nail art inkjet printing method based on image recognition in this application includes:
[0058] Step S101: Take multi-angle photos of the nail using a high-resolution camera to obtain a set of original nail images including a front view, a left view, and a right view;
[0059] Step S102: Based on the original nail image group, perform contour recognition processing using a polygon contour fitting algorithm to obtain nail contour parameters including key feature point coordinates, contour boundary lines, and geometric centers;
[0060] Step S103: Adaptively transform the preset patterns in the pattern template library according to the nail contour parameters to obtain an adapted pattern template that matches the geometric features of the nail.
[0061] Step S104: The adapted pattern template is processed by a genetic algorithm to perform path planning, and a printing path file containing coordinate sequence, printing parameters and timestamp is obtained. The six-degree-of-freedom robotic arm is controlled to perform printing operation according to the printing path file.
[0062] It is understood that the executing entity of this application can be an image recognition-based nail art printing system, a terminal, or a server; no specific limitation is made here. This application's embodiments use a server as an example for illustration.
[0063] Specifically, a ring-shaped LED light source array provides uniform illumination to the nail surface, eliminating the shadows and reflections caused by traditional single light sources. A finger position detection algorithm uses an infrared sensor to monitor the shooting area in real time, generating a trigger signal when the nail is detected to be fully within the shooting area. Three high-resolution cameras simultaneously capture images based on the trigger signal, obtaining nail images from the front, left 45-degree angle, and right 45-degree angle, respectively. An adaptive Gaussian filter dynamically adjusts the filtering parameters based on the local noise characteristics of the image. The standard deviation of the Gaussian kernel is automatically calculated based on the image gradient intensity; areas with larger gradient values use a smaller standard deviation to maintain edge sharpness, while areas with smaller gradient values use a larger standard deviation to remove noise. The filtered image is converted from the RGB color space to the HSV color space, where the H channel represents hue, the S channel represents saturation, and the V channel represents brightness. HSV conversion facilitates subsequent nail contour segmentation processing because the nail's hue value is relatively stable and clearly distinguishes it from the background. The original nail image set is first normalized to 256×256 pixels to ensure consistency of the input to the NailNet deep learning network. The NailNet network architecture consists of a first convolutional layer using 64 3×3 convolutional kernels to extract edge and texture features. The convolutional operation calculates the feature response value at each location using a sliding window. A max-pooling layer reduces the feature map size to half its original size while retaining the most salient features. The second and third convolutional layers use 128 and 256 5×5 convolutional kernels, respectively, specifically to extract the curve features of the nail contour. Larger kernels have a larger receptive field, better suited for capturing the overall shape information of the nail. The Polygonal Geometric Constraint Loss (PNIoU) function calculates the loss value during training based on the difference between the predicted and true contour polygon vertices. Prediction accuracy is quantified by comparing the Euclidean distance between corresponding vertices and the difference in polygon area. The Douglas-Peucker algorithm simplifies the dense contour points output by the network. The algorithm connects the start and end points with a straight line, calculates the perpendicular distance from each intermediate point to the line, and retains points whose distance exceeds a set threshold as key feature points, ultimately forming a polygon contour composed of 8-12 key feature points. The centroid calculation formula calculates the geometric center based on the coordinates of the polygon vertices. The sum of the x-coordinates of all vertices is divided by the total number of vertices to obtain the x-coordinate of the center. The y-coordinate is calculated using the same method.
[0064] The pattern template library selection algorithm chooses suitable candidate patterns from 500 preset patterns based on the aspect ratio and area parameters of the nail outline. Selection criteria include pattern complexity matching nail size and pattern theme conforming to user preferences. Aspect ratio adjustment processing calculates scaling factors based on the bounding box dimensions of the nail outline. The horizontal scaling factor equals the nail width divided by the original pattern width, and the vertical scaling factor equals the nail height divided by the original pattern height. Then, each pixel coordinate of the pattern template is multiplied by the corresponding scaling factor. Rotation transformation processing uses the nail's geometric center as the rotation point. First, the nail's principal axis direction is calculated by connecting the two furthest points of the outline. Then, the pattern's principal axis direction is calculated, and the angle between the two principal axis directions is the required rotation angle. The rotation transformation recalculates the coordinates of each pixel point of the pattern using a rotation matrix. Perspective transformation processing considers the three-dimensional curvature characteristics of the nail surface. A four-point perspective transformation matrix is constructed by measuring the nail's curvature parameters, mapping the planar pattern onto the nail's curved surface. During the transformation, the pattern's edge areas are moderately stretched to conform to the nail's curved surface. The coordinate mapping algorithm establishes a one-to-one correspondence between pattern pixels and nail surface coordinates, generating a coordinate mapping table containing the specific position information of each pixel on the nail surface. The mapping table records the precise position of each color point in the pattern in the nail coordinate system.
[0065] The connected component analysis algorithm performs 8-connected component detection on the adapted pattern template. The algorithm scans each pixel of the pattern, grouping adjacent pixels of the same color into the same connected region, ultimately decomposing the complete pattern into several independent printing areas. The spiral path generation algorithm generates a sequence of path points spiraling inward from the outer boundary within each connected region. The starting point is selected from the top-left corner pixel of the region, and the algorithm moves clockwise along the boundary. After completing one loop, it shrinks inward by one pixel and continues spiraling until it reaches the center of the region. The genetic algorithm's objective function comprehensively considers three factors: printing time, color transition smoothness, and avoiding repeated printing. The total time is calculated by dividing the total path length by the average moving speed. Color transition smoothness is calculated by statistically analyzing the color differences between adjacent path points, and the penalty for repeated printing is calculated by detecting the overlap of path points. Individual encoding uses a path point sequence representation. Each individual contains the access order of all path points. The fitness function is calculated as the reciprocal of the objective function; a higher fitness value indicates better path planning. The inkjet printing parameter calibration process adjusts the nozzle pressure and robotic arm movement speed according to the thickness of the lines and the depth of the colors. The pressure value for fine lines is set to 0.7 times the standard value and the movement speed is set to 0.6 times the standard value, while the pressure value for thick lines is set to 1.3 times the standard value and the movement speed is set to 1.2 times the standard value.
[0066] The task planning layer parses the printing path file into an angle sequence of each joint of the robotic arm. Through inverse kinematics calculations, path points in the Cartesian coordinate system are converted into angle values in joint space, with each path point corresponding to six joint angle parameters. The predictive control algorithm calculates the control sequence for the next few steps based on the current joint position and the target position, ensuring the nozzle remains perpendicular to the nail surface at a constant distance of 5 mm. The algorithm uses a rolling optimization strategy to continuously update control commands. The PID controller generates joint motor control commands based on three parameters: position deviation, speed deviation, and cumulative deviation. The proportional term coefficient is adjusted according to the joint load, the integral term coefficient is adjusted according to the system steady-state error, and the derivative term coefficient is adjusted according to the system response speed. The visual feedback system monitors the printing effect in real time through a side camera. The acquired images are compared and analyzed with the expected effect after color space conversion and feature extraction. A Kalman filter processes the visual information and predicts the printing state at the next moment. The filter's state equation includes three state variables: nozzle position, movement speed, and printing quality. When a color deviation exceeds a set threshold, the system automatically increases the printing pressure or decreases the movement speed. When blurred boundaries are detected, the system decreases the movement speed and increases the printing density.
[0067] In one specific embodiment, the process of performing step S101 may specifically include the following steps:
[0068] A ring-shaped LED light source array is used to uniformly illuminate the nail surface, resulting in a lighting environment that eliminates shadows and glare interference.
[0069] The shooting area is monitored and processed based on the finger position detection algorithm to obtain the trigger signal that the fingernail has completely entered the shooting area;
[0070] Based on the trigger signal, multiple cameras are synchronously controlled to perform shooting and processing to obtain front view image, left view image and right view image of the fingernail;
[0071] The front view image, left view image, and right view image are denoised using an adaptive Gaussian filter to obtain a clear image with noise removed.
[0072] The clear image is converted from the RGB color space to the HSV color space to obtain the original nail image set.
[0073] Specifically, the ring-shaped LED light source array contains 24 evenly distributed LED beads. The light intensity of each bead is controlled by PWM modulation. The system automatically adjusts the brightness value of each bead based on the reflective characteristics of the nail surface, eliminating the uneven brightness and high-reflection areas formed on the nail surface by traditional single-point light sources. The finger position detection algorithm uses an infrared distance sensor array. The sensor detects changes in the distance of objects within the shooting area at a frequency of 10 milliseconds. When the continuously detected distance value is stable within a preset range for more than 500 milliseconds, it is determined that the nail has completely entered the shooting area and a digital trigger signal is generated. The trigger signal is simultaneously sent to the control modules of three cameras through a parallel interface. The front-facing camera shoots vertically downwards, the left camera shoots at a 45-degree angle to the lower right, and the right camera shoots at a 45-degree angle to the lower left. The shutter synchronization time accuracy of the three cameras is controlled within 1 millisecond to ensure the temporal consistency of the images. The adaptive Gaussian filter dynamically adjusts its filtering parameters based on the gradient intensity of local image regions. The gradient value is calculated using the Sobel operator. Pixels with gradient values greater than 50 use a Gaussian kernel with a standard deviation of 0.8 to maintain edge sharpness, while pixels with gradient values less than 50 use a Gaussian kernel with a standard deviation of 1.5 to remove noise. The filtering process uses a 3×3 convolution window to perform a weighted average calculation on each pixel. The RGB to HSV color space conversion calculates the hue, saturation, and brightness values of each pixel using mathematical formulas. The hue value H is calculated based on the difference between the maximum and minimum values of the three RGB components, the saturation S is calculated using the ratio of the maximum to the minimum value, and the brightness value V is directly taken as the maximum value of the three RGB components. In the converted HSV image, the hue value of the nail area is relatively stable, while the hue value of the background area varies more, which facilitates subsequent contour segmentation processing.
[0074] The original nail images are first uniformly adjusted to a resolution of 256×256 pixels using bilinear interpolation. The interpolation process calculates the floating-point coordinates of the target pixel in the original image based on its location, then takes a weighted average of the surrounding four integer pixel values to obtain the target pixel value. The first convolutional layer of the NailNet deep learning network contains 64 3×3 convolutional kernels. Each kernel scans the input image through a sliding window, calculating the sum of the product of the kernel weight and the corresponding pixel value at each location to obtain the feature response value at that location. After the convolution operation, 64 feature maps are generated, each with a size of 254×254 pixels. The max-pooling layer uses a 2×2 pooling window, selecting the maximum pixel value within each window as the output, reducing the feature map size to 127×127 pixels while retaining the most significant feature information. The second convolutional layer uses 128 5×5 convolutional kernels to process the pooled feature maps. Larger kernels cover a wider image area, making them more suitable for capturing the overall shape features of the nail contour. The third convolutional layer uses 256 5×5 convolutional kernels to further extract high-level semantic features. The polygon geometric constraint loss function PNIoU calculates the loss value by comparing the vertex coordinate differences between the predicted and true contours. The loss calculation includes two parts: the Euclidean distance between corresponding vertices and the polygon area difference. The vertex distance difference is calculated by summing the squared distances between the predicted vertex and the nearest true vertex, while the area difference is calculated using the cross product formula of the polygon vertex coordinates. The Douglas-Peucker algorithm starts from the beginning and end points of the contour, connects these two points to form a reference line, calculates the perpendicular distance from all intermediate points on the contour to this line, selects the point with the largest distance as the new segmentation point, and recursively repeats this process for the segmented line segments. Segmentation stops when the distance from all points to the line is less than a preset threshold. The final retained key points constitute a simplified polygon contour. The centroid is calculated by summing the x-coordinates of all key feature points and dividing by the total number of points to obtain the x-coordinate of the geometric center. The y-coordinate is calculated using the same arithmetic mean method.
[0075] The pattern template library selection algorithm first calculates the aspect ratio and area parameters of the bounding box of the nail outline. The aspect ratio equals the maximum width of the bounding box divided by the maximum height, and the area is calculated using the vector cross product formula of the polygon vertex coordinates. The selection process iterates through 500 preset patterns in the pattern template library, comparing the complexity index and size parameters of each pattern with the nail parameters. The complexity index is calculated by counting the number of connected regions and edge pixels in the pattern, selecting the top 10 patterns with the highest matching degree as the candidate set. The aspect ratio adjustment process calculates a scaling factor based on the size ratio between the nail bounding box and the pattern bounding box. The horizontal scaling factor equals the nail width divided by the pattern width, and the vertical scaling factor equals the nail height divided by the pattern height. The scaling transformation is achieved by multiplying each pixel coordinate of the pattern by the corresponding scaling factor. The rotation transformation uses the geometric center of the nail as the origin of rotation. The nail's principal axis direction is determined by connecting the two farthest key points on the outline, and the pattern's principal axis direction is determined by the long side direction of the pattern bounding box. The rotation angle equals the angle between the two principal axis direction vectors. The rotation transformation recalculates the pixel coordinates of the pattern using a rotation matrix. Perspective transformation processing constructs a transformation matrix based on the three-dimensional curvature characteristics of the nail surface. The curvature parameters are calculated by analyzing the arc information of the nail in the left and right views. The eight parameters of the perspective transformation matrix are solved using the coordinate relationships of four pairs of corresponding points, ensuring that the transformed pattern conforms to the curved surface of the nail. A coordinate mapping algorithm establishes the correspondence between pattern pixels and nail surface positions. It iterates through each pixel in the transformed pattern, calculating its absolute position in the nail coordinate system based on its relative position in the pattern, generating a mapping table containing pixel color values and spatial coordinates.
[0076] The connected component analysis algorithm employs an eight-connected-component labeling method. Starting from the top left corner of the pattern, it scans each pixel row by row. For non-background pixels, it checks the labeling status of their four neighboring pixels (above, above left, to the left, and below left). If a labeled pixel exists in the neighborhood, its label is inherited; otherwise, a new region label is assigned. After scanning, pixels with the same label constitute a connected region. The spiral path generation algorithm generates a spiral path from the boundary to the center within each connected region. The algorithm first extracts the outer boundary pixels of the region, selects the top left corner as the starting position, and moves clockwise along the boundary, recording the path points. After completing one loop, it shrinks inward by one pixel and continues spiraling. The shrinkage distance is determined by the effective spraying radius of the nozzle. This process is repeated until the geometric center of the region is reached. The genetic algorithm encodes individuals using an integer sequence to represent the access order of all path points. Population initialization is achieved by randomly arranging the path point sequence. The crossover operation uses a partial mapping crossover method to maintain path continuity, and the mutation operation is implemented by randomly swapping two path points in the sequence. The fitness function comprehensively considers three factors: total path length, number of color transitions, and repeated visit penalty. The total path length is calculated by accumulating the Euclidean distances between adjacent path points. The number of color transitions is calculated by counting the number of times the color difference between adjacent path points exceeds a threshold. The repeated visit penalty is calculated by detecting instances where the same position is visited multiple times in the path. The printing parameter calibration determines the printing pressure and speed based on the color depth of each path point in the pattern and the thickness of surrounding lines. Color depth is quantized using the V component in the HSV color space, and line thickness is evaluated by calculating the number of pixels of the same color in the neighborhood around that point. Dark and thick-lined areas use high pressure and low speed parameters, while light and thin-lined areas use low pressure and high speed parameters.
[0077] The task planning layer parses the 3D coordinate sequence in the inkjet path file and converts the Cartesian coordinates into joint angles using the inverse kinematics algorithm of the robotic arm. The inverse kinematics solution employs a combination of geometric methods and numerical iteration. First, the angles of the first three joints are calculated based on the end-effector position and attitude, and then the angles of the last three joints are calculated based on the end-effector attitude. The predictive control algorithm uses a model predictive control strategy, predicting the system state over the next 10 control cycles based on the robotic arm's dynamic model. The optimization objectives include minimizing tracking error and smoothing the control input. The optimal control sequence is calculated using a quadratic programming solver, executing only the first control input in each control cycle and then continuously updating the prediction window. The proportional gain of the PID controller is set according to the load inertia of each joint, the integral gain is set according to the steady-state error requirements of the system, and the derivative gain is set according to the system's response speed requirements. The control output is sent to the servo motor driver after saturation limiting. The visual feedback system acquires images of the inkjet process at a frequency of 20 frames per second using a side camera. The image processing algorithm extracts the color distribution and boundary sharpness features of the inkjet area. The color distribution is statistically analyzed using RGB histograms, and the boundary sharpness is calculated using the variance of the gradient magnitude. The state vector of a Kalman filter includes three state variables: nozzle position, velocity, and print quality. The state transition matrix is determined based on the kinematic model of the system, and the observation matrix maps the state variables to visual measurements. The filter recursively estimates the system state through two steps: prediction and update.
[0078] In one specific embodiment, the process of performing step S102 may specifically include the following steps:
[0079] The original nail images are input into the NailNet deep learning network for feature extraction to obtain a multi-layer feature map containing nail boundary information.
[0080] The multi-layer feature map is processed by deep feature learning through five convolutional layers and three fully connected layers to obtain a high-dimensional feature vector of the nail contour.
[0081] The high-dimensional feature vector is optimized and trained based on the polygon geometric constraint loss function PNIoU to obtain the contour parameter prediction model.
[0082] The output of the contour parameter prediction model is simplified into polygons using the Douglas-Peucker algorithm to obtain the coordinates of key feature points and the contour boundary line of the nail contour.
[0083] The nail contour parameters are obtained by solving the geometric center problem using the centroid calculation formula based on the coordinates of the key feature points and the contour boundary line.
[0084] Specifically, the original nail images were preprocessed and uniformly adjusted to a standard input format of 256×256 pixels. The NailNet deep learning network first received three-channel HSV image data through the input layer. The first convolutional layer of the network used 64 3×3 convolutional kernels to extract features from the input image. The convolution operation calculated the feature response at each position using a sliding window. As each convolutional kernel slid across the image, the dot product of the kernel weight and the corresponding pixel value was calculated, generating 64 feature maps of size 254×254. These feature maps captured the basic edge and texture information of the nail boundary. Subsequent pooling layers used a 2×2 max pooling window to reduce the feature map size to 127×127, selecting the maximum activation value as the output within each 2×2 region, which reduced the computational cost while preserving the most significant boundary features. The second convolutional layer uses 128 5×5 convolutional kernels to process the pooled feature map. The larger convolutional kernels have a wider receptive field, which is more suitable for capturing the overall shape features of the nail outline. The third convolutional layer uses 256 5×5 convolutional kernels to further extract high-level semantic features. After each convolution, a non-linear transformation is introduced through the ReLU activation function, and the final output is a combination of multi-layer feature maps containing nail boundary information.
[0085] The five convolutional layers employ a progressive feature learning strategy. The fourth convolutional layer uses 512 3×3 convolutional kernels to specifically learn the fine boundary features of the nail contour, while the fifth convolutional layer uses 1024 3×3 convolutional kernels to learn the abstract feature representation of the highest layer. The convolutional feature maps are flattened into one-dimensional feature vectors after global average pooling and input into three fully connected layers for deep feature learning. The first fully connected layer contains 2048 neurons, which map the convolutional features to a high-dimensional space through weight matrix transformation. The second fully connected layer contains 1024 neurons for feature compression and abstraction, and the third fully connected layer contains 512 neurons to output the final high-dimensional feature vector. Each fully connected layer uses dropout to prevent overfitting, with a dropout probability of 0.5 randomly disabling half of the neuron connections. The high-dimensional feature vector contains complete semantic information about the nail contour, with each dimension corresponding to specific contour features such as curvature, angle, and aspect ratio.
[0086] The Polygonal Geometric Constraint Loss Function (PNIoU) is specifically designed to optimize the polygon fitting accuracy of nail contours. The loss function comprises three main components: the first is vertex position loss, calculated by summing the squared Euclidean distances between the predicted polygon vertices and their corresponding points on the true contour; the second is area difference loss, calculated using the polygon area formula to determine the area difference between the predicted and true contours; and the third is shape similarity loss, assessed by comparing the interior angle distribution of the polygons. During training, the network updates weight parameters via backpropagation. Gradient calculations propagate layer by layer from the loss function, with the gradient at each layer calculated using the chain rule. The optimizer uses the Adam algorithm to adaptively adjust the learning rate, initially set to 0.001, with a training batch size of 32. After 200 epochs of training, the network converges to a stable state, resulting in a predictive model capable of accurately predicting nail contour parameters.
[0087] The output of contour parameter prediction models contains the coordinates of densely distributed boundary points on the nail contour, typically consisting of 100-200 consecutive contour points. While these dense points describe contour information, they contain a large amount of redundant data, which is detrimental to subsequent processing. The Douglas-Peucker algorithm simplifies the polygon contour through recursive segmentation. The algorithm first connects the start and end points of the contour to form a baseline segment. Then, it calculates the perpendicular distance from all intermediate points on the contour to this line segment using a geometric formula for point-to-line distance. The point with the largest distance is selected as the new segmentation point, dividing the original contour into two sub-contours. The same segmentation process is recursively performed on each sub-contour. Segmentation stops when the distance from all points on a certain contour to the corresponding baseline segment is less than a preset threshold. The threshold is set to 2 pixels to ensure that the deviation between the simplified polygon and the original contour is within an acceptable range. The algorithm ultimately retains 8-12 key feature points to form the simplified polygon contour. These key points are usually located at important turning points in the nail contour, such as root corners, lateral curvature change points, and tip convergence points. The simplified contour retains the main shape features of the nail while significantly reducing the amount of data.
[0088] The centroid calculation formula is based on the arithmetic mean of the polygon vertex coordinates to calculate the geometric center position. For a simplified contour containing n key feature points, the x-coordinate of the geometric center is calculated by summing the x-coordinates of all key points and dividing by the total number of points, while the y-coordinate is calculated using the same averaging method. The geometric center not only represents the spatial position of the nail contour but also serves as the reference origin for subsequent pattern transformations. The contour boundary lines approximate the complete boundary of the nail by connecting adjacent key feature points to form piecewise straight lines. The final nail contour parameters include an array of key feature point coordinates recording the precise position of each key point, an array of contour boundary line segments describing the connection relationships between adjacent key points, the geometric center coordinates serving as the center reference point of the contour, and geometric attributes such as the bounding box size, perimeter, and area of the contour.
[0089] In one specific embodiment, the process of inputting the original nail image group into the NailNet deep learning network for feature extraction may specifically include the following steps:
[0090] The original nail image group was subjected to 256×256 pixel size standardization processing to obtain network input images of uniform specifications;
[0091] The network input image is input into the first convolutional layer for basic feature extraction processing, resulting in a primary feature map processed by 64 3×3 convolutional kernels.
[0092] The primary feature map is subjected to dimensionality reduction through a max pooling layer to obtain a pooled feature map with reduced spatial resolution;
[0093] Based on the pooled feature map, contour boundary feature extraction is performed through the second and third convolutional layers to obtain contour feature maps processed by 128 and 256 5×5 convolutional kernels, respectively.
[0094] The contour feature map is processed by activation function and batch normalization to obtain the multi-layer feature map containing nail boundary information.
[0095] Specifically, the original nail image set includes a front view, a left view, and a right view. Figure 3Images from different angles are used, each with a different original resolution depending on the camera parameters. The front view is typically 1920×1080 pixels, while the left and right side views are 1280×720 pixels. Size normalization uses bilinear interpolation to uniformly adjust all images to 256×256 pixels. The interpolation process first calculates the floating-point coordinates of each pixel in the target image relative to its corresponding position in the original image. Then, it finds the four integer coordinate pixels surrounding that position and calculates a weighted average of these four pixel values based on distance weights to obtain the target pixel value. The weights in bilinear interpolation are calculated based on the inverse relationship between the target position and its four neighboring pixels; pixels closer to each other have higher weights. The interpolated image retains the main features of the original image while meeting the network input size requirements. Normalization also includes pixel value normalization, linearly mapping the original 0-255 grayscale value range to a 0-1 floating-point number range. The normalization formula is that the new pixel value equals the original pixel value divided by 255. Normalized image data is beneficial for gradient propagation and convergence stability in the network.
[0096] The network input image undergoes basic feature extraction through the first convolutional layer, which contains 64 3×3 convolutional kernels. Each kernel has 9 weight parameters and 1 bias parameter. The kernels slide across the input image with a stride of 1 pixel. During convolution, the 9 pixel values within the 3×3 region covered by the kernel are multiplied by their corresponding 9 weight parameters. The sum of these 9 products is then added to the bias value to obtain the feature response value at that location. After the kernel slides across the entire input image, it generates a 254×254 pixel feature map. The 64 different kernels learn different feature patterns. Some kernels specifically detect horizontal edge features corresponding to the upper and lower boundaries of the nail, some detect vertical edge features corresponding to the left and right boundaries of the nail, and others detect diagonal edges and corner features corresponding to the turning points of the nail contour. The weight parameters of each kernel are automatically learned and optimized during training using a backpropagation algorithm, ultimately forming a filter sensitive to specific feature patterns. The 64 primary feature maps combined provide a multi-dimensional feature representation of the nail image.
[0097] The max pooling layer uses a 2×2 pooling window to reduce the dimensionality of the primary feature map. The pooling window slides across the feature map with a stride of 2 pixels, selecting the maximum value among four pixels within each 2×2 region as the output. This pooling operation reduces the 254×254 pixel primary feature map to a 127×127 pixel pooled feature map. The mechanism of max pooling is to retain the strongest feature responses in local regions while discarding weaker responses. This selective retention reduces the amount of data in the feature map, lowering computational complexity, and enhances the translation invariance of features, making the network more robust to small displacements in the input image. The pooled feature map still retains 64 channels, each corresponding to a specific edge or texture feature. High-response regions in the pooled feature map typically correspond to nail boundaries and key contour features, providing concise yet information-rich input data for subsequent deep feature extraction.
[0098] The second convolutional layer uses 128 5×5 convolutional kernels to extract contour boundary features from the pooling feature map. Each 5×5 convolutional kernel contains 25 weight parameters. Larger convolutional kernels have a wider receptive field, making them more suitable for capturing the continuity and overall shape features of the nail contour. The input to the second convolutional layer is a 64-channel pooling feature map. Each 5×5 convolutional kernel needs to process all 64 input channels, so each convolutional kernel actually contains 64×25=1600 weight parameters. During convolution calculation, the convolutional kernel is convolved with the corresponding regions of the 64 input channels respectively, and then summed to obtain a single output feature value. The 128 convolutional kernels generate 128 feature maps of size 123×123 pixels. These feature maps specifically encode mid-level features of the nail contour, such as curve segments, curvature variations, and boundary continuity. The third convolutional layer uses 256 5×5 convolutional kernels to further extract high-level contour features. The input is a 128-channel feature map, and each convolutional kernel contains 128×25=3200 weight parameters. The output is 256 contour feature maps with a size of 119×119 pixels. These high-level feature maps encode more abstract contour patterns such as overall shape category, symmetry and geometric relationships.
[0099] The contour feature map is first nonlinearly transformed using the ReLU activation function. The ReLU function sets all negative values to 0 while keeping positive values unchanged. Mathematically, the output equals the maximum of the input and 0. The activation function introduces nonlinear transformation capabilities into the network, enabling it to learn complex feature mapping relationships. Batch normalization standardizes each feature map channel individually, calculating the mean and variance of that channel across all samples in the current batch. Then, each feature value is subtracted from the mean and divided by the standard deviation to obtain the standardized feature value. The batch normalization formula is: the standardized value equals the original value minus the square root of the batch mean divided by the batch standard deviation. Batch normalization also introduces two learnable parameters: a scaling factor and a shift factor. The final output is the standardized value multiplied by the scaling factor plus the shift factor. These two parameters allow the network to learn an appropriate feature distribution based on the normalization. The main functions of batch normalization are to stabilize the training process, accelerate convergence, and reduce sensitivity to initialization parameters. The processed multilayer feature map contains 256 channels, with each channel having a uniform and stable feature value distribution.
[0100] In one specific embodiment, the process of executing step S103 may specifically include the following steps:
[0101] The pattern template library is filtered based on user preference settings and the nail outline parameters to obtain a set of candidate patterns that conform to the nail size range and shape characteristics.
[0102] The aspect ratio of the pattern templates in the candidate pattern set is adjusted according to the coordinates of the key feature points to obtain a scaled pattern that matches the nail outline.
[0103] The scaled pattern is rotated based on the geometric center to obtain a rotated pattern that is aligned with the direction of the fingernail.
[0104] The rotating pattern is subjected to perspective transformation based on the outline boundary line to obtain a perspective pattern that compensates for the curvature of the nail surface.
[0105] The perspective pattern is processed by a coordinate mapping algorithm to determine the pixel position, thereby obtaining the adaptive pattern template that records the position of each pixel on the nail surface.
[0106] Specifically, the pattern template library contains 500 preset patterns in different styles. Each pattern is pre-labeled with a complexity index, applicable size range, and style category tag. The complexity index is calculated by statistically analyzing the number of connected regions and edge pixel density within the pattern. User preference settings include style type selection (e.g., floral, geometric, abstract), color preferences (e.g., warm, cool, or specific colors), and complexity preferences (e.g., minimalist, medium, refined). The selection algorithm first calculates the nail's area and perimeter based on its outline parameters. The area is calculated using the cross product formula of polygon vertex coordinates, and the perimeter is calculated by summing the lengths of each boundary line segment. Then, the nail size is matched against the recommended size range of the pattern template. The selection process employs a multi-dimensional scoring mechanism: size matching accounts for 40% of the weight by comparing the nail area with the pattern's applicable area range; style matching accounts for 35% of the weight based on the consistency between the user's selected style tag and the pattern category; and complexity matching accounts for 25% of the weight by comparing the user's complexity preference with the pattern's complexity index. The scoring calculation uses a Gaussian function model. When the parameters match perfectly, the score is 1. As the difference increases, the score decays according to the Gaussian curve. Finally, the top 15 patterns with the highest comprehensive scores are selected to form a candidate pattern set.
[0107] The aspect ratio adjustment process first calculates the bounding box size of the nail outline. The bounding box is the smallest rectangle that can completely contain all key feature points. The width of the bounding box is equal to the maximum value minus the minimum value of the key point's x-coordinate, and the height of the bounding box is equal to the maximum value minus the minimum value of the key point's y-coordinate. Each candidate pattern template has its original width and height dimensions. Aspect ratio adjustment is achieved by calculating scaling factors in the horizontal and vertical directions. The horizontal scaling factor is equal to the nail bounding box width divided by the original pattern width, and the vertical scaling factor is equal to the nail bounding box height divided by the original pattern height. The scaling transformation applies the corresponding scaling factor to each pixel coordinate in the pattern. The new x-coordinate is equal to the original x-coordinate multiplied by the horizontal scaling factor, and the new y-coordinate is equal to the original y-coordinate multiplied by the vertical scaling factor. During the scaling process, a bilinear interpolation method is used to handle non-integer pixel coordinates. When the new coordinate is not an integer, the interpolation result is obtained by calculating the weighted average of the values of the four surrounding integer coordinate pixels. The interpolation weights are determined inversely proportional to the distances from the new coordinate to the four neighboring integer coordinates. The scaled pattern perfectly matches the bounding box size of the nail outline in both width and height directions, ensuring that the pattern can fully cover the nail surface without exceeding the boundary range.
[0108] The rotation transformation process uses the geometric center of the nail as the origin of rotation. First, the principal axis directions of the nail and the pattern need to be determined. The nail's principal axis direction is determined by connecting the two farthest key feature points on the outline, typically the line connecting the center of the nail root to the center of the nail tip. The pattern's principal axis direction is determined based on the pattern's geometric features. For patterns with clear directionality, such as flowers or leaves, the principal axis is usually the long axis of the pattern; for symmetrical patterns, the main axis of symmetry is chosen as the principal axis. The rotation angle is equal to the angle between the nail's principal axis direction and the pattern's principal axis direction. The angle is calculated using the vector dot product formula: the dot product of two unit vectors equals the cosine of the angle, and the rotation angle is calculated using the inverse cosine function. The rotation transformation uses a two-dimensional rotation matrix to transform the coordinates of each pixel in the pattern. The new horizontal coordinate is equal to the original horizontal coordinate multiplied by the cosine of the angle minus the original vertical coordinate multiplied by the sine of the angle; the new vertical coordinate is equal to the original horizontal coordinate multiplied by the sine of the angle plus the original vertical coordinate multiplied by the cosine of the angle. During the rotation transformation, the origin of the coordinate system is temporarily translated to the geometric center of the nail. After the transformation is completed, it is translated back to the original coordinate system to ensure that the direction of the rotated pattern is completely consistent with the direction of the nail's main axis.
[0109] Perspective transformation takes into account the three-dimensional curvature of the nail surface. Nails are not perfectly flat but have horizontal and vertical curvatures. The purpose of perspective transformation is to map a planar pattern onto the curved surface of the nail, making it appear naturally fitting. Perspective transformation parameters are calculated by analyzing the curvature information of the nail in the left and right side views. The left and right side views show the radius of curvature of the nail in the horizontal direction, and the radius of curvature is calculated by fitting the arc curve of the nail edge. The perspective transformation matrix is a 3×3 homogeneous coordinate transformation matrix. The matrix's eight parameters are solved by establishing a system of linear equations for four pairs of corresponding points. The corresponding points are selected as the four corner points of the nail outline and the four corner points of the pattern. The system of linear equations is solved using the least squares method to obtain the optimal transformation parameters. Perspective transformation produces different degrees of deformation in different areas of the pattern. Areas near the nail edge undergo moderate stretching to fit the curved surface of the nail, while areas near the center of the nail experience less deformation, preserving the main features of the pattern. The transformed pattern visually presents a three-dimensional effect that fits the curved surface of the nail.
[0110] The coordinate mapping algorithm establishes a precise correspondence between each pixel in the perspective pattern and the coordinates of the nail surface. The algorithm iterates through each pixel in the transformed pattern, calculating its absolute position in the nail coordinate system based on its relative position within the pattern. The nail coordinate system has its origin at the geometric center, with the horizontal axis along the nail width and the vertical axis along the nail length, using millimeters as the coordinate unit for easy robotic arm movement control. Pixel position calibration employs a dual mapping mechanism: first, the pattern pixel coordinates are mapped to the boundary coordinate system of the nail outline; then, the boundary coordinates are mapped to the actual physical coordinate system, taking into account the ratio between image resolution and actual size during the mapping process. The coordinate mapping table records the color and spatial position information of each non-background pixel. Color information includes RGB three-channel values, and spatial position information includes the horizontal and vertical coordinates on the nail surface and the relative depth value. The depth value is calculated based on the geometric model of the nail surface, reflecting the vertical distance of the point from the nail plane. The mapping table's data structure uses a hash table for fast lookup and access. The key is the pixel coordinate, and the data value is a structure containing color and position information. The adapted pattern template ultimately includes the mapping relationship from pixels to physical positions.
[0111] In one specific embodiment, the process of executing step S104 may specifically include the following steps:
[0112] The adapted pattern template is processed by a connected component analysis algorithm to decompose the region, resulting in a pattern partitioning result containing multiple independent inkjet printing areas.
[0113] Each inkjet printing area in the pattern partitioning result is processed by an internal path planning algorithm to obtain the local path coordinates of each area.
[0114] The objective function based on the genetic algorithm is used to perform global optimization of the local path coordinates to obtain the optimal path sequence that includes printing time, color transition and repetition penalty;
[0115] The optimal path sequence is calibrated based on the physical characteristics of the nozzle to obtain the printing path file containing nozzle pressure, moving speed and timestamp;
[0116] The inkjet path file is input into the six-degree-of-freedom robotic arm control system for motion control processing to obtain the inkjet operation execution result.
[0117] Specifically, the connected component analysis algorithm uses an eight-connected-component labeling method to decompose the adapted pattern template into regions. The algorithm scans each pixel row by row, starting from the top-left corner of the pattern. For non-background pixels, it checks the labeling status of their eight neighboring pixels. The eight neighbors include the pixels above, top-right, right, bottom-right, bottom, bottom-left, left, and top-left. When the current pixel is not a background color and there are already labeled pixels in its neighborhood, the current pixel inherits the smallest label number in its neighborhood. If there are no labeled pixels in its neighborhood, a new region label number is assigned to the current pixel. Labeling conflicts occur when multiple neighboring pixels with different labels are encountered during the scan. The algorithm records these conflicting label numbers and merges the labels after the scan, unifying pixels belonging to the same connected region but with different labels into the same label. After connected component analysis, pixels with the same label number constitute an independent printing area. The algorithm counts the number of pixels, boundary perimeter, and geometric center position of each area, filtering out noisy areas with fewer than 5 pixels, and retaining the valid printing areas to form the pattern partitioning result.
[0118] The spiral path generation algorithm generates a spiral path converging from the outer boundary to the center within each independent printing area. The algorithm first extracts the outer boundary pixels of the area using a boundary tracking method, starting from the top-left pixel and moving clockwise along the area boundary to record the boundary pixel coordinates. Spiral path generation begins at the outer boundary, selecting the starting point on the boundary as the first point of the spiral path. Then, it moves along the boundary direction, recording the path point coordinates. After completing one circle of boundary traversal, it shrinks inward by one pixel to begin the next spiral. The shrinkage distance is determined based on the effective printing radius of the nozzle; a nozzle radius of 0.3 mm corresponds to 2 pixels in the image, ensuring appropriate overlap between adjacent spiral circles to avoid omissions. During spiral path generation, the algorithm continuously monitors whether the current position is still within the area. When a path point is detected to be outside the area boundary, the current spiral circle stops and inward shrinkage begins. The algorithm terminates when the space inside the area is insufficient to accommodate the next spiral circle. The last path point is usually located near the geometric center of the area. The local path coordinates of each printing area include a two-dimensional coordinate sequence of the path points, the connection relationships between the path points, and the total path length information.
[0119] The genetic algorithm uses integer encoding to represent the global path optimization problem. Chromosome encoding represents the access order of all printing areas and the traversal order of path points within each area. The chromosome length equals the total number of path points in all areas, and the gene value is a unique identifier for each path point. The objective function includes three optimization objectives: the printing time objective is calculated by summing the Euclidean distances between adjacent path points to obtain the total path length, then dividing by the average movement speed to obtain the total printing time; the color transition objective is calculated by counting the number of times the color difference between adjacent path points exceeds a threshold, with color difference measured using Euclidean distance in the RGB color space; and the repetition penalty objective is calculated by detecting instances where the same coordinate position is traversed multiple times in the path. The fitness function of the genetic algorithm uses a weighted summation method to combine the three objectives. The weight coefficients are set to 0.5 for time, 0.3 for color, and 0.2 for repetition. The fitness value is equal to the reciprocal of the sum of each objective value multiplied by its corresponding weight. A higher fitness value indicates a better path solution. The algorithm uses a roulette wheel selection method to select parent individuals, a single-point crossover method to generate offspring individuals, and a mutation operation to be achieved by randomly swapping the positions of two genes in the chromosome. The population size is set to 100 individuals, the crossover probability is 0.8, the mutation probability is 0.1, and the algorithm converges to the optimal solution after 50 generations.
[0120] The printing parameter calibration process sets specific printing parameters for each path point based on the printhead's physical characteristics and pattern features. Printhead physical characteristics include a nozzle diameter of 0.3 mm, a maximum printing pressure of 3.0 MPa, a pressure adjustment accuracy of 0.1 MPa, a maximum travel speed of 20 mm / s, and a speed adjustment accuracy of 1 mm / s. The parameter calibration algorithm analyzes the color depth and surrounding line thickness characteristics of each path point. Color depth is quantified using the V component in the HSV color space; a smaller V value indicates a darker color requiring higher printing pressure and a longer dwell time. Line thickness is assessed by calculating the number of pixels of the same color within a 5×5 neighborhood around the point; more pixels of the same color indicate a thicker line requiring higher printing pressure. The printing pressure calculation formula is: a base pressure of 0.8 MPa multiplied by a color depth coefficient and a line thickness coefficient. The color depth coefficient equals 1 minus the V component value, and the line thickness coefficient equals the number of neighboring pixels of the same color divided by 25. Travel speed is inversely proportional to printing pressure; the actual travel speed is obtained by dividing the base travel speed of 12 mm / s by the pressure coefficient. The timestamp calculation is based on the distance between path points and the movement speed. The timestamp of the first path point is 0, and the timestamp of subsequent path points is equal to the timestamp of the previous point plus the movement time obtained by dividing the distance between the two points by the movement speed. The final inkjet path file contains four parameters for each path point: coordinates, pressure, speed, and timestamp.
[0121] After receiving the inkjet printing path file, the six-degree-of-freedom robotic arm control system executes motion control through a hierarchical control architecture. The task planning layer is responsible for parsing the coordinate sequence in the path file and converting it into a sequence of joint angles for the robotic arm. This conversion process uses an inverse kinematics algorithm to calculate the angles of each joint based on the position and orientation of the end effector. The trajectory planning layer generates a smooth motion trajectory based on the joint angle sequence, using a fifth-order polynomial interpolation method to generate continuous angle change curves between adjacent path points, ensuring continuous changes in angular velocity and angular acceleration during the robotic arm's movement and avoiding mechanical impact. The servo control layer uses a PID control algorithm to control the position of each joint. The controller calculates the control output based on the deviation between the desired and actual angles. The proportional coefficient is set according to the joint load inertia, the integral coefficient is set according to the steady-state accuracy requirements, and the derivative coefficient is set according to the response speed requirements. The control system also includes a real-time monitoring module that obtains the actual joint position through encoder feedback and monitors the contact force of the end effector through force sensors. When an abnormal force signal is detected, the movement is immediately stopped and an alarm is triggered. The motion control accuracy reaches 0.1 mm, and the repeatability is 0.05 mm, fully meeting the accuracy requirements of nail art inkjet printing.
[0122] In one specific embodiment, the process of inputting the inkjet path file into the six-degree-of-freedom robotic arm control system for motion control processing can specifically include the following steps:
[0123] The inkjet path file is processed by the task planning layer to obtain the angle sequence data of each joint of the robotic arm.
[0124] Based on the angle sequence data, a predictive control algorithm is used to perform trajectory tracking to obtain a motion trajectory that keeps the nozzle perpendicular to the nail surface and at a constant distance of 5 mm.
[0125] The motion trajectory is processed by a PID controller to obtain control commands for each joint motor.
[0126] The printing process is visually adjusted based on the real-time monitoring signal from the side camera to obtain printing status prediction data optimized by the Kalman filter.
[0127] Based on the predicted printing status data, the printing parameters are dynamically adjusted to obtain the printing operation result of completing the nail pattern printing.
[0128] Specifically, the task planning layer receives a painting path file containing 314 path points. Each path point records its 3D position coordinates in the nail coordinate system, painting pressure value, movement speed, and timestamp information. The path parsing process first converts the position coordinates in the nail coordinate system to those in the robotic arm base coordinate system. This conversion process considers the nail's specific position and orientation within the robotic arm's workspace. The coordinate system transformation is achieved through a homogeneous transformation matrix, which includes a rotation matrix and a translation vector. The rotation matrix describes the directional relationship between the nail coordinate system and the base coordinate system, while the translation vector describes the position of the origin of the nail coordinate system within the base coordinate system. The inverse kinematics algorithm calculates the angle values of the six joints based on the target position and orientation of the end effector. The algorithm combines geometric analysis with numerical iteration. First, it establishes position constraint equations using the robotic arm's geometric parameters and kinematic model. Then, it solves for the angles of the first three joints using algebraic methods. Finally, it calculates the angles of the last three joints based on the end effector's orientation requirements. The inverse kinematics solution process needs to handle multiple solutions, where the same end position corresponds to multiple sets of joint angle solutions. The algorithm selects the solution closest to the current joint configuration to reduce the range of joint motion and avoid unnecessary large joint rotations. The angle sequence data contains six joint angle values corresponding to each path point. The data format is timestamp, joint 1 angle, joint 2 angle, joint 3 angle, joint 4 angle, joint 5 angle, and joint 6 angle. The angle unit is degrees, and the time unit is seconds.
[0129] The predictive control algorithm is designed based on model predictive control theory. Within each control cycle, the algorithm predicts the system state for the next 10 time steps. The predictive model uses the kinematic and dynamic equations of the robotic arm to describe the relationship between joint angles, angular velocities, and angular accelerations. The core objective of trajectory tracking is to ensure that the nozzle always maintains a perpendicular attitude to the nail surface at a constant distance of 5 mm. The perpendicular attitude constraint is achieved by controlling the attitude angle of the end effector, requiring the Z-axis direction of the end effector to be parallel to the normal vector of the nail surface. The distance constraint is achieved by controlling the difference between the Z-coordinate of the end effector and the height of the nail surface. The optimization objective function of the predictive control algorithm includes a tracking error term and a control smoothing term. The tracking error term measures the deviation between the predicted trajectory and the desired trajectory, while the control smoothing term ensures smooth changes in control input between adjacent time steps, avoiding mechanical shocks and vibrations. The algorithm uses a quadratic programming solver to calculate the optimal control sequence. The solution process considers constraints such as joint angle limits, angular velocity limits, and angular acceleration limits. Joint angle limits are determined based on the mechanical structure of the robotic arm, angular velocity limits are determined based on motor performance, and angular acceleration limits are determined based on load inertia and torque capacity. Predictive control employs a rolling optimization strategy, executing only the first control variable in each control cycle, and then updating the prediction window and re-optimizing based on the actual system state to ensure the real-time performance and robustness of the control.
[0130] The PID controller designs an independent position control loop for each joint. The controller calculates the control output based on the deviation between the desired and actual joint angles. This deviation signal is obtained through encoder feedback, with an encoder resolution of 1024 pulses per revolution and an angle measurement accuracy of 0.35 degrees. The proportional control term coefficient is set according to the load inertia and stiffness characteristics of each joint. Joints 1 and 2 bear larger load inertia, so the proportional coefficient is set larger to improve response speed. Joints 4, 5, and 6 have smaller loads, so the proportional coefficient is appropriately reduced to avoid overshoot. The integral control term coefficient is set according to the system's steady-state accuracy requirements. Integral action eliminates steady-state errors but reduces system stability; the integral coefficient setting needs to balance accuracy and stability. Integral separation technology is used to shut down integral action when the deviation is large to avoid integral saturation. The derivative control term coefficient is set according to the system's response speed and anti-interference capability requirements. Derivative action improves the system's dynamic performance but amplifies noise signals. A low-pass filter is used to filter the derivative signal, with the filter cutoff frequency set to 50Hz. The output of the PID controller is sent to the servo motor driver after being saturated and limited. The output limit range is determined according to the rated torque of the motor to prevent damage to the motor or transmission mechanism due to excessive control. The control command is sent in the form of a PWM signal with a frequency of 20kHz and a duty cycle range of 0-100%, corresponding to the maximum torque output of the motor in both forward and reverse directions.
[0131] A side-facing camera captures real-time images of the printing process at 25 frames per second. The camera's placement allows for clear observation of the relative position of the printhead to the nail surface and the printing effect. Visual feedback adjustment processing includes three steps: image preprocessing, feature extraction, and state estimation. Image preprocessing uses Gaussian filtering to remove noise. Feature extraction algorithms detect the printhead position, nail boundary, and color distribution of the printed area. The printhead position is identified using a circular detection algorithm to determine its circular outline. The nail boundary is extracted using an edge detection algorithm. The printed area is identified using a color segmentation algorithm to identify regions with colors different from the background. Color distribution analysis uses an RGB histogram statistical method, dividing the image into several sub-regions, statistically analyzing the RGB color distribution of each sub-region, and comparing it with the expected pattern colors to calculate color deviation. Parameter adjustment is triggered when the color deviation exceeds a threshold. Boundary sharpness is evaluated by calculating the gradient magnitude variance of the printed area boundary. A large gradient magnitude and small variance indicate a sharp boundary, while a small gradient magnitude or large variance indicates a blurry boundary requiring adjustment of printing parameters. The state vector of the Kalman filter includes the X, Y, and Z coordinates of the nozzle position, three components of the nozzle movement speed, and the printing quality index. The state transition matrix is determined based on the kinematic model of the robotic arm. The observation matrix maps the state variables to visual measurements. The process noise covariance matrix describes the uncertainty of the system model, and the observation noise covariance matrix describes the error characteristics of the visual measurements.
[0132] The dynamic adjustment of printing parameters corrects the printing pressure and travel speed in real time based on the state prediction data output by the Kalman filter. The adjustment strategy is based on the closed-loop control principle: when a light color is detected, the printing pressure is increased or the travel speed is decreased; when a dark color is detected, the printing pressure is decreased or the travel speed is increased; when blurred boundaries are detected, the travel speed is decreased to increase printing accuracy. The parameter adjustment range is determined according to the magnitude of the deviation, using a piecewise linear adjustment strategy. Small deviations are fine-tuned to avoid over-adjustment, while large deviations are adjusted more significantly for rapid correction. During the adjustment process, the impact of parameter changes on system stability is considered, and parameter change rate limits are set to prevent system oscillations caused by sudden parameter changes. The pressure adjustment rate is limited to 0.2 MPa per second, and the speed adjustment rate is limited to 5 millimeters per second. The dynamic adjustment algorithm also includes a learning mechanism, recording the optimal parameter settings for different pattern areas to provide a reference for printing similar areas. The learning data is stored in a parameter database, which uses pattern feature indexing for quick querying and matching. The results of the inkjet printing operation are quantitatively evaluated using a quality assessment algorithm. The evaluation indicators include four dimensions: color consistency, boundary clarity, pattern integrity, and overall aesthetics. Each dimension uses a scoring system of 0-100 points, and the comprehensive score serves as an objective evaluation standard for inkjet printing quality.
[0133] The image recognition-based nail art printing method in the embodiments of this application has been described above. The image recognition-based nail art printing system in the embodiments of this application is described below. Please refer to... Figure 2 One embodiment of the image recognition-based nail art inkjet system in this application includes:
[0134] The shooting module is used to capture and process nails from multiple angles using a high-resolution camera to obtain a set of original nail images including a front view, a left view, and a right view;
[0135] The recognition module is used to perform contour recognition processing on the original nail image group using a polygon contour fitting algorithm to obtain nail contour parameters including the coordinates of key feature points, contour boundary lines, and geometric centers.
[0136] The transformation module is used to adaptively transform the preset patterns in the pattern template library according to the nail contour parameters to obtain an adapted pattern template that matches the geometric features of the nail.
[0137] The planning module is used to perform path planning on the adapted pattern template using a genetic algorithm to obtain a printing path file containing coordinate sequences, printing parameters, and timestamps, and to control a six-degree-of-freedom robotic arm to perform printing operations based on the printing path file.
[0138] above Figure 2The image recognition-based nail art printing system in this embodiment of the invention will be described in detail from the perspective of modular functional entities. The image recognition-based nail art printing device in this embodiment of the invention will be described in detail from the perspective of hardware processing.
[0139] Reference Figure 3 This invention also provides an image recognition-based nail art printing device, which can be a server, and its internal structure can be as follows: Figure 3 As shown, the image recognition-based nail art printing device includes a processor, memory, display screen, input device, network interface, and database connected via a system bus. The processor, designed as a computer, provides computing and control capabilities. The memory of the image recognition-based nail art printing device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the image recognition-based nail art printing device stores the data corresponding to this embodiment. The network interface of the image recognition-based nail art printing device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the above-described method.
[0140] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the image recognition-based nail art inkjet printing device to which the present invention is applied.
[0141] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the image recognition-based nail art spraying method.
[0142] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0143] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause an image recognition-based nail art spraying device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0144] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A nail art spraying method based on image recognition, characterized in that, The method includes: By using a high-resolution camera to capture and process nail images from multiple angles, a set of original nail images including a front view, a left view, and a right view is obtained. Based on the original nail image set, contour recognition processing is performed using a polygon contour fitting algorithm to obtain nail contour parameters including the coordinates of key feature points, contour boundary lines, and geometric centers. The preset patterns in the pattern template library are adaptively transformed according to the nail contour parameters to obtain an adapted pattern template that matches the nail's geometric features. The adapted pattern template is processed using a genetic algorithm for path planning to obtain a printing path file containing coordinate sequences, printing parameters, and timestamps. A six-degree-of-freedom robotic arm is then controlled to perform printing operations based on this printing path file. This process includes: decomposing the adapted pattern template into regions using a connected component analysis algorithm to obtain pattern partitioning results containing multiple independent printing areas; performing internal path planning for each printing area in the pattern partitioning results using a spiral path generation algorithm to obtain local path coordinates for each area; globally optimizing the local path coordinates based on the objective function of the genetic algorithm to obtain an optimal path sequence including printing time, color transitions, and repetition penalties; calibrating the optimal path sequence based on the printhead's physical characteristics to obtain the printing path file containing nozzle pressure, moving speed, and timestamps; and inputting the printing path file into the six-degree-of-freedom robotic arm control system for motion control processing to obtain the printing operation execution result.
2. The nail art inkjet printing method based on image recognition according to claim 1, characterized in that, The process involves capturing images of the nail from multiple angles using a high-resolution camera to obtain a set of original nail images, including a front view, a left view, and a right view. A ring-shaped LED light source array is used to uniformly illuminate the nail surface, resulting in a lighting environment that eliminates shadows and glare interference. The shooting area is monitored and processed based on the finger position detection algorithm to obtain the trigger signal that the fingernail has completely entered the shooting area; Based on the trigger signal, multiple cameras are synchronously controlled to perform shooting and processing to obtain front view image, left view image and right view image of the fingernail; The front view image, left view image, and right view image are denoised using an adaptive Gaussian filter to obtain a clear image with noise removed. The clear image is converted from the RGB color space to the HSV color space to obtain the original nail image set.
3. The nail art inkjet printing method based on image recognition according to claim 1, characterized in that, The process of performing contour recognition based on the original nail image group using a polygon contour fitting algorithm to obtain nail contour parameters including the coordinates of key feature points, contour boundary lines, and geometric center includes: The original nail images are input into the NailNet deep learning network for feature extraction to obtain a multi-layer feature map containing nail boundary information. The multi-layer feature map is processed by deep feature learning through five convolutional layers and three fully connected layers to obtain a high-dimensional feature vector of the nail contour. The high-dimensional feature vector is optimized and trained based on the polygon geometric constraint loss function PNIoU to obtain the contour parameter prediction model. The output of the contour parameter prediction model is simplified into polygons using the Douglas-Peucker algorithm to obtain the coordinates of key feature points and the contour boundary line of the nail contour. The nail contour parameters are obtained by solving the geometric center problem using the centroid calculation formula based on the coordinates of the key feature points and the contour boundary line.
4. The nail art inkjet printing method based on image recognition according to claim 3, characterized in that, The step of inputting the original nail image set into the NailNet deep learning network for feature extraction processing to obtain a multi-layer feature map containing nail boundary information includes: The original nail image group was subjected to 256×256 pixel size standardization processing to obtain network input images of uniform specifications; The network input image is input into the first convolutional layer for basic feature extraction processing, resulting in a primary feature map processed by 64 3×3 convolutional kernels. The primary feature map is subjected to dimensionality reduction through a max pooling layer to obtain a pooled feature map with reduced spatial resolution; Based on the pooled feature map, contour boundary feature extraction is performed through the second and third convolutional layers to obtain contour feature maps processed by 128 and 256 5×5 convolutional kernels, respectively. The contour feature map is processed by activation function and batch normalization to obtain the multi-layer feature map containing nail boundary information.
5. The nail art inkjet printing method based on image recognition according to claim 1, characterized in that, The step of adaptively transforming a preset pattern from the pattern template library according to the nail contour parameters to obtain an adapted pattern template that matches the nail's geometric features includes: The pattern template library is filtered based on user preference settings and the nail outline parameters to obtain a set of candidate patterns that conform to the nail size range and shape characteristics. The aspect ratio of the pattern templates in the candidate pattern set is adjusted according to the coordinates of the key feature points to obtain a scaled pattern that matches the nail outline. The scaled pattern is rotated based on the geometric center to obtain a rotated pattern that is aligned with the direction of the fingernail. The rotating pattern is subjected to perspective transformation based on the outline boundary line to obtain a perspective pattern that compensates for the curvature of the nail surface. The perspective pattern is processed by a coordinate mapping algorithm to determine the pixel position, thereby obtaining the adaptive pattern template that records the position of each pixel on the nail surface.
6. The nail art inkjet printing method based on image recognition according to claim 1, characterized in that, The step of inputting the inkjet path file into the six-degree-of-freedom robotic arm control system for motion control processing to obtain the inkjet operation execution result includes: The inkjet path file is processed by the task planning layer to obtain the angle sequence data of each joint of the robotic arm. Based on the angle sequence data, a predictive control algorithm is used to perform trajectory tracking to obtain a motion trajectory that keeps the nozzle perpendicular to the nail surface and at a constant distance of 5 mm. The motion trajectory is processed by a PID controller to obtain control commands for each joint motor. The printing process is visually adjusted based on the real-time monitoring signal from the side camera to obtain printing status prediction data optimized by the Kalman filter. Based on the predicted printing status data, the printing parameters are dynamically adjusted to obtain the printing operation result of completing the nail pattern printing.
7. A nail art inkjet printing system based on image recognition, characterized in that, For implementing the image recognition-based nail art inkjet printing method as described in any one of claims 1-6, the image recognition-based nail art inkjet printing system comprises: The shooting module is used to capture and process nails from multiple angles using a high-resolution camera to obtain a set of original nail images including a front view, a left view, and a right view; The recognition module is used to perform contour recognition processing on the original nail image group using a polygon contour fitting algorithm to obtain nail contour parameters including the coordinates of key feature points, contour boundary lines, and geometric centers. The transformation module is used to adaptively transform the preset patterns in the pattern template library according to the nail contour parameters to obtain an adapted pattern template that matches the geometric features of the nail. The planning module is used to perform path planning on the adapted pattern template using a genetic algorithm to obtain a printing path file containing coordinate sequences, printing parameters, and timestamps. Based on this printing path file, it controls a six-degree-of-freedom robotic arm to perform printing operations. This includes: performing region decomposition on the adapted pattern template using a connected component analysis algorithm to obtain pattern partitioning results containing multiple independent printing areas; performing internal path planning on each printing area in the pattern partitioning results using a spiral path generation algorithm to obtain local path coordinates for each area; performing global optimization on the local path coordinates based on the objective function of the genetic algorithm to obtain an optimal path sequence including printing time, color transitions, and repetition penalties; calibrating the printing parameters of the optimal path sequence based on the nozzle physical characteristics parameters to obtain the printing path file containing nozzle pressure, moving speed, and timestamps; and inputting the printing path file into the six-degree-of-freedom robotic arm control system for motion control processing to obtain the printing operation execution result.
8. A nail art inkjet printing device based on image recognition, characterized in that, The method includes a memory and a processor, the memory storing a computer program that can run on the processor, and the processor executing the computer program to implement the image recognition-based nail art spraying method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is run by the processor, it causes the processor to perform the nail art spraying method based on image recognition as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Nail beautifying device, nail beautifying method and health management and information pushing method based on nail beautifying device
CN118303714A
Intelligent paint spraying method and device based on visual recognition and electronic equipment
CN119973984A