Charging method and system adaptive to user behavior characteristics
By using an algorithm model that adapts to user behavior characteristics, and employing 3D rotation angle and spline curve algorithms, the problem of inaccurate judgment of skin lesion areas in medical aesthetic billing is solved, resulting in more accurate billing results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU ZONERICH COMP EQUIP
- Filing Date
- 2026-02-07
- Publication Date
- 2026-05-08
AI Technical Summary
The accuracy of billing in existing medical aesthetic institutions is low due to the complex three-dimensional structure of the face, differences in shooting angles, skin deformation, and external obstructions, which lead to low accuracy in judging the area of skin damage.
By using an algorithm model that adapts to user behavior characteristics, the perspective shortening effect is corrected by a three-dimensional rotation angle, and the skin compression deformation caused by facial expressions is compensated by a continuous function. Finally, the spline curve algorithm is used to geometrically fit the occluded area, so as to achieve accurate billing for the skin lesion area.
It significantly improves the objectivity, standardization, and automation of medical aesthetic billing, enhances the accuracy of judging the actual size of the skin lesion area, and improves the accuracy of billing.
Smart Images

Figure CN121998723A_ABST
Abstract
Description
Technical Field
[0001] This invention generally relates to the field of image processing technology. More specifically, this invention relates to a billing method and system that adapts to user behavior characteristics. Background Technology
[0002] With the development of the medical aesthetics industry, the demand for refined management of procedures such as facial pigmentation, mole, or tattoo treatment is increasing. However, most medical aesthetics institutions still use traditional models of manual estimation or fixed area pricing for billing. Although some existing technologies attempt to use image recognition to divide the treatment area into fixed-size billing units for automatic statistics, in practical applications, due to the complex three-dimensional structure of the human face, the apparent pixel size of the same lesion in the image will vary significantly depending on whether it is viewed from the front, side, or at different shooting distances.
[0003] Furthermore, human tissue exhibits flexible deformation characteristics. Facial expressions during photography (such as laughing or squinting) or the effects of gravity can cause skin wrinkling or stretching, resulting in non-linear changes in pixel density in the lesion area. Additionally, obstructions such as hair, eyeglass frames, or masks often exist in actual shooting scenarios, leading to an underestimation of the lesion area. These interferences caused by shooting angle, skin deformation, and external obstructions result in low accuracy in current billing methods due to the low accuracy of lesion area assessment in practical billing scenarios. Summary of the Invention
[0004] To address the technical problem of low billing accuracy due to low accuracy in judging the lesion area in the above-mentioned actual charging scenarios, the present invention provides solutions in the following aspects.
[0005] In a first aspect, a billing method based on adaptive user behavior features includes: obtaining a patient's facial image; calculating the pixel grayscale gradient field of the original image; and identifying a facial region based on the gradient vector of the pixel grayscale gradient field; binarizing the facial region to obtain a binarized pixel matrix; traversing the neighborhood connectivity relationships of each pixel in the binarized pixel matrix; clustering spatially adjacent pixels with the same pixel value into connected components; constructing multiple topological feature data subsets; and calculating and extracting the center point pixel coordinates of each topological feature data subset, wherein the... k The subset of topological feature data includes the first kAll coordinates in a connected domain, one of which is a subset of topological feature data, which is the set of eye pixel coordinates; calculate the three-dimensional rotation angle of the head based on the distance between the pixel coordinates of each center point; determine the skin compression ratio based on the aspect ratio data of the pixels in the eye pixel coordinate set; obtain the skin lesion pixel region and occlusion mask data in the facial region; calculate the correction coefficient of each pixel in the skin lesion pixel region based on the three-dimensional rotation angle and the skin compression ratio; perform geometric fitting on the skin lesion edge truncated by the occlusion mask data to determine the equivalent number of pixels below the mask; calculate the billing value based on the correction coefficient of each pixel in the skin lesion pixel region and the equivalent number of pixels.
[0006] Preferably, calculating the pixel grayscale gradient field of the original image and identifying the facial region based on the gradient vector of the pixel grayscale gradient field includes: calculating the partial derivatives of each pixel in the original image in the horizontal and vertical directions to construct a two-dimensional gradient vector field; identifying the set of vectors in the gradient vector field that converge towards the center, and determining the closed region pointed to by the set of vectors as the facial region.
[0007] Preferably, clustering spatially adjacent pixels with the same pixel value into connected components includes: extracting pixel edges within the facial region using the Canny operator; calculating the optimal global threshold according to the Otsu algorithm and binarizing the image to determine the geometric boundaries of the topological feature subdomains; and performing a traversal scan based on the 8-neighborhood connectivity of the pixel space to cluster adjacent pixels with the same pixel value into connected components.
[0008] Preferably, extract the first k The center point pixel coordinates of the nth topological feature data subset include: calculating the nth... k The x-coordinate of the center pixel of a subset of topological feature data The calculation formula is as follows: , x k,j For the first k In the connected component, the first j The x-coordinate of each pixel coordinate. m k For the first k The number of all pixels in the connected components; calculate the number of pixels in the first connected component. k The center pixel ordinate of a subset of topological feature data , obtained the k The pixel coordinates of the center point of each subset of topological feature data are calculated using the following formula: , y k,j For the first k In the connected component, the first j The ordinate of each pixel coordinate.
[0009] Preferably, the multiple topological feature data subsets include a set of left / right eye pixel coordinates, a set of nose pixel coordinates, and a set of facial contour pixel coordinates; wherein the center point pixel coordinate of the left eye pixel coordinate set is designated as the left eye center coordinate, the center point pixel coordinate of the right eye pixel coordinate set is designated as the right eye center coordinate, the center point pixel coordinate of the nose pixel coordinate set is designated as the nose center coordinate, and the center point pixel coordinate of the facial contour pixel coordinate set is designated as the facial center coordinate.
[0010] Preferably, calculating the three-dimensional rotation angle of the head includes: calculating the symmetry eigenvalues. R h The calculation formula is as follows: , x R The x-coordinate of the center of the right eye. x L The x-coordinate of the center coordinate of the left eye. x N The x-coordinate of the nasal center is used; calculate the longitudinal proportional eigenvalue. R v The calculation formula is as follows: , d LR-N The perpendicular distance from the center coordinates of the nose to the line connecting the center coordinates of the left and right eyes. d L-R Calculate the distance between the coordinates of the left and right eye centers; calculate the horizontal rotation angle. θ y The calculation formula is as follows: , is the field of view angle corresponding to the interocular distance captured by the camera in the frontal reference state; calculate the vertical pitch angle. θ p The three-dimensional rotation deflection angle is obtained. The calculation formula is as follows: , is vertical R v0 The baseline value is the vertical proportional feature value of the preset size.
[0011] Preferably, determining the skin compression rate based on the aspect ratio data of pixels within the eye pixel coordinate set includes: obtaining the pixel distribution ratio of the eye pixel set in the vertical and horizontal directions, and calculating the aspect ratio; comparing the aspect ratio with a preset aspect ratio threshold, wherein if the aspect ratio is lower than the aspect ratio threshold, it is determined that the skin is in a folded and compressed state; and calculating the skin compression rate using a continuous function based on the linear difference between the aspect ratio and the threshold.
[0012] Preferably, the geometric fitting of the lesion edge truncated by the occlusion mask data to determine the equivalent number of pixels below the mask includes: obtaining the intersection boundary between the occlusion mask data and the lesion pixel region, and extracting the rate of curvature change of the lesion edge on both sides of the boundary; using a spline curve algorithm to perform geometric path prediction within the occlusion mask region based on the rate of curvature change, constructing a logically connected closed simulated lesion edge; and calculating the equivalent number of pixels enclosed by the simulated lesion edge within the area covered by the occlusion mask data. .
[0013] Preferably, calculating the billing value based on the correction coefficients of each pixel within the lesion pixel region and the equivalent number of pixels includes: obtaining the first value based on the three-dimensional rotation angle. i The angle between the surface normal vector of each damaged pixel and the lens optical axis The first result is obtained based on the skin compression ratio. i Linear compensation coefficient for each lesion pixel ; Calculate the first i Adaptive correction coefficient for each damaged pixel K i The formula is: ; Calculate the billing value P The calculation formula is as follows: , which is the preset price unit.
[0014] In a second aspect, an adaptive user behavior characteristic billing system includes a processor and a memory, the memory storing a computer program, the processor executing the computer program to implement an adaptive user behavior characteristic billing method as described in any one of the above-described inventions.
[0015] The beneficial effects of this invention are as follows: This invention utilizes an algorithm model that adapts to user behavior characteristics, corrects perspective shortening effects using a three-dimensional rotation angle, compensates for skin compression deformation caused by facial expressions using continuous functions, and uses a spline curve algorithm to geometrically fit and restore the occluded area. This enables billing based on actual physical load, significantly improving the objectivity, standardization, and automation of medical aesthetic billing, and enhancing the accuracy of judging the actual size of the lesion area, thereby improving billing accuracy. Attached Figure Description
[0016] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent upon reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the invention are illustrated by way of example and not limitation, and like or corresponding reference numerals denote like or corresponding parts, wherein: Figure 1This is a flowchart illustrating the steps of an adaptive user behavior feature-based billing method according to an embodiment of the present invention; Figure 2 This is a schematic block diagram illustrating the structure of a billing system based on adaptive user behavior characteristics according to this embodiment. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0019] Figure 1 This is a flowchart illustrating the steps of a billing method based on adaptive user behavior characteristics according to an embodiment of the present invention.
[0020] like Figure 1 As shown, an adaptive user behavior characteristic billing method includes steps S1 to S6.
[0021] Step S1: Obtain the patient's facial image, calculate the pixel grayscale gradient field of the original image, and identify the facial region based on the gradient vector of the pixel grayscale gradient field.
[0022] In one embodiment, calculating the pixel grayscale gradient field of the original image and identifying the facial region based on the gradient vector of the pixel grayscale gradient field includes: calculating the partial derivatives of each pixel in the original image in the horizontal and vertical directions to construct a two-dimensional gradient vector field; identifying the set of vectors in the gradient vector field that converge towards the center, and determining the closed region pointed to by the set of vectors as the facial region.
[0023] It should be noted that the embodiment utilizes pixel grayscale gradient fields for facial region recognition, with the core logic lying in leveraging the topological convergence of the facial structure. After grayscale preprocessing, the grayscale value distribution of each pixel in the original image reflects the facial contours. By calculating the partial derivatives in the horizontal and vertical directions, a gradient vector can be constructed.
[0024] In geometrical optics imaging, the contours of a face and its major features (such as eye sockets, nose, and mouth) typically form a significant contrast gradient, and these gradient vectors tend to converge toward the center. In practice, this convergence is achieved through an adaptive weighted voting mechanism.
[0025] For example, when processing images with complex backgrounds, hair edges or collars may generate strong local gradients, but these gradients are often linear or divergent. However, due to its near-ellipsoidal biological structure, the normal vectors of the facial region exhibit strong centripetal symmetry when mapped onto the projection plane. By identifying the set of vectors converging towards the center in the gradient vector field, environmental disturbances (such as wallpaper textures and shadows) can be effectively eliminated.
[0026] In one embodiment, calculating the pixel grayscale gradient field of the original image and identifying the facial region based on the gradient vector of the pixel grayscale gradient field includes: calculating the partial derivatives of each pixel in the original image in the horizontal and vertical directions to construct a two-dimensional gradient vector field; identifying the set of vectors in the gradient vector field that converge towards the center, and determining the closed region pointed to by the set of vectors as the facial region.
[0027] It's worth noting that the Canny (Canny Edge Detector) operator, through nonmaximum suppression and dual threshold detection, can accurately capture minute details of lesion edges or facial contours, which is crucial for determining the smoothness of the skin surface. The Otsu algorithm (Otsu's method / maximum inter-class variance method), on the other hand, is a binarization method that automatically finds the globally optimal threshold. By maximizing the inter-class variance, it can effectively separate the target (such as lesions) from the normal skin background even in environments with uneven lighting.
[0028] Step S2: Binarize the facial region to obtain a binary pixel matrix; traverse the neighborhood connectivity of each pixel in the binary pixel matrix, and cluster spatially adjacent pixels with the same pixel value into connected components.
[0029] In one embodiment, clustering spatially adjacent pixels with the same pixel value into connected components includes: extracting pixel edges within the facial region using the Canny operator; calculating the optimal global threshold according to the Otsu algorithm and binarizing the image to determine the geometric boundaries of the topological feature subdomains; and performing a traversal scan based on the 8-neighborhood connectivity of the pixel space to cluster adjacent pixels with the same pixel value into connected components.
[0030] It's important to note that the traversal scan of the 8-neighborhood connectivity is to ensure the integrity of topological features. In the binary matrix, isolated noise points are treated as noise and removed, while spatially related pixel blocks are clustered into connected components. For example, when dealing with facial acne, a swollen area may consist of thousands of neighboring pixels at the pixel level. The 8-neighborhood algorithm, by examining the eight directions surrounding each pixel, ensures that even with irregular shapes and subtle breaks in the edges, regions belonging to the same lesion can be completely identified.
[0031] Step S3: Construct multiple topological feature data subsets and calculate the pixel coordinates of the center point of each topological feature data subset.
[0032] Among them, the k The subset of topological feature data includes the first k All coordinates in a connected domain, where one subset of topological feature data is the set of eye pixel coordinates.
[0033] In one embodiment, extract the first k The center point pixel coordinates of the nth topological feature data subset include: calculating the nth... k The x-coordinate of the center pixel of a subset of topological feature data The calculation formula is as follows: , x k,j For the first k In the connected component, the first j The x-coordinate of each pixel coordinate. m k For the first k The number of all pixels in the connected components; calculate the number of pixels in the first connected component. k The center pixel ordinate of a subset of topological feature data , obtained the k The pixel coordinates of the center point of each subset of topological feature data are calculated using the following formula: , y k,j For the first k In the connected component, the first j The ordinate of each pixel coordinate.
[0034] It should be noted that calculating the center point pixel coordinates of a subset of topological feature data involves calculating the geometric centroid of all pixels within that region. This invention ensures that even if the shape of the connected region is extremely irregular (such as long, narrow scratches or scattered rashes), the obtained center point can accurately reflect the physical centroid of the feature region.
[0035] In practice, the calculated center point coordinates are used as anchor points to construct the three-dimensional coordinate system of the face. For example, when a patient slightly lowers or raises their head, the relative displacement between the center points of the eyes and the nose is a very sensitive feedback signal. If edge coordinates are used directly, errors will occur due to edge fluctuations caused by shadow occlusion, while using globally averaged center coordinates can statistically offset these local disturbances.
[0036] Step S4: Calculate the three-dimensional rotation angle of the head based on the distance between the pixel coordinates of each center point; determine the skin compression rate based on the aspect ratio data of the pixels in the eye pixel coordinate set.
[0037] In one embodiment, the multiple topological feature data subsets include a set of left / right eye pixel coordinates, a set of nose pixel coordinates, and a set of facial contour pixel coordinates; wherein the center pixel coordinate of the left eye pixel coordinate set is designated as the left eye center coordinate, the center pixel coordinate of the right eye pixel coordinate set is designated as the right eye center coordinate, the center pixel coordinate of the nose pixel coordinate set is designated as the nose center coordinate, and the center pixel coordinate of the facial contour pixel coordinate set is designated as the facial center coordinate.
[0038] It should be noted that, in one embodiment, calculating the three-dimensional rotation angle of the head includes: calculating the symmetry eigenvalues. R h The calculation formula is as follows: , x R The x-coordinate of the center of the right eye. x L The x-coordinate of the center coordinate of the left eye. x N The x-coordinate of the nasal center is used; calculate the longitudinal proportional eigenvalue. R v The calculation formula is as follows: , d LR-N The perpendicular distance from the center coordinates of the nose to the line connecting the center coordinates of the left and right eyes. d L-R Calculate the distance between the coordinates of the left and right eye centers; calculate the horizontal rotation angle. θ y The calculation formula is as follows: , is the field of view angle corresponding to the interocular distance captured by the camera in the frontal reference state; calculate the vertical pitch angle. θ p The three-dimensional rotation deflection angle is obtained. The calculation formula is as follows: , is vertical R v0 The baseline value is the vertical proportional feature value of the preset size.
[0039] It should be noted that since the camera captures a three-dimensional projection of the face onto a two-dimensional plane, when the face rotates to the side or tilts, the area of skin damage in the two-dimensional image will appear to shrink visually due to perspective shortening. By calculating symmetry eigenvalues and longitudinal proportion eigenvalues, the pose of the face in three-dimensional space can be inferred.
[0040] In a specific embodiment, the calculation of the horizontal rotation angle depends on the field of view angle. When R h A deviation of 1 indicates that the face has turned to the left or right; the larger the deviation, the greater the angle of turn. Similarly, θ p (Vertical pitch angle) is determined by comparing the current longitudinal scale with the reference value. R v The cosine relationship is derived. The algorithm of this invention can capture this set of angle parameters in real time. This set of deflection angles is used for subsequent calculation of correction coefficients.
[0041] In one embodiment, determining the skin compression rate based on the aspect ratio data of pixels within the eye pixel coordinate set includes: obtaining the pixel distribution ratio of the eye pixel set in the vertical and horizontal directions, and calculating the aspect ratio; comparing the aspect ratio with a preset aspect ratio threshold, wherein if the aspect ratio is lower than the aspect ratio threshold, it is determined that the skin is in a folded and compressed state; and calculating the skin compression rate using a continuous function based on the linear difference between the aspect ratio and the threshold.
[0042] It should be noted that the introduction of skin compression ratio is to address errors caused by the flexible deformation of human tissue. When a face makes facial expressions (such as winking or laughing) or is affected by gravity, local skin wrinkles or stretches, leading to changes in pixel density in the affected area. By analyzing the aspect ratio of the eye area, this compression state can be effectively identified.
[0043] As one of the most expressive areas of the face, the changes in the aspect ratio of the eye area are an excellent indicator of the overall skin tension. When the calculated aspect ratio is lower than a preset threshold, the system determines that the skin is in a folded and compressed state. At this time, the damaged pixels are visually compressed, and without compensation, the amount of skin damage per unit area will be underestimated. This invention uses a continuous function to calculate the skin compression rate based on the linear difference between the aspect ratio and the threshold. This is similar to an adaptive elastic modulus compensation, restoring the compressed skin to a reference point in a natural, relaxed state. In real-world scenarios, such as detecting crow's feet at the corners of the eyes or nearby pigmentation, subtle stacking of the skin can lead to pixel overlap.
[0044] Step S5: Obtain the lesion pixel region and occlusion mask data in the facial region; calculate the correction coefficient of each pixel in the lesion pixel region based on the three-dimensional rotation angle and the skin compression ratio.
[0045] In one embodiment, geometric fitting of the lesion edge truncated by the occlusion mask data to determine the equivalent number of pixels below the mask includes: obtaining the intersection boundary between the occlusion mask data and the lesion pixel region, and extracting the rate of curvature change of the lesion edge on both sides of the boundary; using a spline curve algorithm to perform geometric path prediction within the occlusion mask region based on the rate of curvature change, constructing a logically connected closed simulated lesion edge; and calculating the equivalent number of pixels enclosed by the simulated lesion edge within the area covered by the occlusion mask data. .
[0046] It should be noted that in actual photography, facial lesions are often obscured by hair, eyeglass frames, or the edges of masks. Simply ignoring the obscured parts will lead to an underestimation of the lesion area. This embodiment constructs occlusion mask data and performs geometric fitting on the mask edges to restore the invisible equivalent pixels. This invention utilizes the principle of continuity of lesion growth edges, that is, the edges of biological lesions usually follow a certain curvature pattern, rather than random mutations.
[0047] In a specific embodiment, the curvature change rate on both sides of the occlusion boundary is extracted, and a spline curve algorithm is used for path prediction. Spline curves can generate smooth, logically consistent closed curves, thus constructing a logically connected simulated lesion edge below the mask. Subsequently, the equivalent number of pixels within this closed region is calculated. Through the geometric fitting described herein, this can be identified as a whole, and the occluded area can be compensated, resulting in a billing result that more accurately reflects reality.
[0048] In one embodiment, the continuous function is expressed as: , The difference in aspect ratio. This is the skin compression ratio. In this formula, as long as the aspect ratio increases even slightly, the output compression ratio will only increase by a factor of k.
[0049] Step S6: Perform geometric fitting on the skin lesion edge truncated by the masking data to determine the equivalent number of pixels below the mask; calculate the billing value based on the correction coefficient of each pixel in the skin lesion pixel area and the equivalent number of pixels.
[0050] In one embodiment, calculating the billing value based on the correction coefficients of each pixel within the lesion pixel region and the equivalent number of pixels includes: obtaining the first value based on the three-dimensional rotation angle. i The angle between the surface normal vector of each damaged pixel and the lens optical axis The first result is obtained based on the skin compression ratio. i Linear compensation coefficient for each lesion pixel ; Calculate the first i Adaptive correction coefficient for each damaged pixel K i The formula is: ; Calculate the billing value P The calculation formula is as follows: , which is the preset price unit.
[0051] It should be noted that the fitting process for the equivalent pixel count is achieved through geometric prediction: obtaining the intersection boundary between the occlusion mask data and the lesion pixel region; extracting the rate of curvature change of the lesion edge on both sides of the boundary; using the spline curve algorithm, performing geometric path prediction within the occlusion region based on the extracted rate of curvature change; constructing a logically connected closed simulated lesion edge through the above prediction; and finally calculating the number of pixels enclosed by the simulated edge within the occlusion mask coverage area to obtain the equivalent pixel count.
[0052] Obtain the i The angle between the surface normal vector of each damaged pixel and the lens optical axis This includes: deriving the first [unit / item] within the facial lesion area based on the overall three-dimensional rotational posture data. i Individual skin lesion pixels i The surface normal vector. The angle is ultimately determined by the spatial geometric relationship between the normal vector and the lens optical axis (camera shooting direction). .
[0053] Figure 2 This is a schematic block diagram illustrating the structure of a billing system based on adaptive user behavior characteristics according to this embodiment.
[0054] This invention also provides a billing system that adapts to user behavior characteristics. For example... Figure 2 As shown, the system includes a processor and a memory, the memory storing computer program instructions, which, when executed by the processor, implement a billing method based on adaptive user behavior characteristics according to the first aspect of the present invention.
[0055] The system also includes other components well known to those skilled in the art, such as communication interfaces, the settings and functions of which are known in the art and will not be described in detail here.
[0056] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions that can be stored or otherwise maintained by such a computer-readable medium.
[0057] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.
[0058] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A billing method that adapts to user behavior characteristics, characterized in that, include: Obtain the patient's facial image, calculate the pixel grayscale gradient field of the original image, and identify the facial region based on the gradient vector of the pixel grayscale gradient field; The facial region is binarized to obtain a binary pixel matrix; Traverse the neighborhood connectivity of each pixel in the binary pixel matrix, and cluster spatially adjacent pixels with the same pixel value into connected components; Construct multiple topological feature data subsets, calculate and extract the center point pixel coordinates of each topological feature data subset, where the i-th k The subset of topological feature data includes the first k All coordinates in a connected domain, where one subset of topological feature data is the set of eye pixel coordinates; The three-dimensional rotation angle of the head is calculated based on the distance between the pixel coordinates of each center point; the skin compression rate is determined based on the aspect ratio data of the pixels in the eye pixel coordinate set. Obtain the lesion pixel region and occlusion mask data in the facial region; The correction coefficients for each pixel within the lesion pixel region are calculated based on the three-dimensional rotation angle and the skin compression ratio. Geometric fitting is performed on the lesion edge truncated by the masking data to determine the equivalent number of pixels below the mask; The billing value is calculated based on the correction coefficient of each pixel within the lesion pixel area and the equivalent number of pixels.
2. The billing method based on adaptive user behavior characteristics according to claim 1, characterized in that, Calculating the pixel grayscale gradient field of the original image and identifying facial regions based on the gradient vector of the pixel grayscale gradient field includes: Calculate the partial derivatives of each pixel in the original image in the horizontal and vertical directions to construct a two-dimensional gradient vector field; Identify the set of vectors in the gradient vector field that converge towards the center, and determine the closed region pointed to by the set of vectors as the facial region.
3. The billing method based on adaptive user behavior characteristics according to claim 1, characterized in that, Clustering spatially adjacent pixels with the same pixel value into connected components includes: The pixel edges within the facial region are extracted using the Canny operator; the optimal global threshold is calculated using the Otsu algorithm, and the image is binarized to determine the geometric boundaries of the topological feature subdomains. A traversal scan is performed based on the 8-neighborhood connectivity of the pixel space, and adjacent pixels with the same pixel value are clustered into connected components.
4. The billing method based on adaptive user behavior characteristics according to claim 1, characterized in that, Extract the first k The center point pixel coordinates of each subset of topological feature data include: Calculate the first k The x-coordinate of the center pixel of a subset of topological feature data The calculation formula is as follows: , x k,j For the first k In the connected component, the first j The x-coordinate of each pixel coordinate. m k For the first k The number of all pixels in a connected component; Calculate the first k The center pixel ordinate of a subset of topological feature data , obtained the k The pixel coordinates of the center point of each subset of topological feature data are calculated using the following formula: , y k,j For the first k In the connected component, the first j The ordinate of each pixel coordinate.
5. The billing method based on adaptive user behavior characteristics according to claim 4, characterized in that, Multiple topological feature data subsets include left / right eye pixel coordinate sets, nose pixel coordinate sets, and facial contour pixel coordinate sets; wherein the center pixel coordinate of the left eye pixel coordinate set is designated as the left eye center coordinate, the center pixel coordinate of the right eye pixel coordinate set is designated as the right eye center coordinate, the center pixel coordinate of the nose pixel coordinate set is designated as the nose center coordinate, and the center pixel coordinate of the facial contour pixel coordinate set is designated as the facial center coordinate.
6. The billing method based on adaptive user behavior characteristics according to claim 5, characterized in that, Calculating the three-dimensional rotation angle of the head includes: Calculate symmetry eigenvalues R h The calculation formula is as follows: , x R The x-coordinate of the center of the right eye. x L The x-coordinate of the center coordinate of the left eye. x N The x-coordinate is the coordinate of the center of the nose. Calculate the longitudinal proportional eigenvalue R v The calculation formula is as follows: , d LR-N The perpendicular distance from the center coordinates of the nose to the line connecting the center coordinates of the left and right eyes. d L-R This represents the distance between the coordinates of the left eye center and the right eye center. Calculate the horizontal rotation angle θ y The calculation formula is as follows: , is the field of view angle corresponding to the interpupillary distance captured by the camera in the frontal reference state; Calculate the vertical pitch angle θ p The three-dimensional rotation deflection angle is obtained. The calculation formula is as follows: , is vertical R v0 The baseline value is the vertical proportional feature value of the preset size.
7. The billing method based on adaptive user behavior characteristics according to claim 1, characterized in that, The skin compression ratio is determined based on the aspect ratio data of pixels within the eye pixel coordinate set, including: Obtain the pixel distribution ratio of the eye pixel set in the vertical and horizontal directions, and calculate the aspect ratio; The aspect ratio is compared with a preset aspect ratio threshold. If the aspect ratio is lower than the aspect ratio threshold, the skin is determined to be in a folded and compressed state. The skin compression rate is calculated using a continuous function based on the linear difference between the aspect ratio and the threshold.
8. The billing method based on adaptive user behavior characteristics according to claim 1, characterized in that, Geometric fitting of the lesion edge truncated by the occlusion mask data to determine the equivalent number of pixels below the mask includes: Obtain the boundary between the occlusion mask data and the lesion pixel region, and extract the rate of curvature change of the lesion edges on both sides of the boundary; Based on the curvature change rate, the spline curve algorithm is used to predict the geometric path within the occlusion mask area, and a logically connected closed simulated skin lesion edge is constructed. Calculate the equivalent number of pixels enclosed by the simulated lesion edge within the area covered by the occlusion mask data. .
9. The billing method based on adaptive user behavior characteristics according to claim 1, characterized in that, The billing value is calculated based on the correction coefficient of each pixel within the lesion pixel area and the equivalent number of pixels, including: The first is obtained based on the three-dimensional rotation angle. i The angle between the surface normal vector of each damaged pixel and the lens optical axis ; Based on the skin compression rate, the first... i Linear compensation coefficient for each lesion pixel ; Calculate the first i Adaptive correction coefficient for each damaged pixel K i The formula is: ; Calculate billing value P The calculation formula is as follows: , which is the preset price unit.
10. A billing system that adapts to user behavior characteristics, comprising a processor and a memory, characterized in that, The memory stores a computer program, and the processor executes the computer program to implement a billing method that adapts to user behavior characteristics as described in any one of claims 1-9.