Cosmetic instrument control method and device, electronic equipment and storage medium
By detecting skin image lesions on the beauty device and adjusting gears according to the area of the lesion area and pixel value, it solves the problem that users find it difficult to accurately adjust the gears of the beauty device, and improves the treatment efficiency and effect.
Patent Information
- Application Number
- CN202411339665.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-07
AI Technical Summary
It is difficult for users to accurately adjust the appropriate gear when using a beauty device, resulting in excessive or insufficient light energy and affecting the therapeutic effect.
By obtaining the skin image of the target object, lesion detection is performed, and the gear of the beauty instrument is adjusted according to the area and pixel value of the lesion area to ensure the accuracy of the output light energy.
Accurate adjustment of the gear of the beauty instrument is achieved, the treatment efficiency is improved, excessive or insufficient light energy problems are avoided, and the effectiveness of skin treatment is ensured.
Smart Images

Figure CN119258404A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of medical electronic equipment, and in particular to a beauty instrument control method, device, electronic equipment and storage medium. Background Art
[0002] The skin rejuvenation effect can be achieved by using a beauty instrument. The principle of skin rejuvenation is to output light energy to the surface of human skin through the light-emitting component. The effect of light promotes and stimulates cell activity, promotes metabolism and repairs damaged tissues, reduces melanin, repairs damaged tissues and cells, and thus achieves the effect of skin rejuvenation and whitening. Beauty instruments generally include multiple modes, each of which includes multiple gears. According to different skin conditions, it is necessary to select a suitable gear for treatment, and different gears correspond to different light energies. The higher the gear, the higher the light energy. Too high a gear will cause overtreatment, resulting in aggravation of the condition or irreversible damage. Too low a gear will cause too low light energy and ineffective treatment. In the related art, when using a beauty instrument, the user needs to adjust the gear of the beauty instrument by himself, but due to lack of experience, it is impossible to accurately adjust the appropriate gear. Therefore, how to accurately adjust the gear of the beauty instrument has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to provide a beauty instrument control method, device, electronic device and storage medium, aiming to accurately adjust the gear position of the beauty instrument.
[0004] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a beauty instrument control method, the method comprising:
[0005] Acquire a skin image of a target object;
[0006] Performing lesion detection on the skin image to obtain a target lesion area;
[0007] Acquire the area of the target lesion region according to the target lesion region to obtain the area of the lesion region;
[0008] Determining a target pixel value according to the pixel value of the target lesion area;
[0009] Adjusting the preset initial gear position according to the lesion area and the target pixel value to obtain a target gear position;
[0010] The beauty instrument is controlled to output light energy to the target lesion area according to the target gear position.
[0011] In some embodiments, performing lesion detection on the skin image to obtain a target lesion area includes:
[0012] Performing grayscale processing on the skin image to obtain a grayscale image;
[0013] Performing binarization processing on the grayscale image to obtain a binarized image;
[0014] Performing contrast enhancement processing on the binary image to obtain an enhanced image;
[0015] Performing normalization processing on the enhanced image to obtain a normalized image;
[0016] Perform lesion detection on the normalized image to obtain the target lesion area.
[0017] In some embodiments, performing lesion detection on the normalized image to obtain the target lesion area includes:
[0018] Performing forward column difference processing on the normalized image to obtain a forward column difference image;
[0019] Performing forward row difference processing on the normalized image to obtain a forward row difference image;
[0020] Calculating the sum of the absolute values of the numerical values in the forward column difference image and the forward row difference image to obtain a row-column difference image;
[0021] Lesion detection is performed based on the row-column difference image to obtain the target lesion area.
[0022] In some embodiments, after controlling the beauty instrument to output light energy to the target lesion area according to the target gear position, the method further includes:
[0023] Acquire the temperature collected by the temperature sensor according to a preset temperature collection cycle to obtain temperature sampling data; wherein the temperature sensor is used to collect the skin temperature of the target object during the use of the beauty instrument;
[0024] Determine temperature prediction data according to the temperature sampling data and preset temperature compensation data;
[0025] If the temperature prediction data is greater than or equal to a preset first temperature threshold, controlling the beauty instrument to stop outputting light energy;
[0026] If the temperature prediction data is less than the first temperature threshold and greater than a preset second temperature threshold, control the beauty instrument to lower one gear from the target gear to obtain a candidate gear;
[0027] The beauty instrument is controlled to output light energy to the target lesion area according to the candidate gear position.
[0028] In some embodiments, before acquiring the temperature collected by the temperature sensor according to a preset temperature collection period to obtain the temperature sampling data, the method further includes:
[0029] The temperature compensation data is preset, specifically including:
[0030] Obtaining a conversion coefficient of optical power to temperature, a dissipation function of electrical power to optical power, and the electrical power of the beauty instrument;
[0031] Compensation data is constructed according to the conversion coefficient, the dissipation function and the electric power to obtain the temperature compensation data.
[0032] In some embodiments, before acquiring the temperature collected by the temperature sensor according to a preset temperature collection period to obtain the temperature sampling data, the method further includes:
[0033] Setting the temperature acquisition cycle specifically includes:
[0034] Obtaining a period of light energy output by the beauty instrument to the lesion area according to the target gear, and obtaining an output energy period;
[0035] The temperature collection period is determined according to the output energy period; wherein the timing of the temperature collection period and the output energy period are alternated.
[0036] In some embodiments, after acquiring the skin image of the target object, the method further includes:
[0037] Obtaining each pixel value in the skin image to obtain a candidate pixel value;
[0038] Filter out pixel values less than a preset pixel threshold from the candidate pixel values to obtain a selected pixel value;
[0039] Obtaining the number of the selected pixel values to obtain the target pixel number;
[0040] Determining a lesion area detection result according to the target pixel number and the preset number threshold; wherein the target pixel number is less than the preset number threshold, the lesion area detection result is characterized as no lesion area or only a part of the lesion area;
[0041] If the lesion region detection result indicates that there is no lesion region or only a part of the lesion region exists, a reminder message is output.
[0042] In some embodiments, after performing lesion detection on the skin image to obtain a target lesion area, the method further includes:
[0043] Performing image recognition on the skin image using a preset image recognition model to obtain the type of lesion;
[0044] Adjusting the preset initial mode according to the lesion type to obtain a target mode;
[0045] The beauty instrument is controlled to output light energy to the target lesion area according to the target mode.
[0046] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a beauty instrument control device, the device comprising:
[0047] A micro-camera acquisition module, used to obtain skin images of the target object;
[0048] A lesion detection module, used to perform lesion detection on the skin image to obtain a target lesion area;
[0049] An acquisition module, used for acquiring the area of the target lesion region according to the target lesion region to obtain the area of the lesion region;
[0050] A determination module, used to determine a target pixel value according to the pixel value of the target lesion area;
[0051] A gear adjustment module, used to adjust the preset initial gear according to the area of the lesion region and the target pixel value to obtain a target gear;
[0052] A control module is used to control the beauty instrument to output light energy to the target lesion area according to the target gear position.
[0053] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0054] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0055] The beauty instrument control method, device, electronic device and storage medium proposed in the present application obtain a skin image of a target object, perform lesion detection on the skin image, and obtain a target lesion area. The area of the target lesion area is obtained according to the target lesion area to obtain the area of the lesion area. The target pixel value is determined according to the pixel value of the target lesion area. The preset initial gear is adjusted according to the lesion area and the target pixel value to obtain the target gear. The beauty instrument is controlled to output light energy to the target lesion area according to the target gear, so that the most suitable target gear can be selected according to the lesion area and the target pixel value, thereby realizing automatic adjustment of the accurate gear for the beauty instrument and improving the treatment efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is an optional flow chart of the beauty instrument control method provided in the embodiment of the present application;
[0057] Figure 2 yes Figure 1 Flow chart of step S102 in FIG.
[0058] Figure 3 is a schematic diagram of a normalized image provided in an embodiment of the present application;
[0059] Figure 4 yes Figure 2 Flow chart of step S205 in FIG.
[0060] Figure 5 is a schematic diagram of a front column differential image provided by an embodiment of the present application;
[0061] Figure 6 is a schematic diagram of a forward row difference image provided in an embodiment of the present application;
[0062] Figure 7 is a schematic diagram of a row-column difference image provided in an embodiment of the present application;
[0063] Figure 8 is a flow chart of a beauty instrument control method provided by a second embodiment of the present application;
[0064] Fig. 9 is a flow chart of a beauty instrument control method provided by a third embodiment of the present application;
[0065] Fig.10 is a flow chart of a beauty instrument control method provided by a fourth embodiment of the present application;
[0066] Fig.11 is a flow chart of a beauty instrument control method provided by a fifth embodiment of the present application;
[0067] Fig.12 is a flow chart of a beauty instrument control method provided by a sixth embodiment of the present application;
[0068] Fig.13 is a structural schematic diagram of a beauty instrument control device provided in an embodiment of the present application;
[0069] Fig.14 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0070] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0071] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0072] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0073] Beauty devices generally include multiple modes, each of which includes multiple gears. According to different skin conditions, you need to choose the appropriate gear for treatment. Different gears correspond to different light energies. The higher the gear, the higher the light energy. Too high a gear will cause overtreatment, leading to worsening of the condition or irreversible damage. Too low a gear will cause too low light energy and make the treatment ineffective. In related technologies, when using a beauty device, users need to adjust the gear of the beauty device by themselves, but due to lack of experience, they cannot accurately adjust the appropriate gear.
[0074] Based on this, the embodiments of the present application provide a beauty instrument control method, device, electronic device and storage medium, which are intended to obtain a skin image of a target object, perform lesion detection on the skin image, and obtain a target lesion area. The lesion area and the target pixel value are obtained according to the target lesion area, and the initial gear is adjusted according to the lesion area and the target pixel value to obtain the target gear, and the beauty instrument is controlled to output light energy to the target lesion area according to the target gear. Since the target gear is obtained based on the lesion area and the target pixel value, and the lesion area and the target pixel value represent the severity of the target lesion area, the target gear is a gear suitable for the target lesion area, and accurate adjustment of the appropriate gear is achieved.
[0075] The beauty instrument control method, device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the beauty instrument control method in the embodiments of the present application is described.
[0076] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0077] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0078] The beauty instrument control method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the beauty instrument control method, etc., but is not limited to the above forms.
[0079] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0080] Please refer to Figure 1 , Figure 1 is an optional flow chart of the beauty instrument control method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.
[0081] Step S101, obtaining a skin image of a target object;
[0082] Step S102, performing lesion detection on the skin image to obtain a target lesion area;
[0083] Step S103, obtaining the area of the target lesion region according to the target lesion region to obtain the area of the lesion region;
[0084] Step S104, determining a target pixel value according to the pixel value of the target lesion area;
[0085] Step S105, adjusting the preset initial gear position according to the lesion area and the target pixel value to obtain the target gear position;
[0086] Step S106, controlling the beauty instrument to output light energy to the target lesion area according to the target gear position.
[0087] In step S101 of some embodiments, the beauty instrument uses a constantly lit tungsten filament lamp tube, which has the advantages of a large irradiation area and uniform light emission, and a micro-imaging acquisition module is arranged at the light outlet. When the target object uses the beauty instrument, the light outlet of the beauty instrument is placed on the skin, and at this time, the micro-imaging acquisition module acquires the skin image of the target object.
[0088] In step S102 of some embodiments, since the beauty instrument is used to treat abnormal skin, such as skin with melanin, acne and pimples, the target object will aim the beauty instrument at the skin with problems, so the collected skin image generally contains the target lesion area. The skin color of abnormal skin is different from that of normal skin, so when the skin image is detected for the lesion area, the target lesion area on the skin image can be obtained.
[0089] In step S103 of some embodiments, the larger the area of the target lesion area, the more serious the skin problem on the skin image, the higher the light energy required, and thus the higher the gear required. Therefore, the appropriate gear can be adjusted according to the area of the lesion area, so it is necessary to obtain the area of the lesion area. Specifically, the area of the lesion area can be obtained by the number of pixels in the target lesion area.
[0090] In step S104 of some embodiments, the skin color of abnormal skin is darker than that of normal skin. The larger the pixel value in the target lesion area, the more serious the skin problem on the skin image, and the higher the required light energy, so the required gear is also higher. Therefore, the gear can also be adjusted according to the pixel value in the target lesion area. Thus, it is necessary to determine the target pixel value according to the pixel value in the target lesion area and adjust the gear according to the target pixel value. In one example, the target pixel value is obtained by adding all the pixel values in the target lesion area and then taking the average. It should be noted that the pixel value in the target lesion area is the pixel value on the skin image corresponding to the target lesion area.
[0091] In step S105 of some embodiments, the preset initial gear can be a gear preset by the target object according to its own skin condition. Since the target object lacks experience, this initial gear may not be the most accurate gear. Therefore, it is necessary to adjust the initial gear according to the lesion area and the target pixel value to obtain the target gear.
[0092] Specifically, the larger the lesion area and the target pixel value, the higher the target gear. The initial gear is adjusted according to the lesion area and the target pixel value to obtain the target gear. For example, the score value of the lesion area and the target pixel value is obtained according to the following formula (1), and different score values correspond to different gears, so as to obtain the target gear according to the score value.
[0093] F = a×S + b×pix, (1)
[0094] Where, F is the score value, S is the lesion area, pix is the target pixel value, a is the area weight, and b is the pixel weight. In one example, the beauty instrument has three gears, namely the first gear, the second gear, and the third gear, and the third gear is the highest gear. Then two thresholds are set, namely F1 and F2, where F1 > F2. When F > F1, the target gear is the third gear; when F2 < F ≤ F1, the target gear is the second gear; when F ≤ F2, the target gear is the first gear.
[0095] In step S106 of some embodiments, if the initial gear of the beauty instrument is the first gear and the target gear obtained according to the lesion area and the target pixel value is the second gear, the gear of the beauty instrument is automatically switched from the first gear to the second gear, and the beauty instrument is controlled to output light energy to the target lesion area. Thus, the abnormal skin can be treated with an accurate gear, improving the treatment efficiency.
[0096] In steps S101 to S106 shown in the embodiment of the present application, a target lesion area is obtained by acquiring a skin image of the target object and performing lesion detection on the skin image. The area of the target lesion area is obtained according to the target lesion area to obtain the area of the lesion area. The target pixel value is determined according to the pixel value of the target lesion area. The preset initial gear is adjusted according to the lesion area and the target pixel value to obtain the target gear. The beauty instrument is controlled to output light energy to the target lesion area according to the target gear, so that the most suitable target gear can be selected according to the lesion area and the target pixel value, thereby automatically adjusting the accurate gear for the beauty instrument and improving the treatment efficiency.
[0097] See also Figure 2 In some embodiments, step S102 may include but is not limited to steps S201 to S205:
[0098] Step S201, grayscale the skin image to obtain a grayscale image;
[0099] Step S202, binarizing the grayscale image to obtain a binary image;
[0100] Step S203, performing contrast enhancement processing on the binary image to obtain an enhanced image;
[0101] Step S204, normalizing the enhanced image to obtain a normalized image;
[0102] Step S205, performing lesion detection on the normalized image to obtain a target lesion area.
[0103] In some embodiments, in step S201 to step S202, in order to simplify the image data and facilitate subsequent data processing, the color image is converted into grayscale, so the skin image is grayscaled to obtain a grayscale image. The grayscale image is then binarized to obtain a binary image. The binarization process can be to set the pixels in the grayscale image whose grayscale value is greater than a threshold to white, and the corresponding pixel value is 255, and the pixels whose grayscale value is less than or equal to the threshold are set to black, and the corresponding pixel value is 0.
[0104] In some embodiments, in step S203 to step S205, the contrast enhancement process can highlight the image and the background and enhance the quality of the image. Therefore, the contrast enhancement process is performed on the binary image to obtain an enhanced image. The contrast enhancement process can be performed by adjusting the contrast of the binary image using histogram equalization to obtain an enhanced image. After obtaining the enhanced image, the enhanced image is normalized to convert the pixel value 255 in the binary image into 1, so that the normalized image contains only binary data of 0 and 1. For details, please refer to Figure 3 , Figure 3 is a schematic diagram of a normalized image, "0" represents a normal skin part, "1" represents an abnormal skin part, and all "1"s constitute the target lesion area. Lesion detection is performed on the normalized image to obtain the target lesion area.
[0105] In step S201 to step S205 shown in this embodiment, a normalized image is obtained by graying, binarizing, contrast enhancing and normalizing the skin image, and the target lesion area can be quickly detected based on the normalized image.
[0106] See also Figure 4 In some embodiments, step S205 may include but is not limited to steps S401 to S404:
[0107] Step S401, performing forward column difference processing on the normalized image to obtain a forward column difference image;
[0108] Step S402, performing forward row difference processing on the normalized image to obtain a forward row difference image;
[0109] Step S403, calculating the sum of the absolute values of the values in the forward column difference image and the forward row difference image to obtain a row-column difference image;
[0110] Step S404, performing lesion detection based on the row-column difference image to obtain a target lesion area.
[0111] In step S401 of some embodiments, the front column difference image is calculated by the following formula (2):
[0112] Cnor[i,j]=pnor[i,j]-pnor[i,j-1], (2)
[0113] Where pnor[i,j] represents the data of the i-th row and j-th column in the normalized image, Cnor[i,j] represents the data of the i-th row and j-th column in the forward column difference image, i=0~N, j=0~N, and the upper left corner of the image is taken as the origin, when j=0, Cnor[i,j]=pnor[i,j]. The forward column difference image is obtained by formula (2): Figure 5 As shown, the front column difference image includes the left and right boundaries of the target lesion area.
[0114] In step S402 of some embodiments, the forward row difference image is calculated by the following formula (3):
[0115] Rnor[i,j]=pnor[i,j]-pnor[i-1,j], (3)
[0116] Where pnor[i,j] represents the data of the i-th row and j-th column in the normalized image, Rnor[i,j] represents the data of the i-th row and j-th column in the forward row difference image, i=0~N, j=0~N, and the upper left corner of the image is taken as the origin. When i=0, Rnor[i,j]=pnor[i,j]. The forward row difference image is obtained by formula (3): Figure 6 As shown, the forward row difference image includes the upper and lower boundaries of the target lesion area.
[0117] In steps S403 to S404 of some embodiments, the row-column difference image is calculated by the following formula (4):
[0118] Dnor[i,j]=|Cnor[i,j]|-|Rnor[i,j]|, (4)
[0119] Among them, Dnor[i,j] represents the data of the i-th row and j-th column in the row-column difference image, Cnor[i,j] represents the data of the i-th row and j-th column in the forward column difference image, and Rnor[i,j] represents the data of the i-th row and j-th column in the forward row difference image, i=0~N, j=0~N, and the upper left corner of the image is taken as the origin. The row-column difference image is obtained by formula (4) as follows: Figure 7 As shown, the row-column difference image includes the lesion boundary of the target lesion area, and the lesion boundary is the target lesion area. Therefore, lesion detection can be performed on the row-column difference image to obtain the target lesion area.
[0120] In steps S401 to S404 shown in this embodiment, a forward column difference image and a forward row difference image are obtained by performing forward column difference processing and forward row difference processing on the normalized image, respectively. Then, a row-column difference image is obtained based on the forward column difference image and the forward row difference image. Lesion detection is performed based on the row-column difference image to obtain the target lesion area, thereby reducing the amount of calculation for obtaining the target lesion area.
[0121] See also Figure 8 In some embodiments, after step S106, the beauty instrument control method may include but is not limited to steps S801 to S805:
[0122] Step S801, acquiring the temperature collected by the temperature sensor according to a preset temperature collection cycle to obtain temperature sampling data; wherein the temperature sensor is used to collect the skin temperature of the target object during the use of the beauty instrument;
[0123] Step S802, determining temperature prediction data according to the temperature sampling data and preset temperature compensation data;
[0124] Step S803, if the temperature prediction data is greater than or equal to a preset first temperature threshold, the beauty instrument is controlled to stop outputting light energy;
[0125] Step S804: if the temperature prediction data is less than the first temperature threshold and greater than the preset second temperature threshold, control the beauty instrument to lower one gear from the target gear to obtain a candidate gear;
[0126] Step S805, controlling the beauty instrument to output light energy to the target lesion area according to the candidate gear position.
[0127] In steps S801 to S802 of some embodiments, the temperature sensor collects the skin temperature of the target object during the use of the beauty instrument according to the temperature collection cycle to obtain temperature sampling data. However, since it takes time for the skin temperature to be transferred from the skin surface to the temperature sensor inside the beauty instrument, there will be temperature errors caused by temperature conduction delay, making the collected temperature sampling data inaccurate. Therefore, it is necessary to determine the temperature prediction data based on the temperature sampling data and the temperature compensation data.
[0128] In one example, the temperature compensation data can be obtained in advance through experiments. For example, after the temperature sensor in the beauty instrument collects the temperature sampling data, the skin temperature is immediately collected through a temperature collection device that can contact the skin, that is, the skin temperature is collected without temperature conduction delay to obtain the target temperature data. The difference between the target temperature data and the temperature sampling data is the temperature compensation data. The temperature sampling data plus the temperature compensation data can be used to obtain the temperature prediction data.
[0129] In steps S803 to S805 of some embodiments, the first temperature threshold is greater than the second temperature threshold. When the temperature prediction data is greater than or equal to the preset first temperature threshold, it indicates that the current skin temperature is too high and is prone to damage the skin, and the beauty instrument is controlled to stop outputting light energy. When the temperature prediction data is less than the first temperature threshold and greater than the second temperature threshold, the beauty instrument is controlled to lower one gear from the target gear to obtain a candidate gear, and the beauty instrument is controlled to output light energy to the target lesion area according to the candidate gear. Due to the heat accumulation effect, the skin temperature will gradually increase when the beauty instrument is used for too long. Therefore, when the temperature prediction data is less than the first temperature threshold and greater than the second temperature threshold, the gear of the beauty instrument is reduced to prevent damage to the skin when the skin temperature increases. Among them, when the temperature prediction data is less than or equal to the second temperature threshold, the beauty instrument maintains the target gear unchanged.
[0130] In steps S801 to S805 shown in this embodiment, by compensating the temperature sampling data, accurate temperature prediction data can be obtained. Based on the temperature prediction data, it is determined whether it is necessary to control the beauty instrument to stop outputting light energy, reduce the gear or maintain the current gear to prevent skin damage caused by excessive temperature.
[0131] See also Fig. 9 In some embodiments, before step S801, the beauty instrument control method further includes preset temperature compensation data, specifically including but not limited to steps S901 to S902:
[0132] Step S901, obtaining a conversion coefficient of optical power to temperature, a dissipation function of electrical power to optical power, and electrical power of the beauty instrument;
[0133] Step S902, constructing compensation data according to the conversion coefficient, dissipation function and electric power to obtain temperature compensation data.
[0134] In steps S901 to S902 of some embodiments, the dissipation function of electrical power to optical power is as shown in the following formula (5):
[0135]
[0136] Where η is the dissipation function, θ is the conversion factor, and U i and I i Respectively represent the instantaneous voltage and instantaneous current at the power input terminal, U i ′ and i i ′ They represent the instantaneous voltage and instantaneous current at both ends of the lamp respectively.
[0137] The temperature compensation data is calculated by the following formula (6):
[0138] T=ξ×η×Q, (6)
[0139] Among them, T represents temperature compensation data, ξ represents the conversion coefficient of light power to temperature, Q represents the electrical power of the beauty instrument, Q=p×t, p is the power output power, and t is the luminous time.
[0140] It should be noted that after calculating the temperature compensation data, the temperature prediction data can be calculated by the following formula (7):
[0141] △T=T ′ +λ×T, (7)
[0142] Among them, △T represents the temperature prediction data, T ′ represents the temperature sampling data, and λ represents the temperature fitting coefficient. If the temperature prediction data is obtained in different ways, the way to calculate the temperature prediction data is different.
[0143] In step S901 to step S902 of this embodiment, the conversion coefficient of optical power to temperature, the dissipation function of electrical power to optical power and the electrical power of the beauty instrument are obtained. Compensation data is constructed based on the conversion coefficient, dissipation function and electrical power to obtain temperature compensation data, which can obtain more accurate temperature compensation data.
[0144] See also Fig.10 In some embodiments, before step S801, the beauty instrument control method further includes setting a temperature acquisition cycle, specifically including but not limited to steps S1001 to S1002:
[0145] Step S1001, obtaining the period of light energy output by the beauty instrument to the lesion area according to the target gear, and obtaining the output energy period;
[0146] Step S1002, determining a temperature collection period according to an output energy period; wherein the timing of the temperature collection period and the output energy period are alternated.
[0147] In step S1001 to step S1002 of this embodiment, the beauty instrument outputs light energy according to the output energy cycle. If the skin temperature is collected when the beauty instrument outputs light energy, the collected temperature will be inaccurate. Therefore, the skin temperature is collected only when the light energy output stops. Therefore, the temperature collection cycle is determined according to the output energy cycle, so that the timing of the temperature collection cycle and the output energy cycle is alternated.
[0148] Please refer to Fig.11 In some embodiments, after step S101, the beauty instrument control method may also include but is not limited to steps S1101 to S1105:
[0149] Step S1101, obtaining each pixel value in the skin image to obtain a candidate pixel value;
[0150] Step S1102, filtering out pixel values less than a preset pixel threshold from the candidate pixel values to obtain a selected pixel value;
[0151] Step S1103, obtaining the number of selected pixel values to obtain the target pixel number;
[0152] Step S1104, determining the lesion area detection result according to the target pixel number and the preset number threshold; wherein, if the target pixel number is less than the preset number threshold, the lesion area detection result is characterized as no lesion area or only a part of the lesion area;
[0153] Step S1105: If the lesion region detection result indicates that there is no lesion region or only a part of the lesion region exists, output a reminder message.
[0154] In steps S1101 to S1103 of some embodiments, the pixel values of normal skin and abnormal skin are quite different. Therefore, each pixel value in the skin image is compared with a preset pixel threshold to screen out the pixel value of abnormal skin, that is, the pixel value of abnormal skin is the selected pixel value. According to the number of selected pixel values, it can be determined whether there is a lesion area in the skin image and whether there is only a part of the lesion area. Therefore, the number of selected pixel values is obtained to obtain the target pixel number.
[0155] In steps S1104 to S1105 of some embodiments, if the number of target pixels is 0, it means that there is no lesion area in the skin image, and if the number of target pixels is greater than 0 and less than the preset number threshold, it means that only part of the lesion area exists in the skin image. If there is no lesion area or only part of the lesion area exists, it means that the target object has not aimed the beauty instrument at the abnormal skin, so the reminder information is output. When the target object receives the reminder information, it can realign the beauty instrument before treatment, thereby improving the treatment efficiency.
[0156] In steps S1101 to S1105 of this embodiment, after selecting the selected pixel values, the number of the selected pixel values is obtained to obtain the target pixel number. The lesion area detection result is determined based on the target pixel number and the preset number threshold, so that when the lesion area detection result is characterized as no lesion area or only a part of the lesion area, a reminder message is output.
[0157] Please refer to Fig.12 In some embodiments, after step S102, the beauty instrument control method may also include but is not limited to steps S1201 to S1203:
[0158] Step S1201, performing image recognition on the skin image through a preset image recognition model to obtain the lesion type;
[0159] Step S1202, adjusting the preset initial mode according to the lesion type to obtain a target mode;
[0160] Step S1203, controlling the beauty instrument to output light energy to the target lesion area according to the target mode.
[0161] In step S1201 of some embodiments, the image recognition model is trained in advance with training data, so that the trained image recognition model can recognize the type of lesions on the skin image. The lesion type can be freckles, chloasma, acne, wrinkles, pimples, etc.
[0162] In step S1202 of some embodiments, different lesion types correspond to different modes. The preset initial mode may be a mode manually or automatically adjusted when the beauty instrument was used last time, or it may be a mode pre-set by the target subject based on the lesion type determined subjectively. Since the lesion type when the beauty instrument was used last time may be inconsistent with the lesion type when the beauty instrument is currently used, or the target subject is inexperienced, the initial mode may not be the most accurate mode, and therefore the initial mode needs to be adjusted according to the lesion type to obtain the target mode.
[0163] Specifically, different modes correspond to different luminous wavelengths, and different luminous wavelengths can treat skin with different lesion types. For example, the luminous wavelength corresponding to the firming mode is 700nm-1064nm. The effect of this band is to penetrate deep into the skin and act on the collagen in the dermis, stimulating the contraction and regeneration of collagen, thereby improving the firmness and elasticity of the skin. The luminous wavelength corresponding to the whitening mode is 500nm-650nm. This band can penetrate into the surface of the skin, selectively destroy melanin, accelerate the production of more ATP molecules in the mitochondria in the cells, increase cell energy, and promote cell repair and regeneration, thereby achieving a whitening effect.
[0164] In step S1203 of some embodiments, different modes have different gears. After obtaining the target mode and target gear, the mode of the beauty instrument is switched to the target mode, and then the gear of the beauty instrument is switched to the target gear, the beauty instrument is controlled to output light energy to the target lesion area, so that abnormal skin can be treated with accurate mode and gear, thereby improving treatment efficiency.
[0165] In steps S1201 to S1203 of this embodiment, after identifying the type of lesions on the skin image, a corresponding target mode is obtained based on the lesion type. The beauty instrument is controlled to output light energy to the target lesion area according to the target mode, and abnormal skin is treated in an accurate mode to improve treatment efficiency.
[0166] See also Fig.13 The present application also provides a beauty instrument control device, which can implement the above beauty instrument control method, and the device includes:
[0167] Micro-camera acquisition module 1301, used to obtain the skin image of the target object;
[0168] The lesion detection module 1302 is used to perform lesion detection on the skin image to obtain a target lesion area;
[0169] An acquisition module 1303 is used to acquire the area of the target lesion region according to the target lesion region to obtain the area of the lesion region;
[0170] A determination module 1304 is used to determine a target pixel value according to the pixel value of the target lesion area;
[0171] The gear adjustment module 1305 is used to adjust the preset initial gear according to the area of the lesion region and the target pixel value to obtain the target gear;
[0172] The control module 1306 is used to control the beauty instrument to output light energy to the target lesion area according to the target gear position.
[0173] The specific implementation of the beauty instrument control device is basically the same as the specific implementation of the above-mentioned beauty instrument control method, and will not be repeated here.
[0174] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned beauty instrument control method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0175] See also Fig.14 , Fig.14 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0176] The processor 1401 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0177] The memory 1402 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1402 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1402, and the processor 1401 calls and executes the beauty instrument control method of the embodiment of this application;
[0178] Input / output interface 1403, used to implement information input and output;
[0179] The communication interface 1404 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);
[0180] A bus 1405 that transmits information between the various components of the device (e.g., the processor 1401, the memory 1402, the input / output interface 1403, and the communication interface 1404);
[0181] The processor 1401 , the memory 1402 , the input / output interface 1403 and the communication interface 1404 are connected to each other in communication within the device via a bus 1405 .
[0182] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned beauty instrument control method is implemented.
[0183] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0184] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0185] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0186] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0187] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0188] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0189] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0190] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0191] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0192] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0193] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0194] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A beauty instrument control method, characterized in that: The method comprises: Acquire a skin image of a target object; Performing lesion detection on the skin image to obtain a target lesion area; Acquire the area of the target lesion region according to the target lesion region to obtain the area of the lesion region; Determining a target pixel value according to the pixel value of the target lesion area; Adjusting the preset initial gear position according to the lesion area and the target pixel value to obtain a target gear position; The beauty instrument is controlled to output light energy to the target lesion area according to the target gear position.
2. The method according to claim 1, characterized in that The step of performing lesion detection on the skin image to obtain a target lesion area includes: Performing grayscale processing on the skin image to obtain a grayscale image; Performing binarization processing on the grayscale image to obtain a binarized image; Performing contrast enhancement processing on the binary image to obtain an enhanced image; Performing normalization processing on the enhanced image to obtain a normalized image; Perform lesion detection on the normalized image to obtain the target lesion area.
3. The method according to claim 2, characterized in that The performing lesion detection on the normalized image to obtain the target lesion area includes: Performing forward column difference processing on the normalized image to obtain a forward column difference image; Performing forward row difference processing on the normalized image to obtain a forward row difference image; Calculating the sum of the absolute values of the numerical values in the forward column difference image and the forward row difference image to obtain a row-column difference image; Lesion detection is performed based on the row-column difference image to obtain the target lesion area.
4. The method according to claim 1, characterized in that: After controlling the beauty instrument to output light energy to the target lesion area according to the target gear position, the method further includes: Acquire the temperature collected by the temperature sensor according to a preset temperature collection cycle to obtain temperature sampling data; wherein the temperature sensor is used to collect the skin temperature of the target object during the use of the beauty instrument; Determine temperature prediction data according to the temperature sampling data and preset temperature compensation data; If the temperature prediction data is greater than or equal to a preset first temperature threshold, controlling the beauty instrument to stop outputting light energy; If the temperature prediction data is less than the first temperature threshold and greater than a preset second temperature threshold, control the beauty instrument to lower one gear from the target gear to obtain a candidate gear; The beauty instrument is controlled to output light energy to the target lesion area according to the candidate gear position.
5. The method according to claim 4, characterized in that Before acquiring the temperature collected by the temperature sensor according to the preset temperature collection period and obtaining the temperature sampling data, the method further includes: The temperature compensation data is preset, specifically including: Obtaining a conversion coefficient of optical power to temperature, a dissipation function of electrical power to optical power, and the electrical power of the beauty instrument; Compensation data is constructed according to the conversion coefficient, the dissipation function and the electric power to obtain the temperature compensation data.
6. The method according to claim 4, characterized in that Before acquiring the temperature collected by the temperature sensor according to the preset temperature collection period and obtaining the temperature sampling data, the method further includes: Setting the temperature acquisition cycle specifically includes: Obtaining a period of light energy output by the beauty instrument to the lesion area according to the target gear, and obtaining an output energy period; The temperature collection period is determined according to the output energy period; wherein the timing of the temperature collection period and the output energy period are alternated.
7. The method according to claim 1, characterized in that After acquiring the skin image of the target object, the method further includes: Obtaining each pixel value in the skin image to obtain a candidate pixel value; Filter out pixel values less than a preset pixel threshold from the candidate pixel values to obtain a selected pixel value; Obtaining the number of the selected pixel values to obtain the target pixel number; Determining a lesion area detection result according to the target pixel number and the preset number threshold; wherein the target pixel number is less than the preset number threshold, the lesion area detection result is characterized as no lesion area or only a part of the lesion area; If the lesion region detection result indicates that there is no lesion region or only a part of the lesion region exists, a reminder message is output.
8. The method according to claim 1, characterized in that After performing lesion detection on the skin image to obtain a target lesion area, the method further includes: Performing image recognition on the skin image using a preset image recognition model to obtain the type of lesion; Adjusting the preset initial mode according to the lesion type to obtain a target mode; The beauty instrument is controlled to output light energy to the target lesion area according to the target mode.
9. A beauty instrument control device, characterized in that: The device comprises: A micro-camera acquisition module, used to obtain skin images of the target object; A lesion detection module, used to perform lesion detection on the skin image to obtain a target lesion area; An acquisition module, used for acquiring the area of the target lesion region according to the target lesion region to obtain the area of the lesion region; A determination module, used to determine a target pixel value according to the pixel value of the target lesion area; A gear adjustment module, used to adjust the preset initial gear according to the area of the lesion region and the target pixel value to obtain a target gear; A control module is used to control the beauty instrument to output light energy to the target lesion area according to the target gear position.
10. A beauty instrument, characterized in that: The beauty instrument comprises a memory and a processor, the memory stores a computer program, and the processor implements the beauty instrument control method according to any one of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the beauty instrument control method according to any one of claims 1 to 8 is implemented.
Citation Information
Cited By
Control method of light skin treatment device and light skin treatment device
CN121466496A