Charging method and system based on view angle proportion self-adaption

By calculating the grayscale gradient and texture density and mapping them to the surface projection compensation coefficient, the pixel inner diameter of the billing unit is dynamically adjusted, which solves the billing deviation problem caused by the three-dimensional curved surface in medical aesthetic treatment billing and realizes the accuracy and precision of the billing results.

CN122022795APending Publication Date: 2026-05-12GUANGZHOU ZONERICH COMP EQUIP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU ZONERICH COMP EQUIP
Filing Date
2026-02-04
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing medical aesthetic treatment billing methods ignore the three-dimensional curved surface characteristics of the human face, resulting in a significant deviation between the number of treatment spots calculated in areas with large facial tilt and curvature and the actual number required for physical coverage. This leads to data quantification distortion of the treatment plan and poor accuracy of the billing results.

Method used

By obtaining the vertical distance from the lens optical center to the facial center reference point, calculating the grayscale gradient and texture density index, mapping them to the surface projection compensation coefficient, dynamically adjusting the pixel inner diameter of the adaptive billing unit, and using the adaptive billing unit to traverse and cover the skin lesion area, an accurate medical aesthetic treatment billing result is generated.

Benefits of technology

It effectively improves the accuracy of the quantitative results of the number of billing units and the accuracy of medical aesthetic treatment billing results, solves the technical problem of insufficient counting in curved areas by traditional planar projection models, and ensures the accuracy of billing results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122022795A_ABST
    Figure CN122022795A_ABST
Patent Text Reader

Abstract

The invention relates to the field of image processing, and relates to a charging method and system based on visual angle proportion self-adaption, and the method comprises the steps: collecting a facial image of a patient through an image collection device; graying processing is carried out on the collected face image, a skin lesion area is extracted, and a texture compactness index of each pixel point in the skin lesion area is calculated; mapping the texture compactness index of the pixel point into a curved surface projection compensation coefficient; calculating the pixel inner diameter of the self-adaptive charging unit corresponding to each pixel point in the skin lesion area; on the basis of the pixel inner diameters of the self-adaptive charging units, the self-adaptive charging units are used for carrying out traversal coverage on the skin damage area, and the total number of the self-adaptive charging units covering the skin damage area is counted; and generating a medical beauty treatment billing result according to the total number of the self-adaptive billing units and the price corresponding to the single billing unit. By adopting the method provided by the invention, the accuracy of the quantitative result of the number of the charging units can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing. More specifically, this invention relates to a billing method and system based on adaptive viewpoint ratio. Background Technology

[0002] In the current medical aesthetics industry, laser treatments (such as picosecond laser freckle removal, fractional laser skin rejuvenation, and IPL skin rejuvenation) are the most widely used skin rejuvenation procedures. In order to develop a scientific treatment plan and assess treatment costs, medical institutions usually need to conduct a quantitative analysis of the skin lesions on the patient's face and calculate the cost based on the number of treatment spots or the area covered.

[0003] Current mainstream technologies typically employ two-dimensional image measurement methods. This involves using a high-resolution camera to capture images of the patient's face, and then, based on the camera's focal length parameters and a standard "pinhole camera model," converting the number of pixels in the image into a physical area. Based on this, the required number of treatment spots (billing units) is estimated by dividing the total area of ​​the skin lesions by the area of ​​a single laser spot.

[0004] However, this existing calculation method mainly relies on the assumption of "ideal parallel plane imaging," which assumes that the surface of the subject (human face) is flat and always parallel to the camera's imaging plane. But in actual medical aesthetic scenarios, the human face is a three-dimensional entity with complex geometric features, including multiple non-planar regions such as the nostrils, cheekbone sides, and jaw angles that have significant tilt angles relative to the camera's optical axis.

[0005] When lesions are located in these tilted or curved areas, due to the perspective projection principle in optical imaging, the image formed on the two-dimensional image sensor undergoes "geometric compression" deformation, resulting in a significantly smaller pixel area after projection than its actual three-dimensional surface area (i.e., perspective shortening). Because current technology lacks a compensation mechanism for this three-dimensional curved surface projection error, when using a uniform planar scaling factor for calculation, the number of billing units calculated for facial sides or areas with high curvature is far less than the number of physical light spots actually needed to cover that area, leading to poor accuracy in medical aesthetic treatment billing results.

[0006] In summary, existing medical aesthetic treatment billing methods mainly have the following technical problems: because they ignore the three-dimensional curved surface characteristics of the human face, they cannot eliminate the area compression error caused by perspective projection. This results in a significant deviation between the calculated number of treatment spots and the actual number required for physical coverage in areas with large facial tilt and curvature. This leads to data quantification distortion of the treatment plan and poor accuracy of medical aesthetic treatment billing results. Summary of the Invention

[0007] To address the technical problem that existing medical aesthetic treatment billing methods suffer from significant discrepancies between the calculated number of treatment spots and the actual number required for physical coverage, resulting in distorted data quantification of treatment plans and poor accuracy of medical aesthetic treatment billing results, this invention provides solutions in the following aspects.

[0008] In a first aspect, the present invention provides a billing method based on adaptive viewpoint ratio, the method comprising: acquiring a patient's facial image using an image acquisition device,

[0009] The acquired facial images are converted to grayscale and the lesion area is extracted. The grayscale gradient of each pixel within the lesion area is calculated, and the texture density index of each pixel is calculated based on the grayscale gradient. The texture density index is positively correlated with the corresponding grayscale gradient. The texture density index of a pixel is mapped to a surface projection compensation coefficient, which is used to characterize the area loss rate when a three-dimensional surface is projected onto a two-dimensional plane; the surface projection compensation coefficient is positively correlated with the texture density index. Using a reference scaling factor, the physical diameter of the currently used laser spot, and the surface projection compensation factor, the pixel inner diameter of the adaptive billing unit corresponding to each pixel in the lesion area is calculated. The pixel inner diameter is negatively correlated with the surface projection compensation factor and positively correlated with both the reference scaling factor and the physical diameter. The adaptive billing unit is a two-dimensional planar graphic. The reference scaling factor represents the number of pixels corresponding to a unit physical length. Based on the pixel inner diameter of the adaptive billing unit, the skin lesion area is traversed and covered using the adaptive billing unit. After the saturation termination condition is met, the total number of adaptive billing units covering the skin lesion area is counted. The medical aesthetic treatment billing result is generated based on the total number of adaptive billing units and the price corresponding to a single billing unit.

[0010] Preferably, the method for obtaining the benchmark scaling factor includes: Obtain the vertical distance from the lens optical center of the image acquisition device to the reference plane passing through the center reference point of the patient's face; Based on the internal parameters of the image acquisition device and the vertical distance, the reference scaling factor is calculated, and its calculation expression is as follows: ; In the formula, Indicates the benchmark scaling factor. The focal length of the lens of the image acquisition device is represented by μ, and μ represents the physical size density of a single pixel in the image acquisition device. This represents the vertical distance from the lens optical center of the image acquisition device to the reference plane passing through the center reference point of the patient's face.

[0011] Preferably, the formula for calculating the texture density index is: ; In the formula, Represents image coordinates Texture density index at the location, and These represent the grayscale gradients of the point in the horizontal and vertical directions, respectively. This represents the grayscale value of that point. The average gray value of the lesion area. To prevent tiny constants with a denominator of zero.

[0012] Preferably, the calculation expression for the surface projection compensation coefficient is as follows: ; In the formula, This represents the projection compensation coefficient at coordinates (x, y). λ The preset texture-geometry mapping sensitivity factor, The function is the arctangent function.

[0013] Preferably, the expression for calculating the pixel inner diameter of the adaptive billing unit is: ; In the formula, This represents the inner diameter of the billing unit pixel to be used when performing coverage calculations at image coordinates (x, y). The physical inner diameter of the laser spot. As the benchmark scaling factor, is the projection compensation coefficient at coordinates (x, y).

[0014] Preferably, the method of using an adaptive billing unit to traverse and cover the lesion area includes: Create a mask with the same size as the facial image and initialize the mask to an uncovered state; Uncovered points are searched within the lesion area as candidate centers, and the pixel inner diameter of the corresponding adaptive billing unit is obtained based on the coordinates of the candidate centers; The coverage area of ​​the current billing unit is defined based on the pixel inner diameter of the adaptive billing unit, and the overlap rate between the current billing unit and the marked area in the coverage state mask is calculated. If the overlap rate is lower than the preset overlap rate threshold, the current billing unit is determined to be a valid billing unit, the total number of valid billing units is incremented by one, and the coverage area of ​​the current billing unit is marked as covered in the coverage status mask. Repeat the steps of searching for uncovered points and determining the overlap rate until a preset saturation termination condition is met. The saturation termination condition includes: no complete adaptive billing unit that meets the overlap threshold requirement can be placed in the remaining uncovered part of the lesion area, or the area marked as covered in the coverage mask accounts for the proportion of the total area of ​​the lesion area to the preset saturation threshold.

[0015] Preferably, calculating the overlap rate between the current billing unit and the marked area in the coverage state mask includes: Calculate the total number of pixels within the coverage area of ​​the current billing unit that are in a covered state in the coverage state mask, and use this as the number of overlapping pixels; Calculate the total number of pixels contained in the current billing unit itself, and use it as the total number of pixels in the unit; The overlap rate is determined by the ratio of the number of overlapping pixels to the total number of unit pixels.

[0016] Preferably, generating the medical aesthetic treatment billing result based on the total number of adaptive billing units and the price corresponding to a single billing unit includes: Obtain the preset benchmark billing unit price and benchmark spot area; The physical area of ​​the current laser point is calculated based on the physical diameter of the laser spot, and the area gain coefficient is calculated by combining the reference spot area and the preset energy density balance index; the area gain coefficient is positively correlated with the physical area of ​​the current laser point. Obtain the current laser spot shape type and determine the shape technical coefficient based on the preset shape value mapping table; The unit price of a single billing unit is calculated using the benchmark billing unit price, the area gain coefficient, and the shape technical coefficient; the calculation expression is: ; In the formula, This indicates the unit price of a single billing unit. Indicates the base billing unit price. This represents the area gain coefficient. This represents the shape technical coefficient; The total number of valid billing units is multiplied by the unit price of each individual billing unit to obtain the billing result for the cosmetic treatment.

[0017] Preferably, the adaptive billing unit is an interactive billing unit, and the method further includes: After the saturation termination condition is met, in response to the patient's cancellation operation of the adaptive billing unit covering the skin lesion area, the corresponding adaptive billing unit is cancelled from the skin lesion area. After the patient cancels the adaptive billing unit covering the skin lesion area, the total number of adaptive billing units covering the skin lesion area is recounted and the medical aesthetic treatment billing results are regenerated.

[0018] In a second aspect, the present invention provides a billing system based on adaptive viewing angle ratio, the billing system based on adaptive viewing angle ratio includes a processor and a memory, the memory storing computer program instructions, and when the computer program instructions are executed by the processor, the billing method based on adaptive viewing angle ratio of the present invention is implemented.

[0019] The beneficial effects of this invention are as follows: By obtaining the vertical distance from the lens optical center to the reference plane passing through the facial center reference point, a rigorous physical observation benchmark conforming to the pinhole imaging principle is constructed, avoiding geometric calculation errors caused by ambiguous measurement definitions (such as point-to-point distance). More importantly, this invention establishes a reverse derivation mechanism from "texture features" to "geometric curvature" for the three-dimensional non-planar characteristics of the human face. By calculating the gray-level gradient and texture density, the image texture compression phenomenon caused by facial curvature (such as the nose and side profile) is identified and mapped to a projection compensation coefficient. This coefficient is used to dynamically adjust the pixel inner diameter of the adaptive billing unit, automatically reducing the size of the billing unit in the perspective compression area of ​​the image. This reverse compensation strategy allows more billing units to be accommodated within a unit image area, thereby accurately restoring the actual number of physical light spots carried by the three-dimensional curved skin on the two-dimensional image. This solves the technical problem of insufficient counting in curved areas in traditional planar projection models, effectively improving the accuracy of the quantitative results of the number of billing units and the accuracy of medical aesthetic treatment billing results. Attached Figure Description

[0020] Figure 1 This is a schematic flowchart illustrating a billing method based on view ratio adaptation according to an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating the structure of a billing system based on view ratio adaptation according to an embodiment of the present invention. Detailed Implementation

[0021] 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.

[0022] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0023] Example of a billing method based on adaptive viewpoint ratio: like Figure 1 As shown, the billing method based on adaptive viewing angle ratio of the present invention includes: S101. Acquire facial images of the patient using an image acquisition device; A high-resolution camera can capture images of the patient's face. An infrared rangefinder or binocular module can be used to obtain in real-time the vertical distance from the lens's optical center to a reference plane passing through the center of the patient's face.

[0024] S102. Calculate the texture density index of each pixel in the lesion area. Specifically, the acquired facial image is converted to grayscale and the lesion area is extracted. The grayscale gradient of each pixel in the lesion area is calculated. The texture density index of each pixel is calculated based on the grayscale gradient. The texture density index is positively correlated with the corresponding grayscale gradient. In this embodiment, considering that changes in facial curvature cause distortion in the projection of skin texture onto the image (i.e., the more inclined the surface, the higher the texture frequency per unit pixel, the larger the gray-level gradient of the pixel, and the larger the texture density index of the pixel), the texture density index can be calculated more accurately by making it positively correlated with the corresponding gray-level gradient.

[0025] In this embodiment, the Sobel operator can be used to calculate the gray-level gradient vector of each pixel within the lesion region.

[0026] In this embodiment, the formula for calculating the texture density index is: ; In the formula, Represents image coordinates Texture density index at the location, and These represent the grayscale gradients of the point in the horizontal and vertical directions, respectively. This represents the grayscale value of that point. The average gray value of the lesion area. To prevent tiny constants with a denominator of zero.

[0027] When a surface is tilted, the texture density increases, and the high-frequency components of the image texture increase, leading to an increase in the gradient magnitude of the pixels. In addition, tilted surfaces are usually darker in gray, that is, the gray value is smaller. Therefore, by making the texture density index positively correlated with the gradient magnitude of the pixels and negatively correlated with the gray value of the pixels, the texture density index can be calculated more accurately.

[0028] The texture density index calculation expression in this embodiment adopts a composite design combining "gradient modulus" and "lighting weighting". (First half) It utilizes the principle of perspective projection: when the surface is tilted relative to the camera, the texture details within a unit viewing angle increase, leading to a greater rate of grayscale change (gradient). (The latter half...) It utilizes the principle of light reflection: the sides of the face or areas with large curvature are usually backlit or have shadows, and the gray value $I(x,y)$ is low, so this exponent term will increase accordingly.

[0029] This design not only captures changes in texture frequency but also utilizes local illumination as an auxiliary criterion. The multiplication of these two elements acts as a "signal amplification," enabling the algorithm to achieve a high density response even when dealing with areas where texture is not obvious but curvature is large (such as smooth side shadow areas), significantly improving the robustness of surface feature recognition.

[0030] S103. Calculate the surface projection compensation coefficient based on the texture density index. Specifically, the texture density index of the pixel is mapped to the surface projection compensation coefficient. The surface projection compensation coefficient is used to characterize the area loss rate when a three-dimensional surface is projected onto a two-dimensional plane. The surface projection compensation coefficient is positively correlated with the texture density index. Since the pinhole model is linear on a plane but suffers from cosine loss on a curved surface, it is necessary to map texture features to geometric compensation coefficients in order to measure the area loss when projecting onto a 3D curved surface.

[0031] In this embodiment, the expression for calculating the surface projection compensation coefficient is as follows: ; In the formula, This represents the projection compensation coefficient at coordinates (x, y). λ The preset texture-geometry mapping sensitivity factor, The function is the arctangent function.

[0032] when An increase in the value of cos(θ) indicates that as surface tilt intensifies, the equivalent tilt angle θ increases accordingly, leading to a decrease in cos(θ), and ultimately resulting in a decrease in the reciprocal form of the compensation coefficient. It increases non-linearly. This means that in areas with high curvature, such as the sides of the face or the nostrils, the coefficient will automatically be greater than 1 to compensate for the area loss caused by projection.

[0033] The aim is to map dimensionless texture density to an equivalent surface normal tilt angle. . This represents the area scaling factor (cosine loss) when a 3D plane is projected onto a 2D plane. Taking the reciprocal of the area scaling factor yields the "compensation factor." This expression accurately simulates the geometric process of reconstructing a 3D surface area from a 2D projection. When a tilt angle is detected... When the value increases, the cosine value of the denominator decreases, leading to a decrease in the compensation coefficient. It increases rapidly and nonlinearly (greater than 1), thus providing an area correction factor that conforms to physical laws for subsequent steps.

[0034] S104. Calculate the pixel inner diameter of the adaptive billing unit corresponding to each pixel in the lesion area. Specifically, using the reference scaling factor, the physical diameter of the currently used laser spot, and the surface projection compensation factor, calculate the pixel inner diameter of the adaptive billing unit corresponding to each pixel in the lesion area. The pixel inner diameter is negatively correlated with the surface projection compensation factor and positively correlated with both the reference scaling factor and the physical diameter. The adaptive billing unit is a two-dimensional planar graphic. The reference scaling factor represents the number of pixels corresponding to a unit physical length. In this embodiment, the pixel inner diameter refers to the number of pixels corresponding to the diameter of the inscribed circle of the geometry of the adaptive billing unit in a two-dimensional facial image.

[0035] The physical diameter of the laser spot currently in use can be read from the control system of the laser treatment equipment.

[0036] In areas of facial tilt, the actual pixels occupied by the physical laser spot projected onto the two-dimensional image undergo "perspective compression." To calculate the true number of physical therapy points, the size of the "virtual billing unit" used to simulate coverage needs to be reduced to match the compressed visual features on the image. Reducing the billing unit size increases the number of billing units that can be accommodated per unit pixel area, thus restoring the true treatment workload on the three-dimensional curved surface. Furthermore, the larger the physical diameter of the laser spot, the larger the physical size of the billing unit should be, and the larger the reference scaling factor, the more photosensitive pixels can be accommodated per unit physical length. Therefore, making the pixel inner diameter negatively correlated with the surface projection compensation coefficient and positively correlated with both the reference scaling factor and the physical diameter allows for a more accurate calculation of the adaptive billing unit's pixel inner diameter.

[0037] The expression for calculating the pixel inner diameter of the adaptive billing unit is: ; In the formula, This represents the inner diameter of the billing unit pixel to be used when performing coverage calculations at image coordinates (x, y). The physical inner diameter of the laser spot. As the benchmark scaling factor, is the projection compensation coefficient at coordinates (x, y).

[0038] In real imaging, physical light spots located on the side appear "flattened" and smaller in photographs. Only by simultaneously shrinking the billing units can a larger number of billing units be "crammed" into the same image area, thus accurately reflecting the actual number of laser points that need to be covered on the three-dimensional curved surface. This formula achieves a dynamic match between "visual features" and "metric scale".

[0039] In this embodiment, the method for obtaining the benchmark scaling factor includes: (1) Obtain the vertical distance from the lens optical center of the image acquisition device to the reference plane passing through the center reference point of the patient's face; (2) Calculate the reference scaling factor based on the internal parameters of the image acquisition device and the vertical distance. The reference scaling factor is negatively correlated with the vertical distance. In this embodiment, the calculation expression for the benchmark scaling factor is: ; In the formula, Indicates the benchmark scaling factor. The focal length of the lens of the image acquisition device is represented by μ, and μ represents the physical size density of a single pixel in the image acquisition device. This represents the vertical distance from the optical center of the lens of the image acquisition device to a reference plane passing through the center reference point of the patient's face. The physical size density of a single pixel refers to the number of photosensitive pixels contained within a unit physical length on the photosensitive surface of an image sensor (CMOS / CCD).

[0040] In this embodiment, the tip of the patient's nose can be used as the center reference point of the patient's face. In other embodiments, other locations can also be selected as the center reference point of the patient's face.

[0041] Due to the shooting distance As the length increases, the number of pixels per unit physical length decreases inversely (i.e., the perspective rule of near objects appearing larger and far objects appearing smaller). Therefore, the representation in this embodiment can be used to calculate the value of the reference scale coefficient more accurately.

[0042] The expression in this embodiment reflects the linear scaling law of optical imaging. (Molecule) The denominator represents the magnification capability with fixed internal camera parameters (focal length and pixel density). Represents the object distance. The design of this expression ensures the reference scale factor. and observation distance They exhibit a strict inverse proportional relationship (i.e., "nearer objects appear larger, farther objects appear smaller"). This provides the system with a "zero plane" scale assuming the human face is absolutely flat, serving as a mathematical basis for subsequent nonlinear curvature compensation and ensuring the physical accuracy of the basic measurements.

[0043] In this embodiment, the number of pixels per unit physical length refers to the number of pixels per unit physical length on the reference plane.

[0044] S105. Generate medical aesthetic treatment billing results, specifically: based on the pixel inner diameter of the adaptive billing unit, use the adaptive billing unit to traverse and cover the skin lesion area, and after meeting the saturation termination condition, count the total number of adaptive billing units covering the skin lesion area; generate medical aesthetic treatment billing results based on the total number of adaptive billing units and the price corresponding to a single billing unit.

[0045] In this embodiment, the price of a single billing unit can be determined based on the physical diameter and shape of the laser spot. Different combinations of physical diameters and shapes of laser spots correspond to different prices. Specifically, the price of a single billing unit corresponding to the physical diameter and shape of the laser spot can be obtained by looking up a table.

[0046] This embodiment constructs a rigorous physical observation benchmark that conforms to the pinhole imaging principle by obtaining the vertical distance from the lens optical center to the reference plane passing through the facial center reference point, avoiding geometric calculation errors caused by ambiguity in measurement definitions (such as point-to-point distance). More importantly, this embodiment establishes a reverse derivation mechanism from "texture features" to "geometric curvature" for the three-dimensional non-planar characteristics of the human face. By calculating the gray-level gradient and texture density, it identifies the image texture compression phenomenon caused by facial curvature (such as the nose and side profile) and maps it to a projection compensation coefficient. Using this coefficient, the pixel inner diameter of the adaptive billing unit is dynamically adjusted, and the size of the billing unit is automatically reduced in the perspective compression area on the image. This reverse compensation strategy allows more billing units to be accommodated within a unit image area, thereby accurately restoring the actual number of physical light spots carried by the three-dimensional curved skin on the two-dimensional image. It solves the technical problem of insufficient counting in curved areas by traditional planar projection models, effectively improving the accuracy of the quantitative results of the number of billing units and the accuracy of medical aesthetic treatment billing results.

[0047] In one embodiment, using an adaptive billing unit to traverse and cover the lesion area includes: S201. Create a mask with the same size as the facial image and initialize the mask to an uncovered state. S202. Search for uncovered points within the lesion area as candidate centers, and obtain the pixel inner diameter of the corresponding adaptive billing unit based on the coordinates of the candidate centers; S203. Determine the coverage area of ​​the current billing unit based on the pixel inner diameter of the adaptive billing unit, and calculate the overlap rate between the current billing unit and the marked area in the coverage state mask. In this embodiment, the expression for calculating the overlap rate between the current billing unit and the marked area in the coverage state mask is as follows: ; In the formula, This indicates the overlap rate between the current billing unit and the marked area in the coverage status mask. This represents the number of pixels within the coverage area of ​​the current billing unit that are marked in the coverage mask. This indicates the number of pixels contained within the coverage area of ​​the current billing unit.

[0048] S204. If the overlap rate is lower than the preset overlap rate threshold, the current billing unit is determined to be a valid billing unit, the total number of valid billing units is incremented by one, and the coverage area of ​​the current billing unit is marked as covered in the coverage status mask. In this embodiment, the overlap rate threshold ranges from 10% to 15%.

[0049] S205. Repeat the steps of searching for uncovered points and judging the overlap rate until the preset saturation termination condition is met. The saturation termination condition includes: no complete adaptive billing unit that meets the overlap threshold requirement can be placed in the remaining uncovered part of the skin lesion area, or the area marked as covered in the coverage mask accounts for the proportion of the total area of ​​the skin lesion area to the preset saturation threshold.

[0050] In this embodiment, the saturation threshold can be set to 95%, but in other embodiments it can be set to other values.

[0051] This embodiment employs an "exclusive greedy filling strategy based on a state mask." By introducing a state mask and saturation termination conditions (such as inability to place or meeting area requirements), this scheme simulates the physical constraint that laser spots "cannot overlap and emit" in real laser treatment. This avoids the problem of inflated theoretical values ​​that may result from simply dividing by area. By simulating the physical filling process, it outputs a clinically executable quantitative result that most closely approximates the actual number of treatments.

[0052] In one embodiment, calculating the overlap rate between the current billing unit and the marked area in the coverage state mask includes: S301. Calculate the total number of pixels within the coverage area of ​​the current billing unit that are in a covered state in the coverage state mask, and use this as the number of overlapping pixels. S302. Calculate the total number of pixels contained in the current billing unit itself, as the total number of pixels in the unit; S303. The ratio of the number of overlapping pixels to the total number of unit pixels is determined as the overlap rate.

[0053] The overlap rate is quantified by calculating the ratio of "overlapping pixels" to "total number of pixels in a unit," providing a clear digital criterion for exclusive fill. This ensures that each billing unit included in the total count is a valid and independent treatment point, preventing duplicate billing due to excessive overlap and guaranteeing the fairness of the billing results.

[0054] In one embodiment, generating the medical aesthetic treatment billing result based on the total number of adaptive billing units and the price corresponding to a single billing unit includes: S401. Obtain the preset base billing unit price and base spot area; S402. Calculate the physical area of ​​the current laser point based on the physical diameter of the laser spot, and calculate the area gain coefficient by combining the reference spot area and the preset energy density balance index; the area gain coefficient is positively correlated with the physical area of ​​the current laser point. In this embodiment, the expression for calculating the area gain coefficient is as follows: ; In the formula, α is the preset energy density balance index (with a value range of 0.5 to 1.0). This represents the physical area of ​​the current laser point. This indicates the area of ​​the reference spot.

[0055] The area gain factor characterizes the relative magnitude of the spatial coverage capability of the currently selected treatment spot compared to the standard reference spot. The energy density balance index characterizes the non-linear relationship between the energy consumption cost and technological value required for the laser device to maintain clinically effective energy density at different spot sizes.

[0056] This step aims to dynamically adjust the base cost based on the actual area of ​​skin damage covered by a single laser firing.

[0057] S403. Obtain the type of laser spot shape currently in use, and determine the shape technical coefficient according to the preset shape value mapping table; In this embodiment, the shape technical coefficient corresponding to a circular light spot can be set to 1.0; square or rectangular light spots, due to their seamless splicing characteristics, can reduce treatment overlap and reduce thermal damage, and their corresponding shape technical coefficient is set to a value greater than 1.0 (such as 1.2); the shape technical coefficient corresponding to irregular or customized light spots is set to a higher value (such as 1.5).

[0058] S404. Calculate the unit price of a single billing unit using the benchmark billing unit price, the area gain coefficient, and the shape technical coefficient; the calculation expression is: ; In the formula, This indicates the unit price of a single billing unit. Indicates the base billing unit price. This represents the area gain coefficient. This represents the shape technical coefficient; S405. Multiply the total number of valid billing units by the unit price of each billing unit to obtain the billing result for the medical aesthetic treatment.

[0059] In one embodiment, the adaptive billing unit is an interactive billing unit, and the method further includes: S601. After the saturation termination condition is met, in response to the patient's cancellation operation of the adaptive billing unit covering the skin lesion area, the corresponding adaptive billing unit is cancelled from the skin lesion area. S602. After the patient cancels the adaptive billing unit covering the skin lesion area, the total number of adaptive billing units covering the skin lesion area is recounted and the medical aesthetic treatment billing results are regenerated.

[0060] By providing an interactive cancellation and recalculation mechanism, the problem of fully automated algorithms mistakenly including non-lesional areas (such as moles, scars, or areas the patient refuses treatment) is resolved. This "human-machine collaboration" model improves the system's fault tolerance, ensuring that the final cost fully reflects the actual treatment intentions of both the doctor and the patient.

[0061] Example of a billing system based on adaptive viewpoint ratio: This invention also provides a billing system based on adaptive viewing angle ratio. For example... Figure 2 As shown, the billing system based on adaptive viewing angle ratio includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a billing method based on adaptive viewing angle ratio according to the first aspect of the present invention.

[0062] The billing system based on adaptive viewing ratio also includes other components well known to those skilled in the art, such as communication buses and communication interfaces. Their settings and functions are known in the art and will not be described in detail here.

[0063] 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 based on adaptive viewpoint ratio, characterized in that, The method includes: acquiring a patient's facial image using an image acquisition device; performing grayscale processing on the acquired facial image and extracting the lesion area; calculating the grayscale gradient of each pixel within the lesion area; and calculating the texture density index of each pixel based on the grayscale gradient; the texture density index is positively correlated with the corresponding grayscale gradient. The texture density index of a pixel is mapped to a surface projection compensation coefficient, which is used to characterize the area loss rate when a three-dimensional surface is projected onto a two-dimensional plane; the surface projection compensation coefficient is positively correlated with the texture density index. Using a reference scaling factor, the physical diameter of the currently used laser spot, and the surface projection compensation factor, the pixel inner diameter of the adaptive billing unit corresponding to each pixel in the lesion area is calculated. The pixel inner diameter is negatively correlated with the surface projection compensation factor and positively correlated with both the reference scaling factor and the physical diameter. The adaptive billing unit is a two-dimensional planar graphic. The reference scaling factor represents the number of pixels corresponding to a unit physical length. Based on the pixel inner diameter of the adaptive billing unit, the skin lesion area is traversed and covered using the adaptive billing unit. After the saturation termination condition is met, the total number of adaptive billing units covering the skin lesion area is counted. The medical aesthetic treatment billing result is generated based on the total number of adaptive billing units and the price corresponding to a single billing unit.

2. The billing method based on adaptive viewpoint ratio as described in claim 1, characterized in that, The method for obtaining the benchmark scaling factor includes: Obtain the vertical distance from the lens optical center of the image acquisition device to the reference plane passing through the center reference point of the patient's face; Based on the internal parameters of the image acquisition device and the vertical distance, a reference scaling factor is calculated. The calculation expression is: ; In the formula, Indicates the benchmark scaling factor. The focal length of the lens of the image acquisition device is represented by μ, and μ represents the physical size density of a single pixel in the image acquisition device. This represents the vertical distance from the lens optical center of the image acquisition device to the reference plane passing through the center reference point of the patient's face.

3. The billing method based on adaptive viewpoint ratio as described in claim 1, characterized in that, The formula for calculating the texture density index is as follows: ; In the formula, Represents image coordinates Texture density index at the location, and These represent the grayscale gradients of the point in the horizontal and vertical directions, respectively. This represents the grayscale value of that point. The average gray value of the lesion area. To prevent tiny constants with a denominator of zero.

4. The billing method based on adaptive viewpoint ratio as described in claim 1, characterized in that, The expression for calculating the surface projection compensation coefficient is as follows: ; In the formula, This represents the projection compensation coefficient at coordinates (x, y). λ The preset texture-geometry mapping sensitivity factor, The function is the arctangent function.

5. The billing method based on adaptive viewpoint ratio as described in claim 1, characterized in that, The expression for calculating the pixel inner diameter of the adaptive billing unit is: ; In the formula, This represents the inner diameter of the billing unit pixel to be used when performing coverage calculations at image coordinates (x, y). The physical inner diameter of the laser spot. As the benchmark scaling factor, is the projection compensation coefficient at coordinates (x, y).

6. The billing method based on adaptive viewpoint ratio as described in claim 1, characterized in that, Adaptive billing units are used to traverse and cover the lesion area. This includes: creating a mask with the same size as the facial image and initializing the mask to an uncovered state; Uncovered points are searched within the lesion area as candidate centers, and the pixel inner diameter of the corresponding adaptive billing unit is obtained based on the coordinates of the candidate centers; The coverage area of ​​the current billing unit is defined based on the pixel inner diameter of the adaptive billing unit, and the overlap rate between the current billing unit and the marked area in the coverage state mask is calculated. If the overlap rate is lower than the preset overlap rate threshold, the current billing unit is determined to be a valid billing unit, the total number of valid billing units is incremented by one, and the coverage area of ​​the current billing unit is marked as covered in the coverage status mask. Repeat the steps of searching for uncovered points and judging the overlap rate until the preset saturation termination condition is met; The saturation termination conditions include: it is impossible to place any complete adaptive billing unit that meets the overlap threshold requirement in the remaining uncovered part of the lesion area, or the area marked as covered in the coverage mask reaches the proportion of the total area of ​​the lesion area to a preset saturation threshold.

7. The billing method based on adaptive viewpoint ratio as described in claim 6, characterized in that, The calculation of the overlap rate between the current billing unit and the marked area in the coverage mask includes: Calculate the total number of pixels within the coverage area of ​​the current billing unit that are in a covered state in the coverage state mask, and use this as the number of overlapping pixels; Calculate the total number of pixels contained in the current billing unit itself, and use it as the total number of pixels in the unit; The overlap rate is determined by the ratio of the number of overlapping pixels to the total number of unit pixels.

8. The billing method based on adaptive viewpoint ratio as described in claim 1, characterized in that, The process of generating medical aesthetic treatment billing results based on the total number of adaptive billing units and the price corresponding to a single billing unit includes: Obtain the preset benchmark billing unit price and benchmark spot area; The physical area of ​​the current laser point is calculated based on the physical diameter of the laser spot, and the area gain coefficient is calculated by combining the reference spot area and the preset energy density balance index; the area gain coefficient is positively correlated with the physical area of ​​the current laser point. Obtain the current laser spot shape type and determine the shape technical coefficient based on the preset shape value mapping table; The unit price of a single billing unit is calculated using the benchmark billing unit price, the area gain coefficient, and the shape technical coefficient; the calculation expression is: ; In the formula, This indicates the unit price of a single billing unit. Indicates the base billing unit price. This represents the area gain coefficient. This represents the shape technical coefficient; The total number of valid billing units is multiplied by the unit price of each individual billing unit to obtain the billing result for the cosmetic treatment.

9. The billing method based on adaptive viewpoint ratio as described in any one of claims 1 to 8, characterized in that, The adaptive billing unit is an interactive billing unit, and the method further includes: After the saturation termination condition is met, in response to the patient's cancellation operation of the adaptive billing unit covering the skin lesion area, the corresponding adaptive billing unit is cancelled from the skin lesion area. After the patient cancels the adaptive billing unit covering the skin lesion area, the total number of adaptive billing units covering the skin lesion area is recounted and the medical aesthetic treatment billing results are regenerated.

10. A billing system based on adaptive viewing angle ratio, the billing system comprising a processor and a memory, the memory storing computer program instructions, characterized in that, When the computer program instructions are executed by the processor, the billing method based on view ratio adaptation as described in any one of claims 1 to 9 is implemented.