A Q-switched laser-based intelligent control method and system for pigmentation beauty

By using intelligent control methods based on Q-tuning lasers in laser treatment, the color spot area is identified using grayscale differences, edge roughness and grayscale change parameters, and the laser power is adjusted according to the rate of area change, the problems of inaccurate identification and inaccurate control in traditional treatments are solved, and the treatment effect and patient experience are improved.

CN119785976APending Publication Date: 2025-04-08THE SECOND AFFILIATED HOSPITAL TO NANCHANG UNIV
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202510274136.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Traditional laser treatments have subjective identification of spot areas, making it difficult to distinguish spots from acne areas, resulting in inaccurate extraction of spot areas and affecting the treatment effect.

Method used

The intelligent color spot beauty control method based on Q-tuning laser is adopted. By obtaining the grayscale image of the face, chunking and edge detection, the grayscale difference parameters, edge roughness parameters and grayscale change parameters of the skin communication domain are obtained, and the spot area is screened, and the high peak power of the Q-tuning laser is adjusted according to the area change rate of the color spot area.

Benefits of technology

It realizes accurate identification of spot areas and precise control of Q-adjust lasers, improving the beauty effect of spots and patient experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119785976A_ABST
    Figure CN119785976A_ABST
Patent Text Reader

Abstract

The present invention relates to the field of radiotherapy laser control technology, and specifically to a Q-switched laser-based color spot beauty intelligent control method and system. The present invention first obtains the skin connected domain in each image block in the face image; further obtains the grayscale difference parameter, edge roughness parameter and grayscale change parameter of each skin connected domain; further screens the color spot area according to the grayscale difference parameter, edge roughness parameter and grayscale change parameter of each skin connected domain; finally, adjusts the high peak power of the Q-switched laser according to the area change rate of the color spot area. The present invention accurately identifies the color spot area from the grayscale difference angle and edge roughness angle of the color spot compared to normal skin, as well as the internal grayscale change difference angle of the color spot and acne, thereby adjusting the high peak power of the Q-switched laser according to the area change of the color spot area, thereby improving the color spot beauty effect and patient experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of radiotherapy laser control, and in particular to a Q-switched laser-based color spot beauty intelligent control method and system. Background Art

[0002] Due to its high peak power, Q-switched laser can be effectively used for treatments such as spot removal, skin reconstruction and skin beautification, especially in treating various spots such as freckles, chloasma and age spots. However, traditional laser treatments often rely on the experience of physicians, and there is a certain degree of subjectivity in the identification and judgment of spots, skin color and skin condition. In addition, since spots are similar to acne, both have large differences in pixel values ​​and morphology from normal skin. Therefore, when using conventional image segmentation algorithms to extract spot areas, it is difficult to distinguish between acne areas and spot areas, resulting in inaccurate extraction of spot areas, which can easily lead to unsatisfactory treatment effects and even side effects. Therefore, it is very important to effectively extract the spot area in the patient's facial image.

[0003] At the same time, during the pigmentation cosmetic treatment process, inaccurate identification of the pigmentation area will cause inaccurate Q-switched laser control, which may cause the Q-switched laser power to be too large or too small, affecting the patient's treatment experience and treatment effect. Summary of the invention

[0004] In order to solve the existing technical problems of inaccurate identification of color spot areas and inaccurate Q-switched laser control, the purpose of the present invention is to provide a color spot beauty intelligent control method and system based on Q-switched laser, and the technical solutions adopted are as follows: A Q-switched laser-based color spot beauty intelligent control method, the method comprising: Acquire a grayscale image of a face and extract a facial skin area image; divide the facial skin area image into blocks to obtain image blocks; perform edge detection on each of the image blocks to obtain a skin connected domain in each of the image blocks; According to the grayscale difference characteristics of each skin connected domain and other areas in the corresponding image block, the grayscale difference parameter of each skin connected domain is obtained; according to the edge regularity of each skin connected domain and the grayscale change characteristics of the edge pixels, the edge roughness parameter of each skin connected domain is obtained; according to the grayscale change characteristics of the pixels in each skin connected domain, the grayscale change parameter of each skin connected domain is obtained; according to the grayscale difference parameter, the edge roughness parameter and the grayscale change parameter of each skin connected domain, the color spot area is screened; The high peak power of the Q-switched laser is adjusted according to the area change rate of the color spot area in the preset continuous frame human face grayscale image.

[0005] Furthermore, the method for obtaining the grayscale difference parameter includes: The area formed by other pixel points within the maximum circumscribed rectangle of the skin connected domain is taken as the adjacent area; based on the difference characteristics between the overall grayscale characteristics within the skin connected domain and the overall grayscale characteristics of all the adjacent areas in the image block to which it belongs, the grayscale difference parameters corresponding to the skin connected domain are obtained.

[0006] Furthermore, the method for obtaining the edge roughness parameter includes: Obtain the centroid of the skin connected domain; obtain a first roughness parameter based on the discrete characteristics of the distances between all edge pixels and the centroid; obtain a second roughness parameter based on the grayscale difference characteristics between adjacent edge pixels; obtain an edge roughness parameter of each skin connected domain based on the first roughness parameter and the second roughness parameter corresponding to each skin connected domain; the discrete characteristics of the distance are positively correlated with the first roughness parameter; the grayscale difference characteristics between adjacent edge pixels are positively correlated with the second roughness parameter; the first roughness parameter and the second roughness parameter are both positively correlated with the edge roughness parameter.

[0007] Furthermore, the method for obtaining the grayscale change parameter includes: Obtaining the gradient value and gradient direction of each pixel point in the skin connected domain; in any of the skin connected domains, selecting pixels in order from large to small according to the gradient values, and selecting other pixels in the skin connected domain along the gradient direction of the selected pixels, to construct multiple grayscale change sequences; the grayscale change sequences have no intersection; In all the grayscale change sequences corresponding to any of the skin connected domains, the grayscale change parameter corresponding to the skin connected domain is obtained according to the dramatic feature of the grayscale value change of the pixel point; the dramatic feature of the grayscale value change of the pixel point is positively correlated with the grayscale change parameter.

[0008] Furthermore, the method for obtaining the color spot area includes: The grayscale difference parameter, the edge roughness parameter and the grayscale change parameter of each skin connected domain are integrated to obtain the color spot possibility of each skin connected domain; the grayscale difference parameter, the edge roughness parameter and the grayscale change parameter are all positively correlated with the color spot possibility; when the color spot possibility is greater than or equal to a preset possibility threshold, the corresponding skin connected domain is determined to be a color spot area.

[0009] Furthermore, the step of adjusting the high peak power of the Q-switched laser according to the area change rate of the color spot area in the preset continuous frame human face grayscale image includes: According to the change in the area of ​​the color spot area in the preset continuous frame grayscale image of the face, the color spot removal rate is obtained; when the color spot removal rate is greater than the preset high rate threshold, the high peak power of the Q-switched laser is reduced; when the color spot removal rate is less than the preset low rate threshold, the high peak power of the Q-switched laser is increased; the preset high rate threshold is greater than the preset low rate threshold.

[0010] Furthermore, after screening out the color spot area, the method further includes: The color spot area at the edge of the image block is taken as the defective color spot area, and the other color spot areas are taken as the complete color spot area; the pixel points of the color spot area at the edge of the image block are taken as the edge pixel points; the defective color spot areas adjacent to the image block and with the same number of edge pixel points on the adjacent edges constitute a defective color spot area set; in each of the defective color spot area sets, the defective color spot area with the most pixel points is taken as the color spot area to be merged, and the other defective color spot areas are taken as the target color spot areas; According to the continuity characteristics of the color spot area to be merged and the corresponding target color spot area, combined with the similar characteristics of the grayscale change parameters, the complete color spot area corresponding to the color spot area to be merged is obtained; according to the area change rate of the complete color spot area in the preset continuous frame face grayscale image, the high peak power of the Q-switched laser is adjusted.

[0011] Furthermore, the step of obtaining the complete color spot region corresponding to the color spot region to be merged according to the continuity feature of the color spot region to be merged and the corresponding target color spot region in combination with the similarity feature of the grayscale change parameter includes: In any of the defective color spot area sets, the color spot area to be merged is paired with any of the target color spot areas, and the paired target color spot area is used as the matching color spot area; the minimum angle between the straight line connecting each of the edge pixel points and the pixel points within the color spot area in the preset neighborhood and the horizontal direction is obtained as the extension angle of each of the edge pixel points; On the adjacent edges of the image blocks corresponding to the color spot area to be merged and the matching color spot area, according to the distance between edge pixel points of the same sequence number and the similarity characteristics of the extension angle between edge pixel points, combined with the similarity characteristics of the grayscale change parameters between the color spot area to be merged and the matching color spot area, the merging suitability corresponding to the color spot area to be merged and the matching color spot area is obtained; the distance between the edge pixel points is negatively correlated with the merging suitability; the similarity characteristics of the extension angle between the edge pixel points and the similarity characteristics of the grayscale change parameters are both positively correlated with the merging suitability; The defective color spot regions in the defective color spot region set are merged according to the merging suitability to obtain a complete color spot region corresponding to the defective color spot region.

[0012] Furthermore, the step of merging the defective color spot regions in the defective color spot region set according to the merging suitability to obtain a complete color spot region corresponding to the defective color spot region includes: The target color spot area whose merging suitability is greater than or equal to the preset merging threshold is merged with the corresponding color spot area to be merged to obtain a complete color spot area; if all the merging suitabilities corresponding to the color spot areas to be merged are less than the preset merging threshold, the color spot area to be merged is merged with the corresponding target color spot area with the largest merging suitability to obtain a complete color spot area.

[0013] The present invention also proposes a Q-switched laser-based color spot beauty intelligent control system, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements any one of the steps of the Q-switched laser-based color spot beauty intelligent control method when executing the computer program.

[0014] The present invention has the following beneficial effects: The present invention first obtains a grayscale image of a face and extracts an image of a facial skin region to reduce interference from non-facial skin regions; further divides the facial skin region image into blocks to more easily analyze local features of different face regions and identify color spot regions; further obtains a skin connectivity domain in each image block to narrow the analysis range, making it easier to subsequently screen out color spot regions; further utilizes the characteristic that there is a large grayscale difference between the color spot region and the normal skin region to obtain a grayscale difference parameter for each skin connectivity domain, and evaluates the possibility that the skin connectivity domain is a color spot region from the perspective of grayscale difference; further utilizes the characteristic that the color spot region has a rougher edge than the normal skin region to obtain a grayscale difference parameter for each skin connectivity domain The edge roughness parameter of the domain is used to measure the possibility that the skin connected domain is a spot area from the perspective of edge roughness; the grayscale change parameter is obtained by further utilizing the characteristics that the grayscale consistency inside the acne area is strong and the grayscale change inside the spot area is more drastic, so as to facilitate the subsequent distinction between the spot area and the acne area from the perspective of grayscale change inside the region; further, according to the grayscale difference parameter, edge roughness parameter and grayscale change parameter of each skin connected domain, multiple analysis angles are integrated to accurately screen out the spot area, and provide an analysis object for Q-switched laser adjustment; finally, according to the area change rate of the spot area in the preset continuous frame face grayscale image, the high peak power of the Q-switched laser is adjusted to improve the beauty effect of the spot and the patient experience. The present invention accurately identifies the spot area from the grayscale difference angle and edge roughness angle of the spot compared with normal skin, as well as the internal grayscale change difference angle of the spot and acne, thereby adjusting the high peak power of the Q-switched laser according to the area change of the spot area, and improving the beauty effect of the spot and the patient experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0016] Figure 1 A flowchart of a Q-switched laser-based color spot beauty intelligent control method provided by one embodiment of the present invention; Figure 2 A flow chart of a method for obtaining edge roughness parameters provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0017] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation, structure, features and effects of a Q-switched laser-based color spot beauty intelligent control method and system proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0018] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0019] The specific scheme of the color spot beauty intelligent control method and system based on Q-switched laser provided by the present invention is described in detail below with reference to the accompanying drawings.

[0020] See also Figure 1 , which shows a flow chart of a color spot beauty intelligent control method based on Q-switched laser provided by an embodiment of the present invention, specifically comprising: Step S1: Acquire a grayscale image of a face and extract a facial skin area image; divide the facial skin area image into blocks to obtain image blocks; perform edge detection on each image block to obtain a skin connected domain in each image block.

[0021] In the embodiment of the present invention, a grayscale image of a face is first acquired and an image of a facial skin region is extracted to determine an analysis object and reduce interference from non-facial skin regions.

[0022] As an example, a camera is used to take a photo of a patient's face to obtain a patient's face image, and the face image is subjected to median filtering and grayscale conversion to obtain a face grayscale image; an Adaboost algorithm based on Haar features is used to obtain a face region image from the face grayscale image; the face region image is then converted into a binary image, and the maximum contour is used as the face contour to obtain a face contour image; finally, the face region image and the face contour image are subtracted to obtain an inner face region image, and an Adaboost algorithm based on Haar features is used to extract a facial skin region image from the inner face region image. These are all well-known technical means to those skilled in the art, and will not be described in detail here.

[0023] Taking into account that the human face is an uneven surface and that the skin color at different positions of the same face is different, in order to more easily analyze the local features of different areas of the face and more accurately identify the color spot area, the facial skin area image is divided into blocks to obtain image blocks; considering that there is a large grayscale difference between the color spot area and the normal skin area, edge detection is performed on each image block to obtain the skin connected domain in each image block.

[0024] As an example, set the preset block parameters , the facial skin area image is evenly divided into The existing Canny edge detection algorithm is used to perform edge detection on the image blocks to obtain the skin connected domain in each image block.

[0025] Step S2: According to the grayscale difference characteristics between each skin connected domain and other areas in the corresponding image block, the grayscale difference parameters of each skin connected domain are obtained; according to the edge regularity of each skin connected domain and the grayscale change characteristics of the edge pixels, the edge roughness parameters of each skin connected domain are obtained; according to the grayscale change characteristics of the pixels in each skin connected domain, the grayscale change parameters of each skin connected domain are obtained; according to the grayscale difference parameters, edge roughness parameters and grayscale change parameters of each skin connected domain, the color spot area is screened out.

[0026] Since spots and acne have large grayscale differences from normal skin, and normal skin may also form skin connected domains, the skin connected domain may be mixed with spots, acne and normal skin areas. It is necessary to further analyze the skin connected domain to screen out the spots. Considering that the spots are usually darker or lighter than the surrounding normal skin areas, showing a large difference in grayscale, the grayscale difference parameters of each skin connected domain are obtained based on the grayscale difference characteristics between each skin connected domain and other areas in the image block to which it belongs. From the perspective of grayscale difference, the possibility of the skin connected domain being a spot area is evaluated, providing a basis for the subsequent comprehensive screening of spot areas from multiple angles.

[0027] It should be noted that the calculation methods of the grayscale difference parameter, edge roughness parameter and grayscale variation parameter of each skin connected domain are the same, and only any skin connected domain is taken as an example.

[0028] Preferably, in one embodiment of the present invention, in order to facilitate the comparison between the skin connected domain and its surrounding skin areas and highlight the grayscale difference characteristics of the skin connected domain, the area constituted by other pixel points within the maximum circumscribed rectangle of the skin connected domain is taken as the adjacent area; based on the overall grayscale characteristics within the skin connected domain and the difference characteristics with the overall grayscale characteristics of all adjacent areas in the corresponding image block, the grayscale difference parameters of the corresponding skin connected domain are obtained.

[0029] As an example, the overall grayscale characteristics are expressed by means of the mean, and the average grayscale value of the pixels in the skin connected domain is used as the overall grayscale parameter of the skin connected domain, representing the overall grayscale characteristics of the skin connected domain; the average grayscale value of the pixels in all adjacent areas of the image block is used as the overall grayscale parameter of the skin in the image block, representing the overall grayscale characteristics of all adjacent areas in the image block; the grayscale difference characteristics are expressed by means of the absolute value of the difference, and the absolute value of the difference between the overall grayscale parameter of the skin connected domain and the overall grayscale parameter of the skin of the image block to which it belongs is used as the grayscale difference parameter of the skin connected domain. The larger the grayscale difference parameter, the greater the grayscale difference between the pixels in the skin connected domain and the surrounding areas, and the more likely it is to be a spot area.

[0030] As another example, other regions in the image blocks except the skin connected domain may be regarded as normal skin regions, and the average grayscale value of the normal skin region may be used as the overall grayscale parameter of the skin, thereby obtaining the grayscale difference parameter.

[0031] Considering that the shape of the spots is more irregular and the edge texture is rougher than that of the normal skin area, the edge roughness parameter of each skin connected domain is obtained according to the edge regularity of each skin connected domain and the grayscale change characteristics of the edge pixels. The possibility of the skin connected domain being a spot area is measured from the perspective of the edge roughness of the skin connected domain, which provides a basis for the subsequent accurate screening of the spot area from multiple angles.

[0032] Preferably, in one embodiment of the present invention, please refer to Figure 2 , which shows a flow chart of a method for obtaining edge roughness parameters provided by an embodiment of the present invention, specifically comprising: Step S201: Obtain the centroid of the skin connected domain; obtain a first roughness parameter according to the discrete characteristics of the distances between all edge pixels and the centroid.

[0033] Considering that the more irregular the edge of the skin connected domain is, the greater the change and the more discrete the distance from the edge pixel to the center of the skin connected domain is, the centroid of the skin connected domain is obtained to represent the center of the skin connected domain. According to the discrete characteristics of the distance between all edge pixels and the centroid, the first roughness parameter is obtained, and the discrete characteristics of the distance are positively correlated with the first roughness parameter.

[0034] As an example, the discrete characteristics of the distance are represented by variance, and then the edge regularity is evaluated. The larger the variance, the weaker the edge regularity. The Euclidean distance represents the distance between the edge pixel and the centroid, and the variance of the Euclidean distance from the edge pixel to the center of the skin connected domain is used as the first roughness parameter.

[0035] It should be noted that the methods of obtaining the centroid, variance, and Euclidean distance are technical means well known to those skilled in the art; in other embodiments of the present invention, the implementer may also express the discrete characteristics of the distance by the standard deviation and the mean absolute deviation, which will not be elaborated here.

[0036] Step S202: obtaining a second roughness parameter according to the grayscale difference characteristics between adjacent edge pixels.

[0037] Considering that the rougher the edge of the skin connected domain, the greater the grayscale difference between adjacent edge pixels, the more likely it is a spot area, while the grayscale value difference of edge pixels in the normal skin area is smaller and the edge is smoother, so the second roughness parameter is obtained according to the grayscale difference characteristics between adjacent edge pixels; the grayscale difference characteristics between adjacent edge pixels are positively correlated with the second roughness parameter.

[0038] As an example, taking any edge pixel point as the starting point, the edge pixels are sorted in a clockwise direction, and the grayscale change characteristics of the edge pixels are reflected by the absolute value of the difference. The absolute value of the difference in grayscale values ​​of adjacent edge pixels represents the grayscale difference characteristics between adjacent edge pixels, and the sum of the absolute values ​​of the difference in grayscale values ​​corresponding to all adjacent edge pixels is used as the second roughness parameter.

[0039] Step S203: Obtain edge roughness parameters of each skin connected domain according to the first roughness parameter and the second roughness parameter corresponding to each skin connected domain.

[0040] After analyzing the roughness of the skin connected domain from the two perspectives of edge morphology and texture through the first roughness parameter and the second roughness parameter respectively, the edge roughness parameter of each skin connected domain can be obtained according to the first roughness parameter and the second roughness parameter corresponding to each skin connected domain; the larger the first roughness parameter is, the more irregular the edge morphology of the skin connected domain is and the greater the roughness is; the larger the second roughness parameter is, the less smooth the edge texture of the skin connected domain is and the greater the roughness is, so the first roughness parameter and the second roughness parameter are positively correlated with the edge roughness parameter.

[0041] As an example, the product of the first roughness parameter and the second roughness parameter is used as the edge roughness parameter of the skin connected domain.

[0042] As another example, the first roughness parameter and the second roughness parameter are weightedly summed as the edge roughness parameter of the skin connected domain, and the weights may be 0.6 and 0.4.

[0043] Considering that both the pigmented area and the acne area are quite different from normal skin, and have certain similar characteristics under the analysis of internal grayscale and edge roughness angle, it is necessary to further distinguish the pigmented area and the acne area; considering that the grayscale changes of internal pixels in the pigmented area are more random and more drastic due to the random influence of spots; and acne mostly presents as blackheads, papules, pustules, nodules and cysts, the grayscale of internal pixels in the acne area is more consistent and the grayscale changes are smoother due to the sebum filling, so further according to the grayscale change characteristics of the pixels in each skin connected domain, the grayscale change parameters of each skin connected domain are obtained, and the possibility of the skin connected domain being a pigmented area is measured from the perspective of grayscale change, so as to provide more basis for the subsequent comprehensive and accurate screening of pigmented areas from multiple angles.

[0044] Preferably, in one embodiment of the present invention, the gradient value and gradient direction of each pixel in the skin connected domain are first obtained; considering that the larger the gradient value of the pixel, the more obvious the texture around the pixel, the greater the grayscale difference, and the easier it is to distinguish between spots and acne, so in any skin connected domain, pixels are selected in order from large to small according to the gradient value, and other pixels in the skin connected domain are selected along the gradient direction of the selected pixel to construct multiple grayscale change sequences; at the same time, repeated analysis is avoided, and there is no intersection between grayscale change sequences; the grayscale change of the pixel in the sequence is analyzed with the help of the grayscale change sequence, so as to analyze the grayscale change characteristics of the pixel in the skin connected domain; In all grayscale change sequences corresponding to any skin connected domain, the grayscale change parameters of the corresponding skin connected domain are obtained according to the drastic characteristics of the grayscale value changes of the pixels; since the more drastic the change of the grayscale value of the pixels in the grayscale change sequence is, the less it conforms to the grayscale consistency characteristics in the acne area, and the more likely it is a spot area, the drastic characteristics of the grayscale value changes of the pixels are positively correlated with the grayscale change parameters.

[0045] As an example, the calculation formula of the grayscale change parameter includes: ; in, Represents the grayscale change parameter of any selected skin connected domain; The number of grayscale change sequences representing the skin connectivity domain; The serial number representing the grayscale change sequence of the skin connected domain; Indicates The number of pixels in a grayscale change sequence; Indicates the sequence number of the pixel in the grayscale change sequence; The first The grayscale change sequence The gray value of each pixel; The first The grayscale change sequence The gray value of the pixel adjacent to the left of the pixel; The first The grayscale change sequence The gray value of the pixel adjacent to the right of the pixel; Indicates taking the absolute value.

[0046] In the calculation formula of the grayscale change parameter, the grayscale difference is expressed by the absolute value of the difference. The absolute value of the difference between the grayscale value of the pixel point in the grayscale change sequence and the average grayscale value of the pixels on the left and right sides is used to express the severity of the grayscale value change of the pixel point, and the irregularity of the grayscale value change. The larger it is, the more drastic the change in the grayscale value of the pixel is, and the weaker the regularity is. The more it conforms to the grayscale change characteristics of the color spot area, the larger the grayscale change parameter is.

[0047] It should be noted that there may be special cases where there are only one or two pixels in the grayscale change sequence. For a grayscale change sequence with only one pixel, obtain pixels that meet the following conditions: they are on the straight line where the gradient direction of the pixel in the sequence is located, they are adjacent to the pixel in the sequence and belong to the skin connected domain; when there are multiple pixels that meet the conditions, select the pixel in the gradient direction of the pixel in the sequence as the supplementary pixel; when there is only one pixel that meets the conditions, directly use the pixel that meets the conditions as the supplementary pixel, calculate the absolute value of the difference between the grayscale values ​​of the pixel in the sequence and the supplementary pixel, and use it to represent the grayscale change characteristics of the grayscale change sequence with only one pixel; when there is no pixel that meets the conditions, ignore this grayscale change sequence; for a grayscale change sequence with only two pixels, obtain the absolute value of the difference between the two pixels in the sequence, and use it to represent the grayscale change characteristics of the grayscale change sequence with only one pixel.

[0048] It should be noted that the method for obtaining the gradient value and the gradient direction is a technical means well known to those skilled in the art and will not be described in detail here.

[0049] In another embodiment of the present invention, considering that the larger the gradient value of the pixel point, the more drastic the grayscale change and the more complex the texture, the average value of the gradient value of the pixel points in the skin connected domain can be obtained. The larger the average value of the gradient value, the more likely it is a color spot area. The average value of the gradient value and the average value of the gradient value are fused by a positive correlation method such as weighted summation or multiplication. , together represent the grayscale change parameters.

[0050] The grayscale difference parameter evaluates the possibility that the skin connected domain is a spot area from the perspective of the grayscale difference between the spot area and the normal skin area; the edge roughness parameter uses the feature that the edge of the spot area is rougher than that of the normal skin area to measure the possibility that the skin connected domain is a spot area from the perspective of edge roughness; the grayscale change parameter uses the feature that the grayscale consistency inside the acne area is strong and the grayscale change inside the spot area is more drastic to distinguish the spot area from the acne area from the perspective of the grayscale change inside the area; therefore, after analyzing the differences between the spot area and the normal skin area and the acne area from multiple perspectives, the spot area can be screened out according to the grayscale difference parameter, edge roughness parameter and grayscale change parameter of each skin connected domain.

[0051] Preferably, in one embodiment of the present invention, considering that the larger the grayscale difference parameter is, the larger the grayscale difference between the pixels in the skin connected domain and the surrounding area is, the more likely it is a color spot area; the larger the edge roughness parameter is, the more irregular the edge shape of the skin connected domain is, the less smooth the edge texture is, and the greater the roughness is, the more likely it is a color spot area; the larger the grayscale change parameter is, the more drastic the grayscale change inside the skin connected domain is, and the more likely it is a color spot area, therefore, the grayscale difference parameter, edge roughness parameter and grayscale change parameter of each skin connected domain are fused to obtain the color spot possibility of each skin connected domain; the grayscale difference parameter, edge roughness parameter and grayscale change parameter are all positively correlated with the color spot possibility; when the color spot possibility is greater than or equal to the preset possibility threshold, the corresponding skin connected domain is determined to be a color spot area.

[0052] As an example, the product of the grayscale difference parameter, edge roughness parameter and grayscale variation parameter of the skin connected domain is linearly normalized and used as the color spot possibility of the skin connected domain; the preset possibility threshold is set to 0.65, and when the color spot possibility is greater than or equal to 0.65, the corresponding skin connected domain is determined as a color spot area.

[0053] As another example, a weighted sum of the grayscale difference parameter, the edge roughness parameter, and the grayscale variation parameter of the skin connected domain is linearly normalized to obtain the color spot possibility of the skin connected domain.

[0054] Step S3: adjusting the high peak power of the Q-switched laser according to the area change rate of the color spot region in the preset continuous frame human face grayscale image.

[0055] After accurately identifying the pigmented area in the grayscale image of the face, the high peak power of the Q-switched laser can be adjusted during the pigmented area cosmetic process according to the area change rate of the pigmented area in the preset continuous frame grayscale image of the face, thereby improving the pigmented area cosmetic effect and patient experience.

[0056] Preferably, in one embodiment of the present invention, all initial spot areas are determined by using a grayscale image of the face collected before the spot cosmetic Q-switched laser works, and all subsequent spot areas within the initial spot area are regarded as the same spot area, and the number of pixels in the spot area is taken as the area of ​​the spot area; if there is no spot area at the initial spot area in a frame image, the area of ​​the spot area at the corresponding position in this frame image is 0; the operating frequency of the Q-switched laser instrument is set to 10 Hz, the image acquisition frequency is set to 10 Hz, the number of continuous frames is preset to 40, the current image is taken as the last frame image, 39 adjacent frames of history are obtained, and they are sorted in chronological order, the area change of the spot area is analyzed in the current 40 continuous frames of images, and the current Q-switched laser is adaptively controlled; According to the area change of the color spot area in the preset continuous frame grayscale image of the face, the color spot removal rate is obtained; when the color spot removal rate is greater than the preset high rate threshold, the high peak power of the Q-switched laser is reduced; when the color spot removal rate is less than the preset low rate threshold, the high peak power of the Q-switched laser is increased; the preset high rate threshold is greater than the preset low rate threshold.

[0057] As an example: The formula for calculating the rate of pigmentation reduction includes: ; in, Indicates the rate of pigmentation reduction; represents the linear normalization function; Represents the number of all initial spot areas; Indicates the serial number of the stain area; Indicates the number of preset continuous frames; Indicates the sequence number of the selected continuous frame images; Indicates The pigmented area is The area of ​​the frame face grayscale image; Indicates The pigmented area is The area of ​​the face in the grayscale image of the frame.

[0058] In the calculation formula of the color spot removal rate, the color spot removal rate is expressed by the area reduction characteristics of all color spot regions in the temporally adjacent face grayscale images. The larger the value is, the greater the reduction in the area of ​​the color spot in the adjacent frame image is, reflecting that the faster the color spot is eliminated by the Q-switched laser, the greater the color spot elimination rate is.

[0059] As another example, the implementer may also obtain the color spot removal rate according to the total area change of all color spot regions in the face grayscale image, such as ;in Indicates The total area of ​​all the spots in the grayscale image of the face; Indicates The total area of ​​all color spots in the frame face grayscale image.

[0060] As an example, the preset high rate threshold is 0.5, and the preset low rate threshold is 0.1; when the spot removal rate is greater than the preset high rate threshold, it is determined that the peak power of the Q-switched laser is too large, which is easy to damage the patient's skin, and the peak power of the Q-switched laser needs to be reduced; when the spot removal rate is less than the preset low rate threshold, it is determined that the peak power of the Q-switched laser is too small, which is easy to cause incomplete removal of the patient's spots, affecting the cosmetic effect, and is easy to consume too much time, affecting the patient's experience, and the peak power of the Q-switched laser needs to be increased. Each time the peak power of the Q-switched laser is reduced or increased, 30% of the current peak power of the Q-switched laser is adjusted, that is, reduced by 30% or increased by 30%.

[0061] In other embodiments of the present invention, implementers can set other image acquisition frequencies, preset numbers of continuous frames, preset high rate thresholds, preset low rate thresholds, and the amplitude of reducing or increasing the high peak power of the Q-switched laser each time.

[0062] In another embodiment of the present invention, considering that the complete color spot area may be divided into different image blocks due to image block processing, it is also necessary to merge some color spot areas; considering that directly combining image blocks is easy to merge different color spot areas, affecting the recognition accuracy of the complete color spot area, it is necessary to adopt other methods to merge, and after screening the color spot area, it also includes: Since only the color spot area at the edge of the image block can be segmented into different image blocks, the color spot area at the edge of the image block is regarded as the defective color spot area, and the other color spot areas are regarded as the complete color spot areas; the pixel points of the color spot area at the edge of the image block are regarded as the edge pixel points; When a complete color spot area is divided into different image blocks, the number of edge pixel points of the defective color spot area on adjacent sides of adjacent image blocks is the same. For example, image blocks A and B adjacent to each other on the left and right, in a clockwise direction, with the edge of the top block as the starting point, the four sides are A, B, C, and D, then A B and B D are adjacent sides, and the number of edge pixel points of the defective color spot area on adjacent sides is the same; and since the corresponding relationship of the defective color spot areas that meet this condition is mutual, and the more pixels a defective color spot area has, the larger its area is, and the larger its proportion in the complete color spot area is, so based on the defective color spot area with the most pixels, other defective color spot areas are merged with it, so the defective color spot areas with adjacent image blocks and the same number of edge pixel points on adjacent sides constitute a defective color spot area set; in each defective color spot area set, the defective color spot area with the most pixels is used as the color spot area to be merged, and the remaining defective color spot areas are used as the target color spot areas; Taking into account that the stronger the continuity between the color spot area to be merged and the corresponding target color spot area and the more similar the grayscale change parameters are, the more likely they are to be merged, so based on the continuity characteristics of the color spot area to be merged and the corresponding target color spot area, combined with the similar characteristics of the grayscale change parameters, the complete color spot area corresponding to the color spot area to be merged is obtained; according to the area change rate of the complete color spot area in the preset continuous frame face grayscale image, the high peak power of the Q-switched laser is adjusted.

[0063] It should be noted that the method of adjusting the high-peak power of the Q-switched laser according to the area change rate of the complete color spot area in the preset continuous frame face grayscale image is the same as the method of adjusting the high-peak power of the Q-switched laser according to the area change rate of the color spot area in the preset continuous frame face grayscale image, and will not be repeated here.

[0064] Among them, according to the continuity characteristics of the color spot area to be merged and the corresponding target color spot area, combined with the similar characteristics of the grayscale change parameters, the method of obtaining the complete color spot area corresponding to the color spot area to be merged includes: In any defective spot area set, the spot area to be merged is paired with any target spot area, and the paired target spot area is used as the matching spot area; considering that the line connecting the edge pixel point and the pixel point inside the adjacent spot area represents the extension trend of the spot area, the minimum angle between the straight line connecting each edge pixel point and the pixel point inside the spot area in the preset neighborhood and the horizontal direction is obtained as the extension angle of each edge pixel point; Considering that the number of edge pixels on the adjacent sides of the image blocks corresponding to the color spot area to be merged and the matching color spot area is the same, they can be sorted from top to bottom or from left to right. The more similar the extension angles of the edge pixels with the same serial number are, the more consistent the extension trends of the color spot area to be merged and the matching color spot area are, and the closer the distance between the edge pixels with the same serial number is, the stronger the continuity of the two defective color spot areas is; at the same time, the more similar the grayscale change parameters are, the more similar the grayscale change characteristics inside the color spot area to be merged and the matching color spot area are, and the more likely they are to belong to the same complete Therefore, on the adjacent edges of the image blocks corresponding to the to-be-merged color spot area and the matching color spot area, the merging suitability corresponding to the to-be-merged color spot area and the matching color spot area is obtained according to the similar features of the distance between the edge pixels of the same sequence number and the extension angle between the edge pixels, combined with the similar features of the grayscale change parameters between the to-be-merged color spot area and the matching color spot area; the distance between the edge pixels is negatively correlated with the merging suitability; the similar features of the extension angle between the edge pixels and the similar features of the grayscale change parameters are both positively correlated with the merging suitability; The defective color spot areas in the defective color spot area set are merged according to the merging suitability to obtain the complete color spot area corresponding to the defective color spot area.

[0065] As an example, the preset neighborhood is a four-neighborhood neighborhood, that is, the current pixel is taken as the center and includes four adjacent pixels above, below, left and right. For edge pixels, usually only one pixel in the four-neighborhood neighborhood meets the conditions for constructing the extension angle. The calculation formula for the merge suitability includes: ; In the formula, Indicates the merging suitability of the color spot area to be merged and the matching color spot area; Expressed as a natural constant The exponential function with base ; Indicates the number of edge pixels on adjacent edges of the image blocks corresponding to the color spot area to be merged and the matching color spot area; Indicates the sequence number of edge pixel points on adjacent edges of the image blocks corresponding to the color spot area to be merged and the matching color spot area; Indicates the distance between the color spot area to be merged and the matching color spot area. The Euclidean distance between edge pixels; Indicates the adjacent edges of the image blocks corresponding to the color spot area to be merged and the matching color spot area. The extension angle of edge pixels; Indicates the adjacent edges of the image blocks corresponding to the color spot area to be merged and the matching color spot area. The extension angle of edge pixels; Indicates taking the absolute value; Represents the grayscale change parameter of the color spot area to be merged; Represents the grayscale variation parameter of the matching color spot area.

[0066] In the calculation formula of combined suitability, the difference characteristics of the extension angle and the similar characteristics of the grayscale change parameters are expressed by the absolute value of the difference, and then the negative correlation mapping function is used Negative correlation mapping is performed to show similar features of extension angles and similar features of grayscale change parameters, and the distance between edge pixels of the same serial number is expressed by Euclidean distance; the more similar the extension angles of edge pixels of the same serial number are, the more consistent the extension trends of the color spot area to be merged and the matching color spot area are, and the closer the distance between edge pixels of the same serial number is, the stronger the continuity of the two defective color spot areas is; at the same time, the more similar the grayscale change parameters are, the more similar the grayscale change features inside the color spot area to be merged and the matching color spot area are, and the more likely they are to belong to the same complete color spot area, and the greater the suitability for merging.

[0067] It should be noted that, if there is no pixel inside the color spot area in the preset neighborhood of the edge pixel point, the extension angle of the edge pixel point is set to 0; the relevant mapping function middle, is the independent variable; in other embodiments of the present invention, the implementer may also perform negative correlation mapping by taking the inverse.

[0068] Among them, the method of merging defective color spot regions in the defective color spot region set according to the merging suitability to obtain a complete color spot region corresponding to the defective color spot region includes: The target color spot area whose merging suitability is greater than or equal to the preset merging threshold is merged with the corresponding color spot area to be merged to obtain a complete color spot area; if all the merging suitabilities corresponding to the color spot area to be merged are less than the preset merging threshold, the color spot area to be merged is merged with the corresponding target color spot area with the largest merging suitability to obtain a complete color spot area.

[0069] As an example, the preset merging threshold is set to 0.8; in other embodiments of the present invention, implementers may also set it by themselves.

[0070] It should be noted that the unmerged defective color spot area is treated as a separate complete color spot area.

[0071] An embodiment of the present invention also provides a Q-switched laser-based color spot beauty intelligent control system, the system includes a memory, a processor and a computer program, wherein the memory is used to store the corresponding computer program, the processor is used to run the corresponding computer program, and when the computer program is running in the processor, it can implement the Q-switched laser-based color spot beauty intelligent control method described in steps S1-S3.

[0072] In summary, in view of the technical problems of inaccurate identification of color spot areas and inaccurate control of Q-switched lasers, the present invention proposes a color spot beauty intelligent control method and system based on Q-switched lasers. The present invention first obtains a grayscale image of a face and extracts a facial skin area image; further divides the facial skin area image into blocks, and performs edge detection to obtain the skin connected domain in each image block; further obtains the grayscale difference parameter, edge roughness parameter and grayscale change parameter of each skin connected domain; further selects the color spot area according to the grayscale difference parameter, edge roughness parameter and grayscale change parameter of each skin connected domain; finally, adjusts the high peak power of the Q-switched laser according to the area change rate of the color spot area. The present invention accurately identifies the color spot area from the grayscale difference angle between the color spot area and the normal skin area, the angle at which the edge of the color spot area is rougher than that of the normal skin area, and the internal grayscale change difference angle between the color spot area and the acne area, thereby adaptively adjusting the high peak power of the Q-switched laser according to the area change of the color spot area, and improving the color spot beauty effect and patient experience.

[0073] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0074] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A Q-switched laser-based intelligent control method for pigmentation beauty, characterized in that: The method comprises: Acquire a grayscale image of a face and extract a facial skin area image; divide the facial skin area image into blocks to obtain image blocks; perform edge detection on each of the image blocks to obtain a skin connected domain in each of the image blocks; According to the grayscale difference characteristics of each skin connected domain and other areas in the corresponding image block, the grayscale difference parameter of each skin connected domain is obtained; according to the edge regularity of each skin connected domain and the grayscale change characteristics of the edge pixels, the edge roughness parameter of each skin connected domain is obtained; according to the grayscale change characteristics of the pixels in each skin connected domain, the grayscale change parameter of each skin connected domain is obtained; according to the grayscale difference parameter, the edge roughness parameter and the grayscale change parameter of each skin connected domain, the color spot area is screened; The high peak power of the Q-switched laser is adjusted according to the area change rate of the color spot area in the preset continuous frame human face grayscale image.

2. The Q-switched laser-based color spot beauty intelligent control method according to claim 1, characterized in that: The method for obtaining the grayscale difference parameter includes: The area formed by other pixel points within the maximum circumscribed rectangle of the skin connected domain is taken as the adjacent area; based on the difference characteristics between the overall grayscale characteristics within the skin connected domain and the overall grayscale characteristics of all the adjacent areas in the image block to which it belongs, the grayscale difference parameters corresponding to the skin connected domain are obtained.

3. The Q-switched laser-based color spot beauty intelligent control method according to claim 1, characterized in that: The method for obtaining the edge roughness parameter includes: Obtain the centroid of the skin connected domain; obtain a first roughness parameter based on the discrete characteristics of the distances between all edge pixels and the centroid; obtain a second roughness parameter based on the grayscale difference characteristics between adjacent edge pixels; obtain an edge roughness parameter of each skin connected domain based on the first roughness parameter and the second roughness parameter corresponding to each skin connected domain; the discrete characteristics of the distance are positively correlated with the first roughness parameter; the grayscale difference characteristics between adjacent edge pixels are positively correlated with the second roughness parameter; the first roughness parameter and the second roughness parameter are both positively correlated with the edge roughness parameter.

4. The Q-switched laser-based color spot beauty intelligent control method according to claim 1, characterized in that: The method for obtaining the grayscale change parameter includes: Obtaining the gradient value and gradient direction of each pixel point in the skin connected domain; in any of the skin connected domains, selecting pixels in order from large to small according to the gradient values, and selecting other pixels in the skin connected domain along the gradient direction of the selected pixels, to construct multiple grayscale change sequences; the grayscale change sequences have no intersection; In all the grayscale change sequences corresponding to any of the skin connected domains, the grayscale change parameter corresponding to the skin connected domain is obtained according to the dramatic feature of the grayscale value change of the pixel point; the dramatic feature of the grayscale value change of the pixel point is positively correlated with the grayscale change parameter.

5. The Q-switched laser-based color spot beauty intelligent control method according to claim 1, characterized in that: The method for obtaining the color spot area comprises: The grayscale difference parameter, the edge roughness parameter and the grayscale change parameter of each skin connected domain are integrated to obtain the color spot possibility of each skin connected domain; the grayscale difference parameter, the edge roughness parameter and the grayscale change parameter are all positively correlated with the color spot possibility; when the color spot possibility is greater than or equal to a preset possibility threshold, the corresponding skin connected domain is determined to be a color spot area.

6. The Q-switched laser-based color spot beauty intelligent control method according to claim 1, characterized in that: The step of adjusting the high peak power of the Q-switched laser according to the area change rate of the color spot area in the preset continuous frame human face grayscale image comprises: According to the change in the area of ​​the color spot area in the preset continuous frame grayscale image of the face, the color spot removal rate is obtained; when the color spot removal rate is greater than the preset high rate threshold, the high peak power of the Q-switched laser is reduced; when the color spot removal rate is less than the preset low rate threshold, the high peak power of the Q-switched laser is increased; the preset high rate threshold is greater than the preset low rate threshold.

7. The Q-switched laser-based color spot beauty intelligent control method according to claim 1, characterized in that: After filtering out the color spot area, the method further includes: The color spot area at the edge of the image block is taken as the defective color spot area, and the other color spot areas are taken as the complete color spot area; the pixel points of the color spot area at the edge of the image block are taken as the edge pixel points; the defective color spot areas adjacent to the image block and with the same number of edge pixel points on the adjacent edges constitute a defective color spot area set; in each of the defective color spot area sets, the defective color spot area with the most pixel points is taken as the color spot area to be merged, and the other defective color spot areas are taken as the target color spot areas; According to the continuity characteristics of the color spot area to be merged and the corresponding target color spot area, combined with the similar characteristics of the grayscale change parameters, the complete color spot area corresponding to the color spot area to be merged is obtained; according to the area change rate of the complete color spot area in the preset continuous frame face grayscale image, the high peak power of the Q-switched laser is adjusted.

8. The Q-switched laser-based intelligent control method for pigmentation beauty according to claim 7, characterized in that: The step of obtaining the complete color spot region corresponding to the color spot region to be merged according to the continuity feature of the color spot region to be merged and the corresponding target color spot region in combination with the similarity feature of the grayscale change parameter comprises: In any of the defective color spot area sets, the color spot area to be merged is paired with any of the target color spot areas, and the paired target color spot area is used as the matching color spot area; the minimum angle between the straight line connecting each of the edge pixel points and the pixel points within the color spot area in the preset neighborhood and the horizontal direction is obtained as the extension angle of each of the edge pixel points; On the adjacent edges of the image blocks corresponding to the color spot area to be merged and the matching color spot area, according to the distance between edge pixel points of the same sequence number and the similarity characteristics of the extension angle between edge pixel points, combined with the similarity characteristics of the grayscale change parameters between the color spot area to be merged and the matching color spot area, the merging suitability corresponding to the color spot area to be merged and the matching color spot area is obtained; the distance between the edge pixel points is negatively correlated with the merging suitability; the similarity characteristics of the extension angle between the edge pixel points and the similarity characteristics of the grayscale change parameters are both positively correlated with the merging suitability; The defective color spot regions in the defective color spot region set are merged according to the merging suitability to obtain a complete color spot region corresponding to the defective color spot region.

9. The Q-switched laser-based color spot beauty intelligent control method according to claim 8, characterized in that: The step of merging the defective color spot regions in the defective color spot region set according to the merging suitability to obtain a complete color spot region corresponding to the defective color spot region comprises: The target color spot area whose merging suitability is greater than or equal to the preset merging threshold is merged with the corresponding color spot area to be merged to obtain a complete color spot area; if all the merging suitabilities corresponding to the color spot areas to be merged are less than the preset merging threshold, the color spot area to be merged is merged with the corresponding target color spot area with the largest merging suitability to obtain a complete color spot area.

10. A Q-switched laser-based intelligent control system for pigmentation beauty, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the Q-switched laser-based color spot beauty intelligent control method as described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Image recognition-based facial skin analysis system

    CN106529429A

  • Laser beverage-removing system and method

    CN109529202A

  • Method for detecting color spots based on skin image

    CN110197487A

  • Image processing method and system

    CN112365430A

  • Intelligent freckle removing system based on infrared laser

    CN113191985A