Image-assisted grading detection method and system for skin acne, and storage medium
By analyzing the connectivity domain and background influence in facial images, screening the target connectivity domain, combining clustering algorithms and chain code value analysis, the problems of traditional acne detection error and edge deviation are solved, and the accurate grading and detection of acne areas are achieved.
Patent Information
- Application Number
- CN202411525319.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional acne detection methods rely on clinical observations, have errors and cannot accurately identify skin conditions. The adaptive threshold segmentation method has discontinuity of grayscale values of pixel points at the edges, resulting in a deviation in threshold calculation, reducing the accuracy of skin acne grading detection.
By obtaining the suspected defect connectivity domain and background area of the patient's facial image, the degree of influence of each suspected defect connectivity domain is calculated, the target connectivity domain is screened, the similarity degree and clustering algorithm are used to divide the acne area, and the acne severity is analyzed in combination with the chain code value. Achieve accurate grading of facial acne.
It improves the accuracy and efficiency of acne detection, ensures the integrity and grading of acne areas, reduces errors, and enhances the ability to gradle skin conditions.
Smart Images

Figure CN119205720A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an image-assisted grading detection method, storage medium and system for skin acne. Background Art
[0002] Acne is a chronic inflammatory disease of the sebaceous gland unit caused by androgen-induced increased secretion of sebaceous glands, excessive keratinization of hair follicles, local inflammation, and Propionibacterium acnes on the face and neck. It can develop from mild acne to severe cysts and nodules, and the severity varies, and the impact on the patient's appearance, psychology, and quality of life is also different. Through grading, the severity of acne can be determined, so that corresponding treatment measures can be taken. The traditional acne detection method is clinical observation, which mainly relies on the clinical experience of the attending physician. During the observation process, the acne area is only observed by the naked eye or with the help of magnifying instruments, so there will be errors in the conclusions obtained, which is not conducive to reducing the workload of doctors and cannot accurately identify skin conditions. The existing technology grades the severity of skin acne by an adaptive threshold segmentation method, by dividing the image into multiple small areas and calculating the threshold for each small area separately. However, at the edge of each area, due to the discontinuity of the grayscale value of the pixel point, the threshold calculation may be biased, causing the acne at the edge to be missed. This reduces the accuracy of graded detection of skin acne. Summary of the invention
[0003] The present invention provides an image-assisted graded detection method, storage medium and system for skin acne to solve the existing problems.
[0004] The image-assisted graded detection method, storage medium and system of skin acne of the present invention adopt the following technical solutions:
[0005] An embodiment of the present invention provides an image-assisted grading detection method for skin acne, the method comprising the following steps:
[0006] Acquire several suspected defect connected domains and background regions of the patient's facial image;
[0007] According to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain and the number of pixels in the background area, the influence of the background area on each suspected defect connected domain is obtained; according to the influence of the background area on each suspected defect connected domain, several target connected domains are screened out from all suspected defect connected domains;
[0008] According to the number of pixels in each target connected domain, the gray value of each pixel and the distance between the centroids of any two target connected domains, the similarity between any two target connected domains is obtained; according to the similarity between any two target connected domains, several acne areas are obtained;
[0009] According to the number of pixels in each acne area and the chain code value of each pixel on the edge, the severity of each acne area is obtained; according to the severity of each acne area, the facial acne classification of the patient is obtained.
[0010] Furthermore, the method of obtaining the influence of the background area on each suspected defect connected domain according to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain, and the number of pixels in the background area includes the following specific steps:
[0011] The area of each suspected defect connected domain is counted, and among the areas of all suspected defect connected domains, the ratio of the difference between the area of the i-th suspected defect connected domain and the minimum area to the difference between the maximum area and the minimum area is recorded as the skewness of the i-th suspected defect connected domain;
[0012] According to the gray value of each pixel in each suspected defect connected domain, the skewness of each suspected defect connected domain and the number of pixels in the background area, the influence of the background area on each suspected defect connected domain is obtained.
[0013] Furthermore, according to the gray value of each pixel in each suspected defect connected domain, the skewness of each suspected defect connected domain and the number of pixels in the background area, the specific calculation formula for obtaining the influence of the background area on each suspected defect connected domain is:
[0014]
[0015] Among them, A i Y is the influence of the background area on the i-th suspected defect connected domain, i represents the grayscale mean of all pixels in the connected domain of the i-th suspected defect, B represents the grayscale mean of all pixels in the background area, Represents the grayscale variance of all pixels in the background area. represents the grayscale variance of the i-th suspected defect connected domain, P i is the skewness of the connected domain of the i-th suspected defect, | | represents the absolute value function, and norm[] represents the linear normalization function.
[0016] Furthermore, the method of selecting a plurality of target connected domains from all suspected defective connected domains according to the influence of the background area on each suspected defective connected domain includes the following specific steps:
[0017] Among all the suspected defect connected domains, the suspected defect connected domains whose influence degree of the background area on each suspected defect connected domain is greater than or equal to a preset first judgment threshold are recorded as target connected domains.
[0018] Furthermore, the specific calculation formula for obtaining the similarity between any two target connected domains according to the number of pixels in each target connected domain, the gray value of each pixel, and the distance between the centroids of any two target connected domains is:
[0019] FM m,n =exp{-[(DB m -DB n )×ZD m,n ×(Y m -Y n )×A m,n ]}
[0020] Among them, FM m,n Indicates the similarity between the mth target connected domain and the nth target connected domain; DB m Represents the difference between the grayscale mean of all pixels in the mth target connected domain and the background area; DB n Represents the difference between the grayscale mean of all pixels in the nth target connected region and the background area, ZD m,n represents the distance between the centroid of the mth target connected domain and the nth target connected domain, Y m represents the grayscale mean of all pixels in the mth target connected domain, Y n A represents the grayscale mean of all pixels in the nth target connected domain. m,n It represents the absolute value of the difference between the influence of the background area on the mth target connected domain and the influence of the nth target connected domain. exp{} is an exponential function with a natural constant as the base.
[0021] Furthermore, the method of obtaining a plurality of acne regions according to the similarity between any two target connected domains includes the following specific steps:
[0022] The inverse of the similarity between any two target connected domains is used as the clustering distance between any two target connected domains. The K-means clustering algorithm is used to perform clustering operations on all target connected domains to obtain several final clusters.
[0023] All target connected domains in each cluster are combined into an acne region to obtain several acne regions.
[0024] Furthermore, the severity of each acne area is obtained according to the number of pixels in each acne area and the chain code value of each pixel on the edge, and the specific steps include the following:
[0025] The 8-directional chain code is used to obtain the chain code values of all pixels on the edge of each acne area, and the minimum circumscribed rectangle of each acne area is obtained;
[0026] Calculate the absolute value of the difference between the number of pixels in the zth acne area and the number of pixels in the minimum circumscribed rectangle of the zth acne area, and multiply the reciprocal of the absolute value by the information entropy of the chain code values of all pixels on the edge of the zth acne area as the regularity of the edge of the zth acne area;
[0027] The normalized value of the product of the reciprocal of the regularity of the edge of the zth acne area, the grayscale mean of all pixels in the zth acne area, and the number of pixels in the zth acne area is recorded as the severity of the zth acne area.
[0028] Furthermore, the step of obtaining the facial acne classification of the patient according to the severity of each acne area includes the following specific steps:
[0029] The acne area with the greatest severity among all acne areas was recorded as the major acne area;
[0030] When the severity of the main acne area is less than or equal to T2, the patient's acne is recorded as mild; when the severity of the main acne area is less than or equal to T3 and greater than T2, the patient's acne is recorded as moderate; when the severity of the main acne area is greater than T3, the patient's acne is recorded as severe, wherein T2 is the preset second judgment threshold, and T3 is the preset third judgment threshold.
[0031] An image-assisted grading detection system for skin acne adopts the image-assisted grading detection method for skin acne, and the system includes the following modules:
[0032] A data acquisition module, used to obtain several suspected defect connected domains and background areas of the patient's facial image;
[0033] The target connected domain acquisition module is used to obtain the influence of the background area on each suspected defect connected domain according to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain and the number of pixels in the background area; according to the influence of the background area on each suspected defect connected domain, select a number of target connected domains from all suspected defect connected domains;
[0034] The acne region acquisition module is used to obtain the similarity between any two target connected domains according to the number of pixels in each target connected domain, the gray value of each pixel and the distance between the centroids of any two target connected domains; and obtain several acne regions according to the similarity between any two target connected domains;
[0035] The grading result acquisition module is used to obtain the severity of each acne area according to the number of pixels in each acne area and the chain code value of each pixel on the edge; according to the severity of each acne area, the patient's facial acne grading is obtained.
[0036] A storage medium for image-assisted grading detection of skin acne comprises a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the image-assisted grading detection method for skin acne are implemented.
[0037] The beneficial effects of the technical solution of the present invention are:
[0038] In the embodiment of the present invention, several suspected defect connected domains and background areas of the patient's facial image are obtained; according to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain and the number of pixels in the background area, several target connected domains are screened out from all suspected defect connected domains; according to the color difference between acne and normal skin, the accuracy of acne area detection is guaranteed, and the detection efficiency and the accuracy of graded detection of skin acne are improved. According to the number of pixels in each target connected domain, the gray value of each pixel and the distance between the centroids of any two target connected domains, several acne areas are obtained; according to the shape of the acne area and the degree of edge regularity, the accuracy of subsequent acne area division is guaranteed, and the accuracy of graded detection of skin acne is further improved. According to the number of pixels in each acne area and the chain code value of each pixel on the edge, the acne grade of the patient's face is obtained. So far, the present invention analyzes the size of each acne area, the degree of edge regularity, and the gray difference with normal skin, and combines the clustering algorithm to grade the skin condition, thereby improving the accuracy of graded detection of skin acne. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be 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 1A flowchart of the steps of an image-assisted grading detection method for skin acne according to the present invention;
[0041] Figure 2 This is a module flow chart of an image-assisted grading detection system for skin acne according to the present invention;
[0042] Figure 3 Schematic diagram of acne of different degrees in this embodiment. DETAILED DESCRIPTION
[0043] 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 image-assisted grading detection method, storage medium and system for skin acne proposed by the present invention, its specific implementation, structure, features and effects, 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.
[0044] 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.
[0045] The specific scheme of the image-assisted grading detection method, storage medium and system for skin acne provided by the present invention is described in detail below with reference to the accompanying drawings.
[0046] See also Figure 1 , which shows a flowchart of a method for image-assisted grading detection of skin acne provided by an embodiment of the present invention, the method comprising the following steps:
[0047] Step S001: Acquire several suspected defect connected domains and background areas of the patient's facial image.
[0048] Use a camera to acquire an image of the patient's face.
[0049] It should be noted that the acquired facial image of the patient is grayed and denoised using wavelet transform, wherein graying and wavelet transform are both well-known technologies, and the specific methods are not introduced here.
[0050] The severity of acne varies greatly from mild pimples to severe nodules and cysts. Figure 3 As shown, Figure 3The following is a schematic diagram of acne of different degrees. It can be seen from the figure that when the acne level is mild level I, the difference with the background is very small, and it is easily disturbed by the normal skin texture during detection; when the acne level is moderate level II, the color gradually deepens and is significantly different from the background area; when the acne level is moderate level III, the area of each acne begins to increase, and the redness and swelling are obvious; when the acne level is severe level IV, the acne is not only obviously red and swollen, but also the number increases. As the acne level increases, the grayscale difference between it and the background area becomes more and more obvious. At the same time, the acne area becomes larger and the edges become more irregular. Through the classification of levels, doctors can be assisted in judging the severity of the patient's acne condition, so as to formulate targeted treatment plans.
[0051] The canny edge detection algorithm and the region growing algorithm are used to obtain several suspected defect connected domains in the patient's facial image, and the areas in the patient's facial image that are not suspected defect connected domains are recorded as background areas.
[0052] It should be noted that after the canny edge detection algorithm is used to process the patient's facial image and obtain a number of edge lines, the region growing algorithm can be used to fill the blank areas between the edge lines to form a complete connected domain. Among them, the canny edge detection algorithm and the region growing algorithm are both well-known technologies, and the specific methods are not introduced here.
[0053] Step S002: According to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain and the number of pixels in the background area, the influence of the background area on each suspected defect connected domain is obtained; according to the influence of the background area on each suspected defect connected domain, a number of target connected domains are screened out from all suspected defect connected domains.
[0054] In the process of obtaining the acne area, it may be affected by the background area of normal skin texture or normal pigmentation (such as freckles), and the background area has different degrees of influence on acne at different stages of development. For early acne, it appears as a slight bulge on the image, without obvious redness or edema, and is similar in color to the surrounding normal skin. The grayscale difference between the two in the image is small, which interferes with the detection of acne. At this time, the background area has a greater impact on the detection of early acne; as acne further develops, the acne area will become larger and larger, but the background area will change less, so the morphological differences and grayscale differences between acne and background areas will become more and more obvious as acne develops.
[0055] In addition, the areas of acne at the same development stage are similar in size. According to the number and area of acne areas at each development stage, the degree of deviation between the area of each acne area and the acne area with the largest number can be obtained. The greater the deviation and the larger the area of the acne area, the more likely the acne area is the most serious acne at the development stage on the patient's face. At this time, the background area has a smaller impact on the acne area.
[0056] The area of each suspected defect connected domain is counted. Among the areas of all suspected defect connected domains, the ratio of the difference between the area of the ith suspected defect connected domain and the minimum area to the difference between the maximum area and the minimum area is recorded as the skewness of the ith suspected defect connected domain.
[0057] It should be noted that: the larger the skewness, the more the suspected defect connected domain is biased to the right, that is, the area of the suspected defect connected domain is larger than the area of all connected domains, the more serious the corresponding development level is, and the smaller the influence of the background area on the suspected defect connected domain is; the smaller the skewness, the more the suspected defect connected domain is biased to the left, that is, the area of the suspected defect connected domain is smaller than the area of all connected domains, the lighter the corresponding development level is, and the greater the influence of the background area on the suspected defect connected domain is. Among them, the area of each suspected defect connected domain is equal to the number of pixels in each suspected defect connected domain.
[0058] Taking the i-th suspected defect connected domain as an example, the calculation formula for the influence of the background area on the i-th suspected defect connected domain is:
[0059]
[0060] Among them, A i Y is the influence of the background area on the i-th suspected defect connected domain, i represents the grayscale mean of all pixels in the connected domain of the i-th suspected defect, B represents the grayscale mean of all pixels in the background area, Represents the grayscale variance of all pixels in the background area. represents the grayscale variance of the i-th suspected defect connected domain, P i is the skewness of the connected domain of the i-th suspected defect, | | represents the absolute value function, and norm[ ] represents the linear normalization function.
[0061] What needs to be explained is: |BY i | represents the grayscale difference between the ith suspected defect connected domain and the background area. The greater the grayscale difference, the greater the possibility that the suspected defect connected domain is acne. It represents the difference between the grayscale difference in the background area and the grayscale difference in each suspected defect connected domain. Under normal circumstances, the grayscale difference in the background area is relatively small, so The larger it is, the greater the grayscale difference in the suspected defect connected domain is, and the greater the influence of the background area on the suspected defect connected domain.
[0062] According to the above method, the influence degree of each suspected defect connected domain can be obtained.
[0063] The natural texture of the skin, especially the pores on oily or mixed skin, may appear visually as small circular or oval dark areas, similar to the early morphology of acne. These textures are easily mistaken for the edges of acne in edge detection, so it is necessary to exclude these normal textures from the suspected areas according to the influence of the background area on each suspected connected domain, so as to obtain the acne area.
[0064] A first judgment threshold is preset, and among all suspected defect connected domains, the suspected defect connected domains whose influence degree of the background area on each suspected defect connected domain is greater than or equal to the preset first judgment threshold are recorded as target connected domains.
[0065] It should be noted that: in this embodiment, the first judgment threshold is preset to 0.7, and this is taken as an example for description.
[0066] Step S003: according to the number of pixels in each target connected domain, the gray value of each pixel and the distance between the centroids of any two target connected domains, the similarity between any two target connected domains is obtained; according to the similarity between any two target connected domains, a number of acne areas are obtained.
[0067] The initial acne lesion may be caused by the blockage of hair follicles and sebaceous glands, which triggers a local inflammatory response. If the inflammation is not controlled promptly and effectively, it can spread in the surrounding skin, leading to the formation of new acne lesions. Therefore, the presence of an acne lesion may cause the surrounding hair follicles and sebaceous glands to be affected, thereby gradually expanding the acne area. The expansion of acne lesions is often accompanied by the appearance of various skin lesion forms, such as comedones, papules, pustules, nodules, and cysts. These different types of skin lesions will present different grayscale values in the patient's facial image, showing a transition state, that is, the closer the distance between different types of skin lesions in the same acne area, the smaller the color difference, and the farther the distance, the greater the color difference. Therefore, in the process of obtaining each suspected defect connected domain, the same acne area may be segmented into different regions. Therefore, in order to ensure the integrity of the acne area, it is also necessary to determine whether a merge operation is required based on the similarity between any two target connected domains.
[0068] Taking the mth target connected domain and the nth target connected domain as an example, the calculation formula for the similarity between the mth target connected domain and the nth target connected domain is:
[0069] FM m,n=exp{-[(DB m -DB n )×ZD m,n (Y m -Y n )×A m,n ]}
[0070] Among them, FM m,n Indicates the similarity between the mth target connected domain and the nth target connected domain; DB m Represents the difference between the grayscale mean of all pixels in the mth target connected domain and the background area; DB n Represents the difference between the grayscale mean of all pixels in the nth target connected region and the background area, ZD m,n represents the distance between the centroid of the mth target connected domain and the nth target connected domain, Y m represents the grayscale mean of all pixels in the mth target connected domain, Y n A represents the grayscale mean of all pixels in the nth target connected domain. m,n Represents the absolute value of the difference between the influence of the background area on the mth target connected domain and the influence of the nth target connected domain. exp{} is an exponential function with a natural constant as the base. This embodiment uses exp{-} to present the inverse proportional relationship and normalization processing. The implementer can set the inverse proportional function and normalization function according to the actual situation.
[0071] According to the above method, the similarity between any two target connected domains can be obtained.
[0072] The greater the similarity between any two target connected domains, the greater the possibility that they belong to the same acne area.
[0073] The inverse of the similarity between any two target connected domains is taken as the clustering distance between any two target connected domains. The K-means clustering algorithm is used to perform clustering operations on all target connected domains to obtain several final clusters.
[0074] It should be noted that the number of clusters when performing clustering operations on all target connected domains is obtained using the elbow method. Both the K-means clustering algorithm and the elbow method are well-known technologies, and the specific methods are not introduced here.
[0075] All target connected domains in each cluster are combined into an acne region to obtain several acne regions.
[0076] Step S004: Obtain the severity of each acne area according to the number of pixels in each acne area and the chain code value of each pixel on the edge; obtain the acne grade of the patient's face according to the severity of each acne area.
[0077] As time goes by, the acne area will become larger, the skin will become more red and swollen, and the shape will become more irregular. The smaller the edge regularity, the more severe the acne is, and the larger the edge regularity, the less severe the acne is. However, judging only by the edge shape is not accurate enough. It is also necessary to analyze the area of each acne. The more severe the acne is, the more obvious the skin redness and swelling will be, and the greater the severity. Therefore, the severity of acne is calculated based on the edge regularity and area of each acne area.
[0078] The 8-directional chain code is used to obtain the chain code values of all pixels on the edge of each acne area, and the minimum circumscribed rectangle of each acne area is obtained.
[0079] It should be noted that the 8-way chain code is a well-known technology and the specific method will not be introduced here.
[0080] Taking the zth acne area as an example, the calculation formula for the regularity of the edge of the zth acne area is:
[0081]
[0082] Among them, GZ z represents the regularity of the edge of the z-th acne area, H z The information entropy of the chain code values of all pixels on the edge of the z-th acne area, M z represents the number of pixels in the zth acne area, M' z represents the number of pixels in the minimum bounding rectangle of the z-th acne area, and || represents the absolute value function.
[0083] What needs to be explained is: H z The information entropy of the chain code values of all pixels on the edge of the z-th acne area is represented. The larger the entropy is, the more evenly the edge of the z-th acne area is distributed in all directions, and the greater the regularity of the edge of the z-th acne area is.
[0084] In the above manner, the regularity of the edge of each acne area can be obtained.
[0085] Taking the zth acne area as an example, the calculation formula for the severity of the zth acne area is:
[0086]
[0087] Among them, TZ z Indicates the severity of the zth acne area, GZ z Indicates the regularity of the edge of the zth acne area, M z represents the number of pixels in the zth acne area, Y zrepresents the grayscale mean of all pixels in the zth acne area, and norm() represents the linear normalization function.
[0088] In the above manner, the severity of each acne area can be obtained.
[0089] The most severe acne area among all acne areas was recorded as the main acne area.
[0090] When the severity of the main acne area is less than or equal to T2, the patient's acne is recorded as mild, when the severity of the main acne area is less than or equal to T3 and greater than T2, the patient's acne is recorded as moderate, and when the severity of the main acne area is greater than T3, the patient's acne is recorded as severe.
[0091] It should be noted that the doctor can formulate a suitable treatment plan according to the patient's facial acne classification. In this embodiment, the second judgment threshold T2 is preset to 0.3, and the third judgment threshold T3 is preset to 0.8, which is described as an example. In this embodiment, when the denominator in the formula is 0, the denominator is set to 1, and this example is used for description to ensure that the formula is valid.
[0092] Second, see Figure 2 , which shows an image-assisted grading detection system for skin acne, the system includes the following modules:
[0093] A data acquisition module, used to obtain several suspected defect connected domains and background areas of the patient's facial image;
[0094] The target connected domain acquisition module is used to obtain the influence of the background area on each suspected defect connected domain according to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain and the number of pixels in the background area; according to the influence of the background area on each suspected defect connected domain, select a number of target connected domains from all suspected defect connected domains;
[0095] The acne region acquisition module is used to obtain the similarity between any two target connected domains according to the number of pixels in each target connected domain, the gray value of each pixel and the distance between the centroids of any two target connected domains; and obtain several acne regions according to the similarity between any two target connected domains;
[0096] The grading result acquisition module is used to obtain the severity of each acne area according to the number of pixels in each acne area and the chain code value of each pixel on the edge; according to the severity of each acne area, the patient's facial acne grading is obtained.
[0097] In a third aspect, the present invention further proposes a storage medium for image-assisted graded detection of skin acne, the storage medium comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method described in steps S001 to S004 are implemented.
[0098] So far, the present invention is completed.
[0099] In summary, in an embodiment of the present invention, several suspected defect connected domains and background areas of a patient's facial image are obtained; according to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain, and the number of pixels in the background area, the degree of influence of the background area on each suspected defect connected domain is obtained; according to the degree of influence of the background area on each suspected defect connected domain, several target connected domains are screened out from all suspected defect connected domains; according to the number of pixels in each target connected domain, the gray value of each pixel, and the distance between the centroids of any two target connected domains, the degree of similarity between any two target connected domains is obtained; according to the degree of similarity between any two target connected domains, several acne areas are obtained; according to the number of pixels in each acne area and the chain code value of each pixel on the edge, the severity of each acne area is obtained; according to the severity of each acne area, the patient's facial acne grading situation is obtained. The present invention analyzes the size of each acne area, the regularity of the edge, and the grayscale difference with normal skin, and combines the clustering algorithm to grade the skin condition, thereby improving the accuracy of graded detection of skin acne.
[0100] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An image-assisted grading detection method for skin acne, characterized in that: The method comprises the following steps: Acquire several suspected defect connected domains and background regions of the patient's facial image; According to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain and the number of pixels in the background area, the influence of the background area on each suspected defect connected domain is obtained; according to the influence of the background area on each suspected defect connected domain, several target connected domains are screened out from all suspected defect connected domains; According to the number of pixels in each target connected domain, the gray value of each pixel and the distance between the centroids of any two target connected domains, the similarity between any two target connected domains is obtained; according to the similarity between any two target connected domains, several acne areas are obtained; According to the number of pixels in each acne area and the chain code value of each pixel on the edge, the severity of each acne area is obtained; according to the severity of each acne area, the facial acne classification of the patient is obtained.
2. The image-assisted grading detection method for skin acne according to claim 1, characterized in that: The step of obtaining the influence of the background area on each suspected defect connected domain according to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain, and the number of pixels in the background area includes the following specific steps: The area of each suspected defect connected domain is counted, and among the areas of all suspected defect connected domains, the ratio of the difference between the area of the i-th suspected defect connected domain and the minimum area to the difference between the maximum area and the minimum area is recorded as the skewness of the i-th suspected defect connected domain; According to the gray value of each pixel in each suspected defect connected domain, the skewness of each suspected defect connected domain and the number of pixels in the background area, the influence of the background area on each suspected defect connected domain is obtained.
3. The image-assisted grading detection method for skin acne according to claim 2, characterized in that: The specific calculation formula for obtaining the influence of the background area on each suspected defect connected domain according to the gray value of each pixel in each suspected defect connected domain, the skewness of each suspected defect connected domain and the number of pixels in the background area is: Among them, A i Y is the influence of the background area on the i-th suspected defect connected domain, i represents the grayscale mean of all pixels in the connected domain of the i-th suspected defect, B represents the grayscale mean of all pixels in the background area, Represents the grayscale variance of all pixels in the background area. represents the grayscale variance of the i-th suspected defect connected domain, P i is the skewness of the connected domain of the i-th suspected defect, || represents the absolute value function, and norm[ ] represents the linear normalization function.
4. The image-assisted grading detection method for skin acne according to claim 1, characterized in that: The specific steps of selecting a plurality of target connected domains from all suspected defect connected domains according to the influence of the background area on each suspected defect connected domain are as follows: Among all the suspected defect connected domains, the suspected defect connected domains whose influence degree of the background area on each suspected defect connected domain is greater than or equal to a preset first judgment threshold are recorded as target connected domains.
5. The image-assisted grading detection method for skin acne according to claim 1, characterized in that: The specific calculation formula for obtaining the similarity between any two target connected domains according to the number of pixels in each target connected domain, the gray value of each pixel, and the distance between the centroids of any two target connected domains is: FM m,n =exp{-[(DB m -DB n )×ZD m,n ×(Y m -Y n )×A m,n ]} Among them, FM m,n Indicates the similarity between the mth target connected domain and the nth target connected domain; DB m Represents the difference between the grayscale mean of all pixels in the mth target connected domain and the background area; DB n Represents the difference between the grayscale mean of all pixels in the nth target connected region and the background area, ZD m,n represents the distance between the centroid of the mth target connected domain and the nth target connected domain, Y m represents the grayscale mean of all pixels in the mth target connected domain, Y n A represents the grayscale mean of all pixels in the nth target connected domain. m,n It represents the absolute value of the difference between the influence of the background area on the mth target connected domain and the influence of the nth target connected domain. exp{} is an exponential function with a natural constant as the base.
6. The image-assisted grading detection method for skin acne according to claim 1, characterized in that: The method of obtaining a plurality of acne regions according to the similarity between any two target connected domains includes the following specific steps: The inverse of the similarity between any two target connected domains is used as the clustering distance between any two target connected domains. The K-means clustering algorithm is used to perform clustering operations on all target connected domains to obtain several final clusters. All target connected domains in each cluster are combined into an acne region to obtain several acne regions.
7. The image-assisted grading detection method for skin acne according to claim 1, characterized in that: The specific steps of obtaining the severity of each acne area according to the number of pixels in each acne area and the chain code value of each pixel on the edge are as follows: The 8-directional chain code is used to obtain the chain code values of all pixels on the edge of each acne area, and the minimum circumscribed rectangle of each acne area is obtained; Calculate the absolute value of the difference between the number of pixels in the zth acne area and the number of pixels in the minimum circumscribed rectangle of the zth acne area, and multiply the reciprocal of the absolute value by the information entropy of the chain code values of all pixels on the edge of the zth acne area as the regularity of the edge of the zth acne area; The normalized value of the product of the reciprocal of the regularity of the edge of the zth acne area, the grayscale mean of all pixels in the zth acne area, and the number of pixels in the zth acne area is recorded as the severity of the zth acne area.
8. The image-assisted grading detection method for skin acne according to claim 1, characterized in that: The step of obtaining the facial acne classification of the patient according to the severity of each acne area includes the following specific steps: The acne area with the greatest severity among all acne areas was recorded as the major acne area; When the severity of the main acne area is less than or equal to T2, the patient's acne is recorded as mild; when the severity of the main acne area is less than or equal to T3 and greater than T2, the patient's acne is recorded as moderate; when the severity of the main acne area is greater than T3, the patient's acne is recorded as severe, wherein T2 is the preset second judgment threshold, and T3 is the preset third judgment threshold.
9. An image-assisted grading detection system for skin acne, using an image-assisted grading detection method for skin acne as claimed in any one of claims 1 to 8, characterized in that: The system includes the following modules: A data acquisition module, used to obtain several suspected defect connected domains and background areas of the patient's facial image; The target connected domain acquisition module is used to obtain the influence of the background area on each suspected defect connected domain according to the gray value of each pixel in each suspected defect connected domain, the number of pixels in each suspected defect connected domain and the number of pixels in the background area; According to the influence of the background area on each suspected defect connected domain, several target connected domains are selected from all suspected defect connected domains; The acne region acquisition module is used to obtain the similarity between any two target connected domains according to the number of pixels in each target connected domain, the gray value of each pixel and the distance between the centroids of any two target connected domains; According to the similarity between any two target connected domains, several acne regions are obtained; The grading result acquisition module is used to obtain the severity of each acne area according to the number of pixels in each acne area and the chain code value of each pixel on the edge; according to the severity of each acne area, the patient's facial acne grading is obtained.
10. A storage medium for image-assisted graded detection of skin acne, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the image-assisted grading detection method for skin acne as claimed in any one of claims 1 to 8 are implemented.
Citation Information
Cited By
A Q-switched laser-based intelligent control method and system for pigmentation beauty
CN119785976A
Tongue image classification method for patients with systemic lupus erythematosus for different traditional Chinese medicine syndromes
CN119810577A
Tongue Image Classification Method for Systemic Lupus Erythematosus Patients with Different Traditional Chinese Medicine Syndromes
CN119810577B
Optical film surface flaw detection method and system, product and medium
CN119919387A
Crop leaf surface scab identification and prediction method
CN120526318A