Skin visual inspection control method based on silicon substrate multi-primary-color LED lamp

By acquiring and analyzing skin images of local windows during phototherapy, abnormal skin areas are identified and the output of LED light sources is dynamically adjusted. This solves the problem of inaccurate light source output in existing technologies, achieving high-resolution recognition of skin conditions and personalized cosmetic effects.

CN121074341APending Publication Date: 2025-12-05JIANGXI YUMING SMART OPTOELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511112914.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-10
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

In the current process of phototherapy for skin rejuvenation, the linkage between image processing and control strategies suffers from response lag, making it impossible to accurately distinguish differences in skin condition. The light source output also lacks target precision, resulting in uneven treatment effects.

Method used

By acquiring continuous skin images, dividing local windows, calculating the similarity between the structural orientation field and the color gradient field, identifying abnormal skin regions, shielding color response overlap interference, using Hausdorff distance to evaluate grayscale region changes, and generating dynamic control signals to adjust LED light source output.

Benefits of technology

It achieves high-resolution recognition of skin condition, enhances the accuracy of identifying details and anomalies, ensures dynamic closed-loop feedback between light source output and skin condition, and improves the flexibility and stability of personalized beauty treatment control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121074341A_ABST
    Figure CN121074341A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of light control, in particular to a skin visual detection control method based on a silicon substrate multi-primary-color LED lamp. According to the method, the original skin image is continuously acquired, the local window is divided, and the similarity of the structure direction field and the color gradient field of the local texture is combined, so that the high-resolution recognition of the skin texture state is realized, and the recognition precision of the facial detail abnormity is enhanced. By setting the fuzzy judgment interval and quantifying the membership degree, a multi-dimensional recognition system for different abnormal types such as color spots, redness and swelling, dry decrustation, acnes and comedos is established, and the sensitivity and adaptability of skin abnormality judgment are remarkably improved. In a color response interference identification process, an inter-class variance is introduced to calculate a response difference between a red channel and a yellow channel, so that the influence of a color overlapping region is effectively eliminated, and the effectiveness and independence of extracting a gray region are ensured. And further extracting an effective gray area in the non-interference area.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of light control, in particular to a skin visual detection control method based on a silicon substrate multi-primary color LED lamp. BACKGROUND

[0002] The skin visual detection control method based on a silicon substrate multi-primary color LED lamp refers to irradiating the skin with a multi-primary color LED light source, collecting the skin image through a visual sensor, judging the current state of the skin according to the color or texture changes in the image, and adjusting the light-emitting color and combination mode of the LED lamp according to the preset color control rule. This method aims at the personalized irradiation conditions required in the skin light therapy and beauty process, covers the steps of skin state recognition based on visible light images, matching the corresponding light color combination according to the skin feature parameters, and adjusting the light-emitting wavelength ratio of the light source, etc. Based on the image analysis results, the multi-color output control of the LED light source is realized through setting the specific color channel light-emitting ratio and switching time sequence.

[0003] The existing technology has the problems of segmented execution and response lag in the linkage of image processing and control strategy, relies on the static changes of color or texture in the image as the basis for judgment, does not consider the dual correlation of the structure direction field and the color gradient field in the local window, which leads to misjudgment in detail feature recognition, for example, when the face has slight dryness and mild swelling coexisting, the color change cannot accurately distinguish the state difference. In addition, the existing scheme relies on the preset color control rule when adjusting the light source output, without real-time feedback linkage with the skin state, and cannot dynamically correct the output parameters according to the state fluctuation. The interference between color channels is not independently removed, which may cause confusion in the analysis results of gray scale regions, thereby affecting the accuracy of the subsequent control strategy. Especially in the continuous image acquisition process, there is a lack of contour stability measurement mechanism, which makes the stability analysis of the skin image under the irradiation of the light source insufficient, which may cause delay or false triggering of the control signal of the light source, for example, when the moisture fluctuates but does not exceed the global feature threshold during the care process, the system is difficult to respond quickly. The above shortcomings lead to the lack of target accuracy in the intensity, duration and frequency adjustment of the light source output, which may cause uneven care effect or even insufficient or excessive irradiation of individual areas in the long-term use. SUMMARY

[0004] The purpose of the present application is to solve the shortcomings in the prior art and to provide a skin visual detection control method based on a silicon substrate multi-primary color LED lamp.

[0005] In order to achieve the above purpose, the present application adopts the following technical scheme: a skin visual detection control method based on a silicon substrate multi-primary color LED lamp, comprising the following steps: S1: Collecting continuous original skin images, dividing a plurality of local windows, calculating the skin texture similarity of the local window, and obtaining a skin texture similarity analysis result; S2: Comparing the skin texture similarity of each local window in the skin texture similarity analysis result with a preset fuzzy judgment interval, dividing the skin abnormal area, and obtaining a skin abnormal area judgment result; S3: Collecting continuous light skin images after the silicon substrate LED light irradiation and performing gray processing, extracting the pixel gray of the red and yellow channels of the light skin images after gray processing, and determining the color response overlap interference area; S4: Shielding the color response overlap interference area, extracting the red and yellow channel pixels in the remaining non-interference area as the effective gray area, and obtaining a region screening result; S5: Based on the region screening result, obtaining the contour of the red and yellow channels corresponding to the effective gray area of all continuous light skin images, calculating the Hausdorff distance between the contours, evaluating the change amplitude of the effective gray area in the adjacent light skin images, and obtaining a gray stability analysis result; S6: Based on the skin abnormal area judgment result and the gray stability analysis result, generating a corresponding control signal, adjusting the red and yellow light source output of the silicon substrate LED lamp, and obtaining a silicon substrate LED lamp regulation result.

[0006] As a further scheme of the present application, the step S1 is specifically: S101: Collecting continuous original skin images through a visual detection camera, and dividing the forehead, cheek and nose wing regions in the original skin images into local windows; S102: Determining the structure direction field according to the gradient change of the skin texture in each local window, and determining the color gradient field according to the spatial distribution change of the pixel color in each local window, calculating the similarity between the structure direction field vector and the color gradient field vector, i.e. the similarity of the skin texture, and obtaining a skin texture similarity analysis result.

[0007] As a further scheme of the present application, the step S2 is specifically: S201: Obtaining all collected original skin images as a skin image sample set, and statistically analyzing the similarity distribution of different skin regions in the skin image sample set, and setting the similarity fuzzy judgment interval according to the statistical result; S202: Calculating the similarity between the structure direction field vector and the color gradient field vector in each local window in the skin texture similarity analysis result, and the membership degree of the similarity fuzzy judgment interval, and dividing the skin abnormal area according to the membership degree, wherein the skin abnormal area includes freckles, redness, dryness and peeling, acne and acne, and obtaining a skin abnormal area judgment result.

[0008] As a further scheme of the present application, the step S3 is specifically: S301: Collecting the continuous light under-skin images after the light irradiation of the silicon substrate LED by the visual detection camera and performing the gray scale processing, extracting the pixel gray scale of the red and yellow channels of the light under-skin images after the gray scale processing, and obtaining the pixel gray scale information set; S302: Based on the pixel gray scale information set, using the maximum inter-class variance method to calculate the inter-class variance of the pixel gray scale of the red and yellow channels respectively, and determining the color response overlapping interference region according to the inter-class variance.

[0009] As a further scheme of the present application, the step S4 is specifically: S401: Shielding the color response overlapping interference region, including setting the pixel value of the interference region to the background value, extracting the red and yellow channel pixels in the remaining non-interference region as the effective gray scale region, and obtaining the interference region division result; S402: Based on the interference region division result, marking the location of the effective gray scale region on the divided local window, and obtaining the region screening result.

[0010] As a further scheme of the present application, the step S5 is specifically: S501: Based on the region screening result, obtaining the contour of the red and yellow channels corresponding to the effective gray scale region of all continuous light under-skin images, and calculating the Hausdorff distance between the contours of adjacent light under-skin images; S502: According to the Hausdorff distance between the contours of adjacent light under-skin images, evaluating the change amplitude of the effective gray scale region in the adjacent light under-skin images, and judging whether the gray scale value of the gray scale region is affected due to the change of skin oil or moisture content according to the change amplitude, and obtaining the gray scale stability analysis result.

[0011] As a further scheme of the present application, the step S6 is specifically: S601: Generating a first control signal based on the skin abnormal region determination result, for adjusting the red and yellow light source output of the silicon substrate LED lamp at the beginning of the beauty treatment; S602: Based on the gray scale stability analysis result, if the change amplitude of the effective gray scale region exceeds the preset change threshold, a second control signal is generated for adjusting the red and yellow light source output of the silicon substrate LED lamp during the beauty treatment, the brightness, duration and output period of the light source are optimized in real time, and the control result of the silicon substrate LED lamp is obtained to optimize the skin care effect in the beauty treatment process.

[0012] Compared with the prior art, the present application has the following advantages and positive effects: In the present application, by continuously collecting original skin images and dividing local windows, the similarity of the structure direction field and the color gradient field of the local texture is combined to realize high-resolution identification of the skin texture state, and the identification accuracy of facial detail abnormalities is enhanced. By setting a fuzzy judgment interval and quantifying the membership, a multi-dimensional identification system for different abnormal types such as color spots, redness, dryness, acne and acne is established, which significantly improves the sensitivity and adaptability of skin abnormality judgment. In the color response interference identification process, the response difference of the red and yellow channels is calculated by introducing the inter-class variance, effectively eliminating the influence of color overlap areas, and ensuring the effectiveness and independence of the extracted gray area. Further, the effective gray area is extracted in the non-interference area, and the Hausdorff distance is calculated based on the contour change, so as to realize the quantitative evaluation of the change amplitude of the gray area, and provide a clear index for judging the fluctuation of the skin state. In the control strategy layer, the skin abnormal area judgment result and the gray area change amplitude are combined, different control signals are generated in the initial stage and real-time process stage of beauty, and the red and yellow light sources are accurately adjusted, including brightness, time length and output period. Different adjustment dimensions have a superimposed effect on the matching degree of the irradiation in the skin care process. The overall processing logic realizes the dynamic closed-loop feedback between the light source output and the skin state, ensures the response accuracy of the light source, realizes the real-time matching of the targeted care intensity, and effectively improves the control flexibility and stability of the personalized beauty treatment. BRIEF DESCRIPTION OF DRAWINGS

[0013] Figure 1 The present application is a main step schematic diagram. DETAILED DESCRIPTION

[0014] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application and do not limit the present application.

[0015] Please refer to Figure 1 The present application provides a technical scheme: a skin visual detection control method based on a silicon substrate multi-primary color LED lamp, comprising the following steps: S1: Collecting continuous original skin images and dividing a plurality of local windows, calculating the skin texture similarity of the local windows, and obtaining the skin texture similarity analysis result; S2: Comparing the skin texture similarity of each local window in the skin texture similarity analysis result with the preset fuzzy judgment interval, dividing the skin abnormal area, and obtaining the skin abnormal area judgment result; S3: Collecting the continuous skin images under the light irradiation of the silicon substrate LED light and performing the gray processing, extracting the pixel gray of the red and yellow channels of the skin images under the light after the gray processing, and determining the color response overlapping interference area; S4: Shielding the color response overlapping interference area, extracting the red and yellow channel pixels in the remaining non-interference area as the effective gray area, and obtaining the area screening result; S5: Based on the area screening result, obtaining the contour of the red and yellow channels corresponding to the effective gray area of all the continuous skin images under the light, calculating the Hausdorff distance between the contours, evaluating the change amplitude of the effective gray area in the adjacent skin images under the light, and obtaining the gray stability analysis result; S6: Based on the skin abnormal area determination result and the gray stability analysis result, generating the corresponding control signal, adjusting the red and yellow light source output of the silicon substrate LED light, and obtaining the regulation result of the silicon substrate LED light.

[0016] Step S1 is specifically: S101: Collecting the continuous original skin images through the visual detection camera, and dividing the forehead, cheek and nose wing area in the original skin image into local windows respectively; The continuous original skin images are collected by a visual detection camera. First, the image acquisition frequency is set to 25 frames per second, the image resolution is 1920x1080 pixels, a CMOS sensor is used for continuous image acquisition, the ambient light intensity is maintained between 500 lx and 800 lx during acquisition, and all images are cached in the image cache space in chronological order. Subsequently, facial feature points are extracted using a face recognition method, including eyebrow center points, eye corner points, nose tip points, mouth corner points, and chin points, etc. A face geometry model is constructed by connecting the feature points. The face geometry model is usually constructed based on the positioning of facial feature points. The commonly used models in existing models are the 68-point facial feature detection model in the Dlib library or the MediaPipe face grid model. In specific implementation, Python language can be used in combination with OpenCV and Dlib library for image processing and feature point extraction, or Google's MediaPipe framework can be used for high-precision face key point detection. In terms of model structure, taking Dlib as an example, its face key point regression algorithm based on regression tree can accurately identify 68 key points of the face, which cover the regions of eyebrows, eyes, nose, mouth, and chin. By connecting specific key points such as the center of the two eyebrows, the corners of the eyes, the tip of the nose, the corners of the mouth, and the chin points, a geometric structure model of the face can be constructed, and the boundaries of the forehead, nose, and cheek can be further determined using the geometric model. After the boundaries are determined, window segmentation can be performed in the image based on these region boundaries to extract local image data. The software used includes OpenCV, Dlib, or MediaPipe framework, and the running platform is generally Python environment. The boundaries of the forehead, cheek, and nose are determined, and the corresponding image regions are extracted in the image based on the boundary information. The region division adopts a fixed-size image window slicing strategy, and each region is divided into multiple local windows of 128x128 pixels. The image data of each window is numbered and stored as an independent unit in the local image block set.

[0017] S102: Determine the structure direction field according to the gradient change of the skin texture in each local window, and determine the color gradient field according to the spatial distribution change of the pixel color in each local window. Calculate the similarity between the structure direction field vector and the color gradient field vector, i.e. the similarity of the skin texture, to obtain the skin texture similarity analysis result. The structural direction field specifically refers to: in each local image window, after the image is grayed, Sobel operators are applied to calculate the gray level gradient of the image in the horizontal direction (x-axis) and the vertical direction (y-axis) respectively, the gradient value of each pixel is obtained, and then it is combined into a two-dimensional vector field. The vector field reflects the direction and intensity of the gray level change in the image. Then, the average of the gray level gradient vectors of all pixels in the window is taken to form an average vector representing the overall direction of the texture of the region, that is, the structural direction field vector, which reflects the direction of the gray level change trend of the local texture of the skin.

[0018] The color gradient field specifically refers to: in each local image window, Sobel operators are applied to the three color channels of the original image respectively, the color change gradient of each channel in the horizontal and vertical directions is obtained, and then the gradient vectors of the three channels are combined into three-dimensional color gradient vectors. The vector reflects the color change direction and intensity of the pixel in the color space. The average of the color gradient vectors of all pixels in the window is taken to obtain an average color gradient vector, which is the color gradient field vector, which reflects the overall trend direction of the color change of the skin region.

[0019] In each local window, the luminance information distribution of the image is obtained through the gray image conversion process, the Sobel operator is used to calculate the gray level gradient value of each pixel point in the horizontal and vertical directions. In practical applications, the gradient is often dimensionless processed through normalization (such as dividing by the maximum gradient value) or scaling operation (such as the coefficient 1 / 8 of the Sobel operator), so that it only reflects the relative change direction and intensity. The obtained gradient value is combined into a two-dimensional gradient vector, and the structural direction field of the local window is determined based on the vector set. The overall texture direction of the window is obtained by taking the average of the gray level gradient vectors of all pixel points in the window. At the same time, the RGB color channel layer corresponding to the local window in the original image is extracted, Sobel operators are applied to each color channel to obtain the color change degree of the pixel point in the horizontal and vertical directions, and the gradient values of the three channels are combined to form a two-dimensional vector field reflecting the color change direction and intensity. Finally, the color gradient field is obtained by averaging all color gradient vectors, and the establishment of the structural direction field vector and the color gradient field vector is completed.

[0020] For calculating the similarity S between the structural direction field vector and the color gradient field vector, the formula is as follows:

[0021] wherein, is the structural direction field vector, which represents the average vector of the gray level change direction in the local texture of the skin. The method is to apply the Sobel operator in each local window to extract the gray level change intensity of the image in the horizontal and vertical directions, combine the horizontal and vertical gradient values of each pixel into a two-dimensional vector, and finally calculate the average value of all pixel vectors to obtain is the color gradient field vector, which represents the average vector of the color space change in the skin area. The method is to extract the gradient of the image RGB three channels respectively, calculate the change degree of each channel in the horizontal and vertical directions, combine the gradient values of three channels of each pixel into a two-dimensional color change vector, and obtain the color gradient field vector after averaging, is the module of the structural direction field vector, which represents the structural direction change intensity, is the module of the color gradient field vector, which represents the color change intensity.

[0022] Through the cosine similarity calculation between the structural direction field and the color gradient field, the consistency of different skin areas in texture direction and color change can be accurately reflected, thereby avoiding the misjudgment caused by single feature and improving the reliability of skin image contrast analysis in the overall system.

[0023] Suppose a local window in the alar region is taken as an example: the structural direction field mean vector is , and the color gradient field mean vector is The similarity calculation is as follows:

[0024]

[0025]

[0026]

[0027] The results show that the texture structure and color distribution of the skin in the local window of the alar region have high consistency, the texture similarity is 0.873, which reflects that the region can be regarded as a stable texture structure region in the analysis model, and is convenient for subsequent contrast analysis and quality discrimination.

[0028] By similarity calculation between structure direction field and color gradient field, the quantification of skin texture detail change can be realized in local window scale, which effectively improves the resolution of facial micro-abnormal region and avoids the recognition ambiguity caused by global feature masking. This method establishes a high-precision texture similarity evaluation framework for specific regions, making the skin state judgment no longer rely on a single color or texture dimension, but a composite analysis of morphological and color features, enhancing the accuracy and anti-interference ability of abnormal detection. In practical application, this mechanism can significantly improve the performance of skin abnormality recognition under complex lighting or mixed state regions, ensuring that the subsequent skin region classification and control strategy is based on more accurate texture features.

[0029] Step S2 is specifically: S201: Obtain all the collected original skin images as a skin image sample set, and statistically analyze the similarity distribution of different skin regions in the skin image sample set, and set the similarity fuzzy judgment interval according to the statistical result; Obtain all the collected original skin images as a skin image sample set, and statistically analyze the similarity distribution of different skin regions in these images. By analyzing the local region of each image, the similarity between the structure direction field vector and the color gradient field vector of the skin region is calculated, and then the similarity data between regions is obtained. Through multiple calculations, the similarity distribution of different skin regions in the sample set is obtained, such as the texture difference of forehead, cheek, and nose wing. On this basis, the similarity of these regions is statistically analyzed to obtain the average value, standard deviation, and distribution range of the similarity between regions. According to the statistical result, the similarity fuzzy judgment interval is set, and the upper and lower limits of the fuzzy interval are determined by the statistical analysis result of the skin region similarity distribution. For example, by calculating the similarity distribution of all samples, it can be found that the similarity of normal skin regions is concentrated in a certain range, while the similarity of abnormal regions (such as color spots, acne, etc.) and normal regions will have a large difference. Based on these differences, the fuzzy judgment interval is set to ensure that the texture features of normal and abnormal regions can be well distinguished in subsequent analysis.

[0030] S202: Calculate the similarity between the structure direction field vector and the color gradient field vector in each local window in the skin texture similarity analysis result, and the membership degree of different similarity fuzzy judgment intervals, and divide the skin abnormal region according to the membership degree, the skin abnormal region includes color spots, redness, dryness, acne and acne, and obtain the skin abnormal region judgment result; Assuming that the similarity fuzzy judgment interval is set according to the result of S201: the similarity range of normal skin region is [0.80, 1.00], and 0.9 is the ideal value; the similarity range of abnormal skin region is [0.50, 0.80], and 0.65 is the ideal value.

[0031] Membership represents the membership degree of the given similarity S corresponding to the fuzzy decision interval. The calculation method of membership is based on fuzzy logic, specifically:

[0032]

[0033] where S represents the similarity between the structure orientation field and the color gradient field of the current local window, a, b, c are the upper and lower boundary values of the fuzzy decision interval, respectively representing the lower boundary a of the normal skin region, the upper boundary b of the normal skin region, and the lower boundary c of the abnormal skin region. These values are determined by statistical texture difference and similarity distribution results of the skin region, and are set based on experimental and empirical data, is the membership of the normal skin region, representing the matching degree of the current similarity with the normal skin region similarity interval, is the membership of the abnormal skin region, representing the matching degree of the current similarity with the abnormal skin region similarity interval.

[0034] By comparing the given similarity with the set similarity interval of the normal and abnormal regions, it is determined whether the region belongs to the normal skin region or the abnormal skin region. When the similarity is close to the upper boundary of the normal skin interval, the membership is close to 1, indicating that the region matches well with the texture characteristics of normal skin; when the similarity is close to the lower boundary of the abnormal skin interval, the membership is close to 0, indicating that the texture of the region is significantly different from the characteristics of abnormal skin. Therefore, the calculated membership is helpful for the system to further distinguish the abnormal conditions of the skin region, thereby achieving accurate skin abnormal region determination.

[0035] For example, assume is the lower boundary of the normal skin region, is the upper boundary of the normal skin region, is the lower boundary of the abnormal skin region, the membership of the normal region is calculated, given , substitute the above formula: .

[0036] The membership of the abnormal region is calculated, given , substitute the membership formula of the abnormal region: .

[0037] The results show that the membership degree of the normal region is 0.365, indicating that the texture similarity of the region has a certain degree of match with the similarity of the normal skin region, but there is still a large gap from the ideal value 1. The membership degree of the abnormal region is 0, indicating that the texture of the region has a large gap with the similarity of the abnormal skin region, and therefore the region does not conform to the characteristics of the abnormal skin. According to the calculation results of the membership degree, it is judged that the local window belongs to the normal skin region. If the membership degree is high and close to 1, it indicates that the texture of the region conforms to the characteristics of the normal skin; if the membership degree is close to 0, it indicates that the region has obvious abnormal characteristics.

[0038] By constructing a skin image sample set and statistically analyzing the similarity distribution of different skin regions, a representative similarity fuzzy judgment interval can be formed based on real sample data, providing a data-driven standard baseline for subsequent skin state judgment, and avoiding the generalization error caused by static threshold setting. On this basis, the membership degree calculation mechanism is introduced, which maps the similarity between the structural direction field and the color gradient field into the fuzzy judgment interval for hierarchical judgment, making the division of abnormal regions more continuous and flexible, and accurately identifying the mild abnormal regions in the boundary state. This processing method significantly enhances the differentiation ability of skin abnormal types, not only improving the recognition accuracy of typical abnormalities such as pigmented spots, redness, etc., but also improving the detection sensitivity of subtle dryness, initial acne, etc. Light symptoms, ultimately achieving accurate expression of skin abnormal regions in terms of category refinement, location positioning, and degree quantification.

[0039] Step S3 is specifically: S301: Collecting continuous skin images under light irradiation of a silicon substrate LED by a visual detection camera and performing gray scale processing, extracting the pixel gray scale of the red and yellow channels of the skin images after gray scale processing, and obtaining a pixel gray scale information set; Collecting continuous skin images under light irradiation of a silicon substrate LED by a visual detection camera and performing gray scale processing. During the collection process, ensure that the image resolution is 1920x1080 pixels, the frame rate is set to 30 frames per second, and the light intensity is maintained between 500lx and 800lx to ensure stable image quality and not affected by environmental light changes. Then, use image processing software (such as OpenCV or Matlab) to perform gray scale processing on the collected color images and convert them into gray scale images. Next, extract the red and yellow channel pixel gray scale values from the gray scale processed images. The yellow channel is usually extracted from the red and green channels by the maximum value method. After extraction, the brightness values of the red and yellow channels corresponding to each pixel are obtained.

[0040] S302: Based on the pixel gray scale information set, the maximum inter-class variance method is used to calculate the inter-class variance of the red and yellow channel pixel gray scale, and the color response overlap interference region is determined according to the inter-class variance; The inter-class variance of the pixel gray scale in the red and yellow channels is calculated using the maximum inter-class variance method where B represents the inter-class, that is, the measure of the dispersion or distribution difference between the pixel values of different classes (for example, foreground and background), and the formula is as follows:

[0041] where t is the current gray scale threshold value of the pixel gray scale information set, that is, the segmentation point of the image gray scale, and the threshold value is selected by traversing all possible gray scale values to maximize the inter-class variance, is the proportion of pixels in the pixel gray scale information set that is lower than the current gray scale threshold value t, indicating the proportion of pixels in the overall image that is lower than the current threshold value, and the calculation method is as follows: , is the probability of pixels with a gray scale value of i in the pixel gray scale information set (that is, the proportion of the number of pixels with a gray scale value of i to the total number of pixels N), and N is the total number of pixels in the pixel gray scale information set, is the proportion of pixels in the pixel gray scale information set that is higher than the current gray scale threshold value t, indicating the proportion of pixels in the overall image that is greater than the current threshold value, and the calculation method is as follows: , is the average gray scale value of the region in the pixel gray scale information set that is lower than the current gray scale threshold value t, and the calculation method is as follows: , i is the gray scale value, and this average value is the weighted average gray scale value of all pixels with a gray scale value less than or equal to t. To calculate this average value, the number of pixels with each gray scale value i needs to be known, which is , that is, the probability (or frequency) of pixels with a gray scale value of i, and then the average value of the region is obtained by weighted averaging the gray scale values of all pixels with a gray scale value less than or equal to t, and the summation range in the formula is to t, that is, all gray scale values less than the threshold value t, is the average gray scale value of the region in the pixel gray scale information set that is higher than the current gray scale threshold value t, and the calculation method is as follows: , the average value of the region higher than the threshold value t is the weighted average of all pixels with a gray scale value greater than t. The calculation method is also to obtain the average value of the region by weighted averaging all pixels with a gray scale value greater than t, and the summation range in the formula is to 255, that is, all gray scale values greater than the threshold value t, and the maximum gray scale value here is 255, because in an 8-bit gray scale image, the range of gray scale values is usually from 0 to 255, reflects the square of the gray scale difference between the two parts (the part below the threshold value and the part above the threshold value) after segmentation, and the larger the inter-class variance, the better the segmentation effect. The value is selected by maximizing to select the best threshold value.

[0042] In practical operation, image processing software (such as MATLAB, OpenCV, etc.) can directly provide these statistical data, such as gray histogram, probability distribution of pixel value, etc. Through these tools, the inter-class variance under each threshold and the corresponding optimal threshold can be obtained. It is assumed that the gray values of the red and yellow channels are extracted by the image processing software and statistically analyzed.

[0043] With as the threshold value for calculation, it is assumed that the statistical data of the red channel image are as follows: total pixel number: , : represents the proportion of pixels below the threshold value . That is, the pixels below 120 account for 45% of the total pixels, : represents the proportion of pixels above the threshold value . That is, the pixels above 120 account for 55% of the total pixels, : represents the average gray value of the area below the threshold value . That is, the average gray value of the pixels with a gray value less than 120 is 85, : represents the average gray value of the area above the threshold value . That is, the average gray value of the pixels with a gray value greater than 120 is 150.

[0044] The formula of the inter-class variance is as follows:

[0045] The parameters when are as follows:

[0046] Therefore, the inter-class variance of the red channel pixel gray value is .

[0047] Similarly, the inter-class variance of the yellow channel is calculated, assuming that when , the pixel distribution of the yellow channel is as follows: : represents the proportion of pixels below the threshold value . That is, the pixels below 130 account for 50% of the total pixels. : represents the proportion of pixels above the threshold value . That is, the pixels above 130 account for 50% of the total pixels. : represents the average gray value of the area below the threshold value . That is, the average gray value of the pixels with a gray value less than 130 is 110. : represents the average gray value of the area above the threshold value The average gray value of the pixels with a gray value greater than 130 is 160.

[0048] Interclass variance The formula is as follows:

[0049] Substituting The parameters when t = 130 are as follows:

[0050] Therefore, the interclass variance of the gray value of the yellow channel pixels is .

[0051] Suppose that different t values (for example, 110, 120, 130, and the like) are continuously traversed, and finally, the threshold value with the maximum interclass variance is selected as the optimal threshold value for image segmentation .

[0052] In the interclass variance formula, the probability is used to weight the average gray value of each region to calculate the average gray value of each region. Specifically, the average values of the regions below the threshold value t and above the threshold value t are obtained by weighting the gray values of the respective regions by the probabilities thereof. Through this weighting manner, the relative importance of each gray value within a region can be more accurately reflected, and the influence of some gray values with a low frequency of occurrence can be avoided in the calculation of the interclass variance. For example, if some gray values have a large proportion of pixels, these pixels will have a greater influence on the average value of the region, and therefore, will obtain a greater weight in the calculation of the interclass variance. This is the role of the probability as a weight, which ensures that the more frequent gray values in the image have a greater influence on the segmentation result, and the less common gray values have a smaller influence on the result.

[0053] By respectively applying the maximum interclass variance method to the pixel gray value information of the red and yellow channels for statistical analysis, the region in which the channel responses overlap and interfere under multi-light source illumination can be effectively identified. This manner realizes quantitative analysis of the interference effect between color channels, avoids the interference of pseudo-gray values caused by the superposition of light sources, and is helpful for accurately distinguishing the real reaction regions of the red and yellow channels in the skin image. Compared with the method of relying only on a color threshold value or experience separation, this processing means has stronger objectivity and adaptability, can dynamically identify the channel cross interference under different illumination intensities or skin quality differences, ensures that the subsequent gray value region extraction is based on real and effective signals, and improves the accuracy of the skin response region delineation.

[0054] Step S4 is specifically: S401: Shielding the color response overlapping interference area, including setting the pixel value of the interference area to the background value, extracting the red and yellow channel pixels in the remaining non-interference area as the effective gray area, and obtaining the interference area differentiation result; First, based on the calculation results of the maximum inter-class variance method, through the set threshold , the image is processed in the image processing software (such as OpenCV or Matlab). If the gray values of the red and yellow channels of a certain pixel are close (within ±10) or lower than the threshold value, the area where the pixel is located is likely to belong to the color response overlapping interference area. This is because, near the threshold value, the gray values of the red and yellow channels are too close, and the color information cannot be clearly distinguished, thus causing interference. In order to shield the interference area, the pixel values of these areas can be directly set to the background value (for example, the value is 0 or the gray value of the image background). In this way, the pixels in the interference area will no longer affect the color segmentation or feature extraction effect in the subsequent processing. The remaining non-interference area is extracted. Specifically, the pixels in the non-interference area are those whose red and yellow channel gray values are significantly higher than the threshold . These areas contain effective color information, so the red and yellow channel pixel values in these areas are retained as effective data for subsequent analysis and processing. Through this method, the color response overlapping interference area can be accurately identified and shielded, and the effective gray information of the non-interference area can be extracted.

[0055] S402: Based on the interference area differentiation result, mark the location of the effective gray area in the divided local window to obtain the region screening result; Mark the location of the effective gray area in the divided local window to obtain the region screening result. For example, when processing the local window of the forehead area, assume that the area in the window whose red and yellow channel gray values are greater than the threshold is marked as an effective gray area. If the effective area is located in the central region of the window, the software will mark the boundary box of this area, mark its position and save it as a region identifier. Similarly, other facial regions such as cheek or nose wing regions will also be processed in the same way, marking the location of each effective gray area and obtaining the region screening result corresponding to each window. Finally, after the location of the effective area in all local windows is marked, the complete region screening result is obtained.

[0056] By shielding the color response overlapping interference area, it is ensured that the subsequent analysis is only based on the true light source response area, which significantly improves the purity and analyzability of the gray data. This operation effectively eliminates the gray distortion problem caused by channel overlap, avoiding the introduction of interference factors in subsequent contour extraction and change amplitude evaluation. At the same time, the position of the effective gray area is accurately marked on the local window, making the region positioning have clear boundaries and spatial reference, and enhancing the control ability of the spatial distribution of the gray area. This mechanism improves the controllability and consistency of skin image analysis at the local level, which is conducive to forming stable region matching in multi-frame image analysis, laying a foundation for spatial continuity for change trend judgment and control signal generation, thereby enhancing the accuracy and robustness of the entire gray analysis link.

[0057] Step S5 is specifically: S501: Based on the region screening result, the contours of the effective gray area corresponding to the red and yellow channels of the skin image under all continuous light are obtained, and the Hausdorff distance between the contours of the skin images under adjacent light is calculated; Using image segmentation technology, the effective gray area of the red and yellow channels is extracted. Then, the gray images of the red and yellow channels are processed by an edge detection algorithm (such as the Canny edge detection algorithm) to extract the contours in the images. These contours represent the boundaries of the effective gray area in the image, reflecting the shape and changes of the skin area.

[0058] The Hausdorff distance between the contours of the skin images under adjacent light is calculated, and the formula is as follows:

[0059] wherein, is the Hausdorff distance, which is used to measure the maximum deviation between the contours of the effective gray area corresponding to the red and yellow channels of the skin images under adjacent light. The larger the value, the greater the difference between the effective gray area contours of the two images. A represents the first contour set of the effective gray area corresponding to the red and yellow channels of the skin image under the adjacent first light, B represents the second contour set of the effective gray area corresponding to the red and yellow channels of the skin image under the adjacent second light, and the set A and B contain all the contour points of the effective gray area in the image, which are extracted from the effective gray area of the red and yellow channels by image processing tools (such as OpenCV), is any point in the first contour set A , is any point in the second contour set B ​, each point corresponds to a contour point in the image, each contour point is extracted from the valid gray region by a contour extraction algorithm, is the Euclidean distance between points and , which is used to measure the spatial difference between two contour points in adjacent images, and the formula is , is the coordinate of point in the x and y directions of the skin image under the adjacent first light, is the coordinate of point in the x and y directions of the skin image under the adjacent second light, represents the maximum value of the minimum distance from all points in the first contour set A to the points in the second contour set , represents the maximum value of the minimum distance from all points in the second contour set to the points in the first contour set A.

[0060] Hausdorff distance is a method to measure the maximum deviation between two sets. By using Hausdorff distance to evaluate the contour difference of the valid gray region in the skin image under adjacent lights. By comparing the difference of the valid gray region contours of the two images, the Hausdorff distance can reveal the degree of change of the image gray region in the image due to changes in environmental lighting or changes in skin state (such as changes in oil or moisture content).

[0061] Assuming that in the image processing process, the valid gray region contour sets A and of the red and yellow channels of two images are obtained, as follows: (the first image), (the second image).

[0062] Calculate the distance between point and each point in set :

[0063]

[0064]

[0065] The minimum distance is .

[0066] For point and each point in set :

[0067]

[0068]

[0069] The minimum distance is .

[0070] For a point in the set , the distance to each point in the set is .

[0071]

[0072]

[0073] The minimum distance is .

[0074] For each point in the set A, calculate the minimum distance to the set : For the point , the minimum distance is ; For the point , the minimum distance is ; For the point , the minimum distance is .

[0075] Calculate the minimum distance from each point in the set to the set A: For the point , the minimum distance is ; For the point , the minimum distance is ; For the point , the minimum distance is .

[0076] The Hausdorff distance is a measure of the maximum deviation between two contours. Finally, the Hausdorff distance between the two contours is calculated, that is: .

[0077] The Hausdorff distance can be calculated to obtain the maximum deviation between the contours of the effective gray regions in the two images. In this example, the Hausdorff distance is 1.414 (in pixels in the image), indicating that the contours of the two images differ by about 1-2 pixels in the maximum deviation, which may reflect the changes in the effective gray regions in the skin images under different lighting conditions, and further suggest possible changes in the skin state.

[0078] S502: According to the Hausdorff distance between the contours of the skin images under adjacent light, the change amplitude of the effective gray region in the skin images under adjacent light is evaluated, and whether the change in the gray value of the gray region is caused by the change in the skin oil or moisture content is determined according to the change amplitude, to obtain a gray stability analysis result; Suppose the Hausdorff distance calculated using the skin images under adjacent light is The change amplitude is evaluated according to the distance, and whether the change is caused by the change in the skin oil or moisture content is determined according to the amplitude. The change amplitude range: if the Hausdorff distance is less than 2.0, it is considered that the change in the gray region of the skin is small, which may be caused by the slight change in the lighting condition, and the change in the skin oil or moisture content is not considered. If the Hausdorff distance is between 2.0 and 5.0, it indicates that the gray region of the skin image has a moderate change, which may be a slight change in the skin oil or moisture content. If the Hausdorff distance is greater than 5.0, it indicates that the effective gray region of the skin image has changed significantly, which is usually related to the obvious fluctuation of the skin oil or moisture content.

[0079] The setting of the change amplitude range can determine the change amplitude interval under different Hausdorff distances according to the skin image acquisition data. For example, by analyzing the skin images collected under different lighting conditions multiple times, it is found that when the Hausdorff distance is less than 2.0, the change amplitude is mainly related to the difference in lighting conditions, and when the Hausdorff distance exceeds 5.0, the change amplitude increases significantly, which is often related to the change in the skin state (such as moisture or oil content).

[0080] The intensity and angle of the light can also affect the image gray scale of the skin according to the illumination condition, and slight changes in illumination can cause a small Hausdorff distance. Greater changes in illumination or changes in the secretion of oil and moisture content of the skin itself can cause a significant increase in the Hausdorff distance. Assuming that the Hausdorff distance of the skin images under two lights is 1.414. According to the definition, this distance falls within the interval of 0 to 2.0, so it can be considered that the change is small, and the change in the image caused by the slight difference in the illumination condition can be ignored. If the Hausdorff distance is 4.5, it is in the range of 2.0 to 5.0, indicating that the change in the skin image is moderate, which may be caused by a slight change in the oil or moisture content of the skin. At this time, further investigation of the skin state may be needed to accurately determine the cause of the change. If the Hausdorff distance is 6.0, it is significantly higher than 5.0, indicating that the change in the image may be caused by a significant change in the oil or moisture content of the skin, especially when the secretion of skin oil or water is significantly changed, and the gray scale region may be strongly affected.

[0081] By extracting the contours of the effective gray scale region in the image under continuous light and calculating the deviation between the contours based on the Hausdorff distance, the fluctuation of the skin gray scale response region caused by changes in illumination can be quantified. This method does not rely on low-dimensional indicators such as the overall gray scale mean, but rather evaluates the spatial scale of the contour difference of the effective region from the morphological geometry level, with higher sensitivity and discrimination. Using the Hausdorff distance can accurately reveal the fluctuation of the skin optical properties caused by physiological changes such as skin moisture loss and uneven oil distribution, thereby determining whether the stability of the gray scale region is disturbed. This mechanism effectively avoids false negatives caused by averaging weak changes, enhances the ability to maintain details in multiple image comparisons, and makes the gray scale stability evaluation dynamic and physically relevant.

[0082] Step S6 is specifically: S601: generating a first control signal based on the skin abnormal region determination result, for adjusting the red and yellow light source output of the silicon substrate LED lamp at the beginning of the beauty treatment; Firstly, the LED light source output is classified and processed. The control module of the silicon substrate LED light applies different intensities and proportions of red and yellow light source outputs to each type of abnormal area. Specifically, for the color spot area, the yellow light source intensity is increased according to the degree of deviation of the color gradient field from the normal skin reference value to suppress melanin production. For the red and swollen area, the proportion of red light source is appropriately reduced according to the difference between the structure direction field and the normal skin direction field to reduce inflammation stimulation. For the dry and peeling area, the red light source output is appropriately enhanced according to the amplitude of the color gradient field deviation in the local window to stimulate collagen production and enhance skin moisturizing. For the acne and comedones area, the proportion of red light source output is reduced and the intensity of yellow light source is slightly increased according to the abnormal degree of the structure direction field to reduce inflammation and inhibit oil secretion. Finally, the first control signal is generated according to the abnormal degree of different areas to realize accurate light source regulation in the beauty starting stage.

[0083] S602: Based on the gray scale stability analysis result, if the change amplitude of the effective gray scale area exceeds the preset change threshold, a second control signal is generated for adjusting the red and yellow light source output of the silicon substrate LED light in the beauty process, the brightness, duration and output period of the light source are optimized in real time, and the regulation result of the silicon substrate LED light is obtained to optimize the skin care effect in the beauty process; Based on the contour Hausdorff distance of the effective gray scale area calculated in the gray scale stability analysis, the distance is compared with the preset change threshold in real time. When the distance is greater than the preset threshold, the system automatically generates a second control signal. The red and yellow light source outputs of the silicon substrate LED light are regulated by the control signal. The regulation method is as follows: if the Hausdorff distance of the gray scale area is large and continuously expands, the red light source brightness is reduced in real time through the LED control module, and the output duration of the yellow light source is appropriately extended to balance the oil and water content of the skin; when the change amplitude of the gray scale area is moderate, the periodic output frequency of the red light source is appropriately increased, and the brightness of the yellow light source is slightly adjusted to stabilize the collagen production of the skin; if the change amplitude of the gray scale area gradually decreases, the output brightness of the red light source is gradually restored or increased, and the continuous output period of the yellow light source is shortened to return to the initial preset state. The real-time regulation results of the brightness, duration and output period of the light source are recorded and executed by the control system of the LED light to achieve the purpose of real-time optimization of skin care effect.

[0084] By generating control signals of different stages based on the skin abnormal area judgment result and the gray scale stability analysis result respectively, the front and back layered driving of the light source adjustment process is realized. In the beauty starting stage, the spectral response optimization can be carried out for the identified abnormal type through the first control signal, so that the output combination of red and yellow light sources is more suitable for the current skin state, and the directional configuration of light energy distribution is completed before the initial irradiation. In the nursing process, the dynamic monitoring of the gray scale area change amplitude is carried out to judge whether the skin optical response is stable. If it deviates more than the preset threshold, the second control signal is generated in real time to adjust the light source brightness, time length and output period, so as to realize the continuous regulation and control of the irradiation process. The two-stage control mechanism strengthens the time sensitivity and state adaptability of the light source response, so that the irradiation energy and the skin state always keep linkage and matching, enhances the individual difference adaptation ability in the light therapy process, and improves the safety and effectiveness of the light stimulation.

[0085] The above is only the preferred embodiment of the present application, and does not limit the present application in other forms. Any skilled person in the art can use the disclosed technical content to make changes or modifications to equivalent embodiments applied to other fields, but any simple modification, equivalent change and modification made on the basis of the technical essence of the present application to the above embodiments without departing from the technical solution content of the present application still belongs to the protection scope of the technical solution of the present application.

Claims

1. A skin visual inspection control method based on a silicon substrate multi-primary LED lamp, characterized in that, The method comprises the following steps: S1: collecting continuous original skin images, dividing the original skin images into multiple local windows, calculating the skin texture similarity of the local windows, and obtaining a skin texture similarity analysis result; S2: comparing the skin texture similarity of each local window in the skin texture similarity analysis result with a preset fuzzy judgment interval, dividing the skin abnormal area, and obtaining a skin abnormal area judgment result; S3: collecting continuous light skin images after the silicon substrate LED light irradiation, performing grayscale processing, extracting the pixel gray scale of the red and yellow channels of the light skin images after the grayscale processing, and determining a color response overlapping interference area; S4: shielding the color response overlapping interference area, extracting the red and yellow channel pixels in the remaining non-interference area as effective gray area, and obtaining a region screening result; S5: based on the region screening result, obtaining the red and yellow channel contours of the effective gray area corresponding to all continuous light skin images, calculating the Hausdorff distance between the contours, evaluating the change amplitude of the effective gray area in the adjacent light skin images, and obtaining a gray stability analysis result; S6: based on the skin abnormal area judgment result and the gray stability analysis result, generating a corresponding control signal, adjusting the red and yellow light source output of the silicon substrate LED light, and obtaining a silicon substrate LED light regulation result.

2. The method of claim 1, wherein the multi-primary LED lamp based on a silicon substrate is a skin visual inspection control method, characterized by, The step S1 is specifically: S101: collecting continuous original skin images through a visual detection camera, and dividing the forehead, cheek, and nose wing regions in the original skin images into local windows; S102: determining a structure direction field according to the gradient change of the skin texture in each local window, determining a color gradient field according to the spatial distribution change of the pixel color in each local window, calculating the similarity between the structure direction field vector and the color gradient field vector, that is, the similarity of the skin texture, and obtaining a skin texture similarity analysis result.

3. The method of claim 2, wherein the method is a skin visual inspection control method using a multi-primary color LED lamp based on a silicon substrate. The step S2 is specifically: S201: obtaining all the collected original skin images as a skin image sample set, counting the similarity distribution of different skin areas in the skin image sample set, and setting a similarity fuzzy judgment interval according to the counting result; S202: calculating the membership degree of the similarity between the structure direction field vector and the color gradient field vector in each local window in the skin texture similarity analysis result to different similarity fuzzy judgment intervals, dividing the skin abnormal area according to the membership degree, and obtaining a skin abnormal area judgment result.

4. The method of claim 1, wherein the multi-primary LED lamp based on a silicon substrate is a skin visual inspection control method, characterized by, The step S3 is specifically: S301: collecting continuous light skin images after the silicon substrate LED light irradiation through a visual detection camera, performing grayscale processing, extracting the pixel gray scale of the red and yellow channels of the light skin images after the grayscale processing, and obtaining a pixel gray scale information set; S302: based on the pixel gray scale information set, calculating the inter-class variance of the red and yellow channel pixel gray scale respectively by using the maximum inter-class variance method, and determining a color response overlapping interference area according to the inter-class variance.

5. The method of claim 1, wherein the multi-primary LED lamp based on a silicon substrate is a skin visual inspection control method, characterized by, The step S4 is specifically: S401: shielding the color response overlapping interference area, including setting the pixel value of the interference area to a background value, extracting the red and yellow channel pixels in the remaining non-interference area as the effective gray area, and obtaining an interference area distinguishing result; S402: based on the interference area distinguishing result, marking the location of the effective gray area on the divided local window to obtain a region screening result.

6. The method of claim 1, wherein the multi-primary LED lamp based on a silicon substrate is a skin visual inspection control method, characterized by, The step S5 is specifically: S501: based on the region screening result, obtaining the contour of the red and yellow channels corresponding to the effective gray area of the whole continuous light skin image, and calculating the Hausdorff distance between the contours of the adjacent light skin images; S502: according to the Hausdorff distance between the contours of the adjacent light skin images, evaluating the change amplitude of the effective gray area in the adjacent light skin images, and judging whether the gray value of the gray area is affected due to the change of skin oil or moisture content according to the change amplitude, to obtain a gray stability analysis result.

7. The method of claim 1, wherein the method is a skin visual inspection control method using a multi-primary color LED lamp based on a silicon substrate. The step S6 is specifically: S601: generating a first control signal based on the skin abnormal area judgment result, for adjusting the red and yellow light source output of the silicon substrate LED lamp at the beginning of beauty treatment; S602: based on the gray stability analysis result, if the change amplitude of the effective gray area exceeds a preset change threshold, a second control signal is generated for adjusting the red and yellow light source output of the silicon substrate LED lamp during the beauty treatment process, the brightness, duration and output period of the light source are optimized in real time, and a regulation result of the silicon substrate LED lamp is obtained to optimize the skin care effect in the beauty treatment process.