A scar area detection method for skin plastic surgery data

By analyzing the inner and outer edge characteristics of the connecting domain of facial skin images, combining grayscale and texture characteristics, the scar area is screened, which solves the problem of low detection accuracy of scar area in the prior art and improves the detection effect of skin plastic surgery data.

CN118710679BActive Publication Date: 2024-12-06TIANJIN FIRST CENT HOSPITAL
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411195321.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-12-06
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

In the prior art, the detection of facial scar areas depends on the difference in grayscale values, ignoring the shape and detail texture characteristics, resulting in low detection accuracy, especially when ambient light is disturbed, it is easy to accidentally segment the normal skin area.

Method used

By obtaining facial skin grayscale images, segmenting the connectivity domain, combining grayscale distribution chaos and edge gradient direction distribution to obtain scar grayscale feature values, dividing inner and outer edge areas, analyzing texture feature values, and screening out scar areas based on grayscale and texture features.

Benefits of technology

It improves the accuracy of scar area detection, reduces missegment, and enhances the effect of scar area detection on skin plastic surgery data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710679B_ABST
    Figure CN118710679B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of local image segmentation, and in particular to a scar region detection method for skin plastic surgery data. The method firstly segments a facial connected domain according to the grayscale distribution of a facial skin grayscale image, and then obtains a scar grayscale feature value according to the characteristics of chaotic grayscale distribution in the facial connected domain and irregular edge details; further obtains a scar texture feature value according to the characteristics that the grayscale of an area close to the center of the scar area is uniform and the grayscale of an area close to the edge is chaotic; the scar grayscale feature value and the scar texture feature value are combined to obtain a corresponding scar possibility; thereby, a more accurate final scar area is screened out according to the scar possibility, so that the detection effect of the scar area is better.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of local image segmentation, and in particular to a scar area detection method for skin plastic surgery data. Background Art

[0002] For users, facial scars are usually the main reason for plastic surgery, and there are many types of facial scars, and different types of facial scars have different treatment methods; therefore, in the field of skin plastic surgery teaching, the relevant learning of facial scars is very basic and important; and considering that directly using facial skin images as teaching data cannot accurately and intuitively display the scar content that needs to be taught, the target area corresponding to the scar area in the facial skin image is usually separately marked or segmented for teaching management.

[0003] Since the method of segmenting the target area in the user's facial skin image through manual observation is not only inefficient but also the accuracy of the acquisition is very dependent on the collector's experience in scar detection; therefore, image processing technology is usually used to more efficiently detect and collect the target area in the user's facial skin image. The existing technology usually segments the final scar area through a threshold segmentation method based on the characteristic that there is a certain gray value difference between the scar area and other facial areas.

[0004] However, the traditional threshold segmentation method mainly relies on the grayscale value of pixels for segmentation, ignoring the shape and detailed texture features of the scar area in the facial skin image. For example, when ambient light interference occurs, the normal skin area may be segmented as the scar area. That is, the existing technology only uses the characteristic that there is a certain grayscale value difference between the scar area and other facial areas. The accuracy of the final scar area segmented by the threshold segmentation method is poor, resulting in poor scar area detection effect for skin plastic surgery data. Summary of the invention

[0005] In order to solve the technical problem that the prior art only uses the characteristic of a certain gray value difference between the scar area and other facial areas, the accuracy of segmenting the final scar area by the threshold segmentation method is poor, resulting in poor scar area detection effect on skin plastic surgery data, the purpose of the present invention is to provide a scar area detection method for skin plastic surgery data, and the technical scheme adopted is as follows:

[0006] The present invention proposes a scar area detection method for skin plastic surgery data, the method comprising:

[0007] Acquire a facial skin grayscale image of the user; perform image segmentation according to the grayscale distribution of the facial skin grayscale image to obtain a facial connected domain;

[0008] According to the disorder of grayscale distribution in each facial connected domain and the fluctuation of gradient direction distribution of edge pixels, the scar grayscale characteristic value of each facial connected domain is obtained;

[0009] According to the distribution of grayscale texture in each facial connected domain, each facial connected domain is divided into an inner edge region and an outer edge region; according to the stability of the grayscale distribution in the inner edge region and the discreteness of the grayscale distribution in the outer edge region, a scar texture feature value of each facial connected domain is obtained;

[0010] The scar possibility of each facial connected domain is obtained according to the scar grayscale feature value and the scar texture feature value; the final scar area in all facial connected domains is screened out according to the scar possibility; and skin plastic surgery data management is performed according to the final scar area.

[0011] Furthermore, the method for obtaining the scar grayscale characteristic value includes:

[0012] Obtain the minimum circumscribed rectangle of each facial connected domain; use the line between each vertex of the minimum circumscribed rectangle and the centroid of the corresponding facial connected domain as a segmentation line; use the intersection point between the segmentation line and the edge of the corresponding facial connected domain as the segmentation edge point of each facial connected domain; divide the edge of each facial connected domain into at least two local edge segments with all the segmentation edge points of each facial connected domain as intervals;

[0013] According to the chaotic distribution of the grayscale gradient direction of the edge pixels on each local edge segment corresponding to each facial connected domain, the gradient feature value of each facial connected domain is obtained;

[0014] The product of the gradient eigenvalue and the grayscale value variance of all pixels in each facial connected domain is used as the scar grayscale eigenvalue of each facial connected domain.

[0015] Furthermore, the method for obtaining the gradient characteristic value includes:

[0016] In each facial connected domain, the variance of the grayscale gradient angles of all edge pixels on each local edge segment is used as the edge irregularity degree of each local edge segment;

[0017] The average of the edge irregularity of all local edge segments in each facial connected domain is taken as the gradient feature value of each facial connected domain.

[0018] Furthermore, the method of dividing each facial connected domain into an inner edge region and an outer edge region according to the distribution of grayscale texture in each facial connected domain includes:

[0019] The convex hull area of ​​each facial connected domain is obtained by a convex hull algorithm; the convex hull area is iteratively reduced at a preset reduction ratio with the centroid of the corresponding facial connected domain as the center, and the iteration is stopped when the convex hull area after iterative reduction contains only the pixel points of the corresponding facial connected domain, and the convex hull area after the iteration is stopped is used as the inner edge area of ​​each facial connected domain; other areas outside the inner edge area in each facial connected domain are used as the outer edge area of ​​each facial connected domain.

[0020] Furthermore, the method for obtaining the scar texture feature value includes:

[0021] The negative correlation mapping value of the variance of the grayscale values ​​of all pixels in the inner edge area of ​​each facial connected domain is used as the inner edge grayscale stable value of each facial connected domain;

[0022] According to the gray value distribution deviation of all pixels in the outer edge area of ​​each facial connected domain, the outer edge gray deviation value of each facial connected domain is obtained;

[0023] The scar texture characteristic value of each facial connected domain is obtained according to the inner edge grayscale stability value and the outer edge grayscale deviation value; the inner edge grayscale stability value and the outer edge grayscale deviation value are both positively correlated with the scar texture characteristic value.

[0024] Furthermore, the method for obtaining the outer edge grayscale deviation value includes:

[0025] The mean grayscale value of all pixels in the outer edge area of ​​each facial connected domain is used as the standard outer edge grayscale value of each facial connected domain; in the outer edge area of ​​each facial connected domain, the difference between the grayscale value of each pixel and the standard outer edge grayscale value is used as the reference grayscale deviation of each pixel; the mean of the reference grayscale deviation of all pixels in the outer edge area of ​​each facial connected domain is used as the outer edge grayscale deviation value of each facial connected domain.

[0026] Furthermore, the method for obtaining the scar texture feature value of each facial connected domain according to the inner edge grayscale stability value and the outer edge grayscale deviation value comprises:

[0027] The product of the inner edge grayscale stability value and the outer edge grayscale deviation value is used as the scar texture feature value of each facial connected domain.

[0028] Furthermore, the method for obtaining the scar possibility includes:

[0029] The normalized value of the product of the scar grayscale eigenvalue and the scar texture eigenvalue is used as the scar possibility of each facial connected domain.

[0030] Furthermore, the method for obtaining the final scar area includes:

[0031] The facial connected domain with scar probability greater than the preset scar threshold is taken as the final scar area.

[0032] Furthermore, the method for acquiring the facial connected domain includes:

[0033] After the facial skin grayscale image is segmented by Otsu's threshold method, the closed connected domain is used as the facial connected domain.

[0034] The present invention has the following beneficial effects:

[0035] In facial skin images, the grayscale values ​​of normal skin areas are usually evenly distributed, while the grayscale distribution of scar areas is somewhat different from that of normal skin areas, and the scar area usually corresponds to a closed connected area. Therefore, the present invention first segments the facial connected domain according to the grayscale distribution of the facial skin grayscale image, and then further screens the scar area based on the facial connected domain.

[0036] Scars on facial skin usually show uneven features, so the grayscale part in the facial connected domain corresponding to the real scar area is overall chaotic, which is different from the grayscale value consistency of the normal skin area; and real scars usually have jagged irregular edges, so the gradient direction of the pixels on the edge of the corresponding facial connected domain is usually distributed in a chaotic manner and has strong volatility; therefore, the present invention first obtains the scar grayscale eigenvalue of each facial connected domain according to the chaotic grayscale distribution in each facial connected domain and the gradient direction distribution fluctuation of the edge pixel points; thereby, from the perspective of scar grayscale distribution and shape, the possibility of each facial connected domain being a real scar area is characterized by the scar grayscale eigenvalue.

[0037] Further analysis is conducted on the unique surface texture features of the real scar area. Although the overall grayscale distribution of the real scar area is relatively chaotic, the grayscale performance of the corresponding area close to the inside of the real scar is usually smoother, and the closer to the edge area, the more chaotic the corresponding grayscale distribution; that is, the grayscale distribution of the area close to the edge in the facial connected domain corresponding to the real scar area is relatively chaotic, while the grayscale distribution corresponding to the area close to the center is relatively smooth; therefore, the present invention first divides each facial connected domain into an inner edge area and an outer edge area according to the grayscale texture distribution of each facial connected domain; further, the scar texture eigenvalue of each facial connected domain is obtained through the stability of the grayscale distribution of the inner edge area and the discreteness of the grayscale distribution of the outer edge area; thereby, from the perspective of grayscale detail texture, the possibility of each facial connected domain being a real scar area is further characterized through the scar texture eigenvalue.

[0038] Therefore, in order to make the scar possibility representation of each facial connected domain more accurate, the scar grayscale eigenvalue and the scar texture eigenvalue are further combined to obtain a more accurate scar possibility corresponding to each facial connected domain; thereby further screening out a more accurate final scar area according to the scar possibility, so that the scar area detection effect of skin plastic surgery data based on the obtained final scar area is better. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 A flow chart of a scar area detection method for skin plastic surgery data provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0041] 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 scar area detection method of skin plastic surgery data proposed by the present invention, its specific implementation, structure, characteristics and effects, in conjunction 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.

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

[0043] The following is a detailed description of a method for detecting scar areas in skin plastic surgery data provided by the present invention in conjunction with the accompanying drawings.

[0044] See also Figure 1 , which shows a flow chart of a scar area detection method for skin plastic surgery data provided by an embodiment of the present invention, the method comprising:

[0045] Step S1: Obtain a grayscale image of the user's facial skin; perform image segmentation according to the grayscale distribution of the facial skin grayscale image to obtain a facial connected domain.

[0046] The embodiment of the present invention aims to provide a scar region detection method for skin plastic surgery data, which is used to screen out the connected domain corresponding to the final scar region according to the grayscale distribution, shape and texture of each connected domain in the facial skin image, so as to manage the skin plastic surgery data according to the final scar region. Since the grayscale analysis is required, the embodiment of the present invention first obtains the grayscale image of the user's facial skin.

[0047] In an embodiment of the present invention, after the user lies flat, the initial facial skin image is captured above the user's face by moving the rocker camera, and then the initial facial skin image is grayed to obtain the facial skin gray image required by the embodiment of the present invention. It should be noted that all facial skin gray images corresponding to the embodiment of the present invention are skin plastic surgery data allowed by the user for internal teaching and learning, and there is no infringement of the user's personal privacy, which will not be further elaborated here. In the facial skin image, the grayscale value of the normal skin area is usually evenly distributed, while the grayscale distribution of the scar area is somewhat different from that of the normal skin area, and the scar area usually corresponds to a closed connected area. Therefore, the embodiment of the present invention further performs image segmentation according to the grayscale distribution of the facial skin gray image to obtain a facial connected domain, thereby further screening the scar area on the basis of the facial connected domain.

[0048] Preferably, the method for acquiring the facial connected domain includes:

[0049] Since the grayscale distribution of the scar area is somewhat different from that of the normal skin area and the scar area usually corresponds to a closed connected area, the embodiment of the present invention uses the closed connected domain as the facial connected domain after the facial skin grayscale image is segmented by the Otsu threshold method. It should be noted that the Otsu threshold method segmentation is an existing technology well known to those skilled in the art and will not be further defined or elaborated herein.

[0050] Step S2: Obtain scar grayscale feature values ​​of each facial connected domain according to the grayscale distribution disorder in each facial connected domain and the gradient direction distribution fluctuation of edge pixels.

[0051] Scars on the facial skin usually show uneven features, so the grayscale part in the facial connected domain corresponding to the real scar area is overall chaotic, which is different from the grayscale value consistency of the normal skin area; and real scars usually have jagged irregular edges, so the gradient direction of the pixel points on the edge of the corresponding facial connected domain is usually distributed in a chaotic manner and has strong volatility; therefore, the embodiment of the present invention obtains the scar grayscale feature value of each facial connected domain according to the chaotic grayscale distribution in each facial connected domain and the gradient direction distribution fluctuation of the edge pixel points.

[0052] Preferably, the method for obtaining the scar grayscale feature value includes:

[0053] The minimum circumscribed rectangle of each facial connected domain is obtained; the line between each vertex of the minimum circumscribed rectangle and the centroid of the corresponding facial connected domain is used as a segmentation line; the intersection point between the segmentation line and the edge of the corresponding facial connected domain is used as the segmentation edge point of each facial connected domain; the edge of each facial connected domain is divided into at least two local edge segments with all the segmentation edge points of each facial connected domain as intervals; the gradient eigenvalue of each facial connected domain is obtained according to the disorder of the grayscale gradient direction distribution of the edge pixel points on each local edge segment corresponding to each facial connected domain.

[0054] The overall shape of the edge of the scar area is relatively uniform, and its jagged characteristics are mainly reflected in the details; for example, for a long scar, the corresponding shape is a rectangle as a whole, but the corresponding edges on each side are usually jagged, and the corresponding grayscale gradient distribution is relatively chaotic. Therefore, in order to obtain a more accurate gradient distribution chaos feature, firstly, the edge of the facial connected domain is divided by combining the segmentation lines generated by connecting the vertices of the corresponding minimum circumscribed rectangle with the centroid of the facial connected domain, so that each local edge segment obtained by the division can correspond to each side of the minimum circumscribed rectangle as a whole, that is, the overall extension direction of the local edge segment is kept consistent, so that the analysis of the gradient direction distribution chaos feature is more accurate. In another embodiment of the present invention, the intersection of the longest midline in the minimum circumscribed rectangle of the facial connected domain and the edge of the scar area is used as the segmentation edge point; the edge of each facial connected domain is divided into at least two local edge segments with the segmentation edge point as the interval; the acquisition principle of the local edge segment corresponding to the embodiment of the present invention is the same, and the overall extension direction of the edge of the local edge segment is kept consistent as much as possible, which will not be further described here.

[0055] Preferably, the method for obtaining the gradient eigenvalue includes:

[0056] In each facial connected domain, the variance of the grayscale gradient angles of all edge pixels on each local edge segment is used as the edge irregularity of each local edge segment. For each local edge segment, if the variance of the corresponding grayscale gradient angle is larger, it means that the distribution of the corresponding grayscale gradient angle is more discrete, that is, the corresponding gradient direction distribution is more chaotic, and the corresponding local edge segment is more consistent with the edge characteristics of a real scar. Since each facial connected domain corresponds to multiple local edge segments, the embodiment of the present invention further combines all local edge segments and uses the mean of the edge irregularity of all local edge segments in each facial connected domain as the gradient eigenvalue of each facial connected domain, so that when the gradient eigenvalue is larger, the edge shape of the corresponding facial connected domain is more consistent with the characteristics of a real scar, that is, the possibility of being a real scar area is greater.

[0057] In addition, the grayscale part of the facial connected domain corresponding to the real scar area is overall chaotic, which is different from the grayscale value consistency of the normal skin area. Therefore, the embodiment of the present invention analyzes the overall chaos of the grayscale inside the facial connected domain based on the gradient eigenvalue. The embodiment of the present invention uses the product of the gradient eigenvalue and the grayscale value variance of all pixels in each facial connected domain as the scar grayscale eigenvalue of each facial connected domain. In the facial connected domain, the larger the grayscale value variance of all corresponding pixels is, the more discrete the overall grayscale value distribution is, that is, the more chaotic the corresponding grayscale is as a whole. In another embodiment of the present invention, the product of the numerical entropy of the grayscale value of all pixels in each facial connected domain and the gradient eigenvalue is used as the scar grayscale eigenvalue; the numerical entropy can also characterize the degree of chaos of the corresponding grayscale distribution, and the calculation method of the numerical entropy is a prior art well known to those skilled in the art, and will not be further elaborated here.

[0058] In the embodiment of the present invention, each facial connected area is sequentially used as the first facial connected areas, then The method for obtaining the scar grayscale feature value of a facial connected domain is expressed in the formula as follows:

[0059]

[0060] in, For the Scar grayscale feature value of the facial connected domain; For the The gray value variance of all pixels in the connected domain of the face; For the The number of local edge segments in the connected domain of a face; For the The first The variance of the grayscale gradient angles of all edge pixels on the local edge segment, that is, The first The degree of edge irregularity of a local edge segment; For the The gradient eigenvalues ​​of the connected areas of the face.

[0061] Step S3: According to the grayscale texture distribution in each facial connected domain, each facial connected domain is divided into an inner edge region and an outer edge region; according to the grayscale distribution stability of the inner edge region and the grayscale distribution discreteness of the outer edge region, the scar texture feature value of each facial connected domain is obtained.

[0062] Further analysis is conducted on the unique surface texture features of the real scar region. Although the overall grayscale distribution of the real scar region is relatively chaotic, the grayscale performance of the corresponding area close to the inside of the real scar is usually relatively smooth. The closer to the edge area, the more chaotic the corresponding grayscale distribution; that is, the grayscale distribution of the area close to the edge in the facial connected domain corresponding to the real scar region is relatively chaotic, while the grayscale distribution of the area close to the center is relatively smooth; therefore, in order to analyze the surface texture features of the real scar region, it is first necessary to divide the area close to the center and the area close to the edge in each facial connected domain. The embodiment of the present invention divides each facial connected domain into an inner edge region and an outer edge region according to the grayscale texture distribution in each facial connected domain.

[0063] Preferably, according to the distribution of grayscale texture in each facial connected domain, the method of dividing each facial connected domain into an inner edge region and an outer edge region comprises:

[0064] The convex hull area of ​​each facial connected domain is obtained by the convex hull algorithm; the convex hull area is iteratively reduced with the centroid of the corresponding facial connected domain as the center at a preset reduction ratio, and the iteration stops when the iteratively reduced convex hull area only contains the pixel points of the corresponding facial connected domain, and the convex hull area after the iteration stops is used as the inner edge area of ​​each facial connected domain; the other areas outside the inner edge area in each facial connected domain are used as the outer edge area of ​​each facial connected domain. The overall outline of the convex hull area is similar to that of the facial connected domain, and it can simplify the complex edge structure of the facial connected domain and reduce the complexity of processing and calculation. In the embodiment of the present invention, the preset reduction ratio is set to 0.1, that is, the embodiment of the present invention reduces the distance between all edge points of the convex hull area and the centroid of the corresponding facial connected domain to ninety percent of the distance. For example, before the iterative reduction begins, the distance between the target edge point and the centroid of the facial connected domain is 100, then after the first iterative reduction, the distance is reduced to 90, that is, the target edge point is 10 closer to the centroid of the corresponding facial connected domain; if the convex hull area obtained after the first iterative reduction meets the iterative stop condition, then stop; if not, the distance between the target edge point and the centroid continues to decrease by 10% on the basis of 90, that is, after the second iterative reduction, the distance between the target edge point and the centroid is reduced to 81 and the iterative stop condition is continued to be judged until the iterative stop condition is met; it should be noted that in order to avoid too many iterations resulting in too small an inner edge area, the embodiment of the present invention sets the upper limit of the number of iterations to 5. When the iteration stop condition is still not met after 5 iterations, it is forced to stop and obtain the corresponding inner edge area. In the embodiment of the present invention, the convex hull algorithm is a prior art well known to those skilled in the art, and is not further defined or elaborated herein.

[0065] Furthermore, based on the fact that the grayscale distribution of the area corresponding to the inside of a real scar is usually smoother, and the closer to the edge area, the more chaotic the corresponding grayscale distribution, the scar texture eigenvalue of each facial connected domain is obtained according to the stability of the grayscale distribution in the inner edge area and the discreteness of the grayscale distribution in the outer edge area; that is, the more stable the grayscale distribution in the inner edge area corresponding to each facial connected domain, and the more discrete the grayscale distribution in the outer edge area, the larger the corresponding scar texture eigenvalue, and the more likely it is to be a real scar area.

[0066] Preferably, the method for obtaining scar texture feature values ​​includes:

[0067] The negative correlation mapping value of the variance of the grayscale values ​​of all pixels in the inner edge region of each facial connected domain is used as the inner edge grayscale stability value of each facial connected domain. For the inner edge region of each edge connected domain, the smaller the variance of the grayscale values ​​of all corresponding pixels is, the more stable the grayscale value is as a whole. Therefore, it is necessary to negatively correlate the variance of the grayscale values ​​of all pixels in the inner edge region to obtain the inner edge grayscale stability value that characterizes the stability of the grayscale distribution in the inner edge region. The larger the inner edge grayscale stability value is, the more stable the grayscale distribution in the inner edge region corresponding to the facial connected domain is, and the larger the corresponding scar texture feature value is.

[0068] According to the gray value distribution deviation of all pixels in the outer edge area of ​​each facial connected domain, the outer edge gray deviation value of each facial connected domain is obtained; preferably, the method for obtaining the outer edge gray deviation value includes:

[0069] The mean grayscale value of all pixels in the outer edge area of ​​each facial connected domain is used as the standard outer edge grayscale value of each facial connected domain; in the outer edge area of ​​each facial connected domain, the difference between the grayscale value of each pixel and the standard outer edge grayscale value is used as the reference grayscale deviation of each pixel; the mean of the reference grayscale deviation of all pixels in the outer edge area of ​​each facial connected domain is used as the outer edge grayscale deviation value of each facial connected domain. Since the more discrete the grayscale distribution of the corresponding outer edge area is, the larger the corresponding scar texture feature value is, and the more likely it is a real scar area; therefore, it is necessary to characterize the discreteness of the grayscale distribution of the outer edge area; in the outer edge area, the larger the deviation of the grayscale value of the pixel relative to the mean grayscale value is, the more discrete the grayscale value of the pixel is, so the mean of the reference grayscale deviation of all pixels is calculated, so as to obtain the outer edge grayscale deviation value that characterizes the discreteness of the overall grayscale distribution of the outer edge area; the larger the corresponding outer edge grayscale deviation value is, the more discrete the grayscale distribution of the outer edge area corresponding to the facial connected domain is, and the larger the corresponding scar texture feature value is. Similarly, the grayscale value variance of all pixels in the outer edge region corresponding to the facial connected domain may be used as the outer edge grayscale deviation value for subsequent analysis.

[0070] Further, the scar texture characteristic value of each facial connected domain is obtained according to the inner edge grayscale stability value and the outer edge grayscale deviation value; the inner edge grayscale stability value and the outer edge grayscale deviation value are both positively correlated with the scar texture characteristic value. Preferably, the method of obtaining the scar texture characteristic value of each facial connected domain according to the inner edge grayscale stability value and the outer edge grayscale deviation value comprises:

[0071] Since the scar texture feature value is larger when the grayscale stability value of the inner edge of the facial connected domain is larger and the corresponding outer edge grayscale deviation value is larger, the scar texture feature value is larger. Therefore, the embodiment of the present invention uses the product of the inner edge grayscale stability value and the outer edge grayscale deviation value as the scar texture feature value of each facial connected domain.

[0072] In the embodiment of the present invention, The method for obtaining the scar grayscale feature value of a facial connected domain is expressed in the formula as follows:

[0073]

[0074] in, For the Scar texture feature values ​​of the connected domain of the face; For the The variance of the grayscale values ​​of all pixels in the inner edge area of ​​the facial connected domain; For the The number of pixels in the outer edge area of ​​the facial connected domain; For the In the outer edge region of the facial connected domain, The gray value of each pixel; For the The mean gray value of all pixels in the outer edge area of ​​the facial connected domain; For the In the outer edge region of the facial connected domain, The reference grayscale deviation of each pixel; For the The grayscale deviation value of the outer edge of the facial connected domain; For the The grayscale stability value of the inner edge of the facial connected area.

[0075] Step S4: Obtain scar probability of each facial connected domain according to scar grayscale eigenvalues ​​and scar texture eigenvalues; filter out final scar regions in all facial connected domains according to scar probability; and manage skin plastic surgery data according to the final scar regions.

[0076] Since both scar grayscale eigenvalues ​​and scar texture eigenvalues ​​can characterize the possibility that a facial connected domain is a real scar area, the embodiment of the present invention further combines scar grayscale eigenvalues ​​and scar texture eigenvalues ​​to jointly characterize the scar possibility, and obtains the scar possibility of each facial connected domain based on the scar grayscale eigenvalues ​​and scar texture eigenvalues.

[0077] Preferably, the method for obtaining scar possibility includes:

[0078] Since the larger the scar grayscale eigenvalue and the larger the scar texture eigenvalue, the greater the possibility that the corresponding facial connected domain is a real scar area, the embodiment of the present invention uses the normalized value of the product of the scar grayscale eigenvalue and the scar texture eigenvalue as the scar possibility of each facial connected domain; the implementer may also use the normalized value of the sum of the scar grayscale eigenvalue and the scar texture eigenvalue as the scar possibility of each facial connected domain according to the specific implementation environment; and in the embodiment of the present invention, all normalization methods use linear normalization, and the implementer may adjust it according to the specific implementation environment, which will not be further elaborated here.

[0079] The greater the scar probability of the facial connected domain, the more likely it is a real scar region. Therefore, the embodiment of the present invention further screens out the final scar region in all facial connected domains according to the scar probability. Preferably, the method for obtaining the final scar region includes:

[0080] Since the greater the scar probability of the facial connected domain is, the more likely it is to be a real scar area, the facial connected domain with a scar probability greater than the preset scar threshold is taken as the final scar area. In the embodiment of the present invention, since the value range of the scar probability is 0 to 1, the preset scar threshold is set to 0.8, and the implementer can adjust it according to the specific implementation environment, but it is necessary to ensure that the preset scar value range is within 0 to 1.

[0081] After the final scar area is obtained, the skin plastic surgery data management is finally performed according to the final scar area. Since the purpose of obtaining the scar area in the facial skin image in the embodiment of the present invention is for skin plastic surgery teaching, after the final scar area is obtained, the facial skin image marked with the final scar area or the final scar area segmented separately is further stored in the facial skin scar database for subsequent teaching, which will not be further described here.

[0082] In summary, the present invention first segments a facial connected domain according to the grayscale distribution of a facial skin grayscale image, and then obtains a scar grayscale eigenvalue according to the characteristics of chaotic grayscale distribution in the facial connected domain and irregular edge details; further obtains a scar texture eigenvalue according to the characteristics that the grayscale of the scar region near the center is uniform and the grayscale of the region near the edge is chaotic; combines the scar grayscale eigenvalue and the scar texture eigenvalue to obtain a corresponding scar possibility; thereby screening out a more accurate final scar region according to the scar possibility, so that the scar region detection effect of skin plastic surgery data based on the obtained final scar region is better.

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

[0084] 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 scar area detection method for skin plastic surgery data, characterized in that: The method comprises: Acquire a facial skin grayscale image of the user; perform image segmentation according to the grayscale distribution of the facial skin grayscale image to obtain a facial connected domain; According to the disorder of grayscale distribution in each facial connected domain and the fluctuation of gradient direction distribution of edge pixels, the scar grayscale characteristic value of each facial connected domain is obtained; According to the distribution of grayscale texture in each facial connected domain, each facial connected domain is divided into an inner edge region and an outer edge region; according to the stability of the grayscale distribution in the inner edge region and the discreteness of the grayscale distribution in the outer edge region, a scar texture feature value of each facial connected domain is obtained; Obtaining scar probability of each facial connected domain according to the scar grayscale characteristic value and the scar texture characteristic value; screening out final scar regions in all facial connected domains according to the scar probability; and performing skin plastic surgery data management according to the final scar regions; The method for obtaining the scar grayscale characteristic value comprises: Obtain the minimum circumscribed rectangle of each facial connected domain; use the line between each vertex of the minimum circumscribed rectangle and the centroid of the corresponding facial connected domain as a segmentation line; use the intersection point between the segmentation line and the edge of the corresponding facial connected domain as the segmentation edge point of each facial connected domain; divide the edge of each facial connected domain into at least two local edge segments with all the segmentation edge points of each facial connected domain as intervals; According to the chaotic distribution of the grayscale gradient direction of the edge pixels on each local edge segment corresponding to each facial connected domain, the gradient feature value of each facial connected domain is obtained; The product of the gradient eigenvalue and the grayscale value variance of all pixels in each facial connected domain is used as the scar grayscale eigenvalue of each facial connected domain; The method for obtaining the gradient characteristic value comprises: In each facial connected domain, the variance of the grayscale gradient angles of all edge pixels on each local edge segment is used as the edge irregularity degree of each local edge segment; The average value of the edge irregularity of all local edge segments in each facial connected domain is used as the gradient feature value of each facial connected domain; The method for obtaining the scar texture feature value comprises: The negative correlation mapping value of the variance of the grayscale values ​​of all pixels in the inner edge area of ​​each facial connected domain is used as the inner edge grayscale stable value of each facial connected domain; According to the gray value distribution deviation of all pixels in the outer edge area of ​​each facial connected domain, the outer edge gray deviation value of each facial connected domain is obtained; According to the inner edge grayscale stability value and the outer edge grayscale deviation value, a scar texture characteristic value of each facial connected domain is obtained; the inner edge grayscale stability value and the outer edge grayscale deviation value are both positively correlated with the scar texture characteristic value; The method for obtaining the outer edge grayscale deviation value includes: The mean grayscale value of all pixels in the outer edge area of ​​each facial connected domain is used as the standard outer edge grayscale value of each facial connected domain; in the outer edge area of ​​each facial connected domain, the difference between the grayscale value of each pixel and the standard outer edge grayscale value is used as the reference grayscale deviation of each pixel; the mean of the reference grayscale deviation of all pixels in the outer edge area of ​​each facial connected domain is used as the outer edge grayscale deviation value of each facial connected domain.

2. The scar area detection method of skin plastic surgery data according to claim 1, characterized in that: The method of dividing each facial connected domain into an inner edge region and an outer edge region according to the distribution of grayscale texture in each facial connected domain comprises: The convex hull area of ​​each facial connected domain is obtained by a convex hull algorithm; the convex hull area is iteratively reduced at a preset reduction ratio with the centroid of the corresponding facial connected domain as the center, and the iteration is stopped when the convex hull area after iterative reduction contains only the pixel points of the corresponding facial connected domain, and the convex hull area after the iteration is stopped is used as the inner edge area of ​​each facial connected domain; other areas outside the inner edge area in each facial connected domain are used as the outer edge area of ​​each facial connected domain.

3. The scar area detection method of skin plastic surgery data according to claim 1, characterized in that: The method for obtaining the scar texture feature value of each facial connected domain according to the inner edge grayscale stability value and the outer edge grayscale deviation value comprises: The product of the inner edge grayscale stability value and the outer edge grayscale deviation value is used as the scar texture feature value of each facial connected domain.

4. The scar area detection method of skin plastic surgery data according to claim 1, characterized in that: The method for obtaining the scar possibility includes: The normalized value of the product of the scar grayscale eigenvalue and the scar texture eigenvalue is used as the scar possibility of each facial connected domain.

5. The scar area detection method of skin plastic surgery data according to claim 1, characterized in that: The method for obtaining the final scar area comprises: The facial connected domain with scar probability greater than the preset scar threshold is taken as the final scar area.

6. The scar area detection method of skin plastic surgery data according to claim 1, characterized in that: The method for acquiring the facial connected domain comprises: After the facial skin grayscale image is segmented by Otsu's threshold method, the closed connected domain is used as the facial connected domain.

Citation Information

Patent Citations

  • Method for segmenting traditional Chinese medicine tongue images under open environment

    CN107194937A

  • Visual inspection system for polishing effect of aluminum alloy surface

    CN117173189A

  • Wallboard production quality detection method based on image processing

    CN117853493A

  • Intelligent heart and cerebral vessel imaging method and system based on image recognition

    CN118314235A

  • Image processing method and device

    WO2022141445A1