Non-contact testing method, device and processor for skin pigmentation
Through the image acquisition equipment and pigmentation recognition model, the location and area of skin pigmentation patches are calculated, which solves the problem of low detection efficiency and accuracy in the existing technology and achieves safe and efficient detection of skin pigmentation patches.
Patent Information
- Application Number
- CN202111497539.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-12-09
AI Technical Summary
In the existing technology, the detection efficiency and accuracy of skin pigmentation plaques are low, and there is a lack of effective non-contact detection methods.
Obtain the image to be tested through the image acquisition device, input it into the pigmentation recognition model, determine the position, area and color difference of the pigmentation patch, use the processor to perform the non-contact test method, and calculate the regional outline area and image space area of each pigmentation patch. , combined with the lens module imaging ratio, calculate the actual area, and determine the color difference through the Euclidean distance in LAB color space.
It achieves safe, efficient, fast and accurate detection of skin pigmentation plaques, and provides fair and objective evaluation results.
Smart Images

Figure CN114176520B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical cosmetic skin detection, and in particular to a non-contact testing method, device, storage medium and processor for skin pigmentation. Background Art
[0002] Pigmentation patches are pigment changes of different colors, different ranges and different shades of human skin due to various reasons. As far as human skin is concerned, there are two types of pigments: one is the pigment produced by the human body itself, such as melanin produced by melanocytes in the skin. Due to the different depths of the melanin, different tones are shown: black or brown in the epidermis, gray-blue in the shallow dermis, and cyan in the deep dermis. Endogenous pigments also include lipopigments, bile pigments, etc. The other type is exogenous foreign pigments, such as carotene (carotenemia), drugs (such as azithrin can cause yellowing of the skin, etc.) and heavy metals (such as arsenic, bismuth, silver, etc.) and foreign bodies, such as tattoos, mud, iron slag, coal slag, etc. in the skin. In the prior art, it is usually observed by naked eyes by professionals based on experience, and no other effective methods for detecting pigmentation patches on the user's skin are provided, resulting in low detection efficiency and low accuracy for pigmentation patches. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide a non-contact testing method, device, storage medium and processor for skin pigmentation.
[0004] In order to achieve the above object, the present invention provides a non-contact testing method for skin pigmentation in a first aspect, comprising:
[0005] Acquire the image to be tested through the image acquisition device;
[0006] Inputting the image to be tested into a pigmentation recognition model to determine the number of pigmentation blocks in the image to be tested through the pigmentation recognition model;
[0007] For each pigmentation block in the image to be tested, determine the left end starting pixel position, the right end pixel position and the maximum horizontal span of the pigmentation block;
[0008] Determine the top starting pixel position, the bottom ending pixel position and the maximum vertical span of the pigmentation block;
[0009] Determine the area of the regional contour of each pigmentation block according to the left end starting pixel position, the right end pixel position, the maximum horizontal span of the pigmentation block, the top starting pixel position, the bottom end pixel position and the maximum vertical span of the pigmentation block;
[0010] Determine the image space area of the regional outline of each pigmentation block according to the regional outline area of each pigmentation block;
[0011] The actual area of each pigmentation block was determined based on the spatial area of the regional contour image of each pigmentation block.
[0012] Optionally, the regional contour area of each pigmentation block is determined based on the left end starting pixel position, the right end terminal pixel position, the horizontal maximum span, the top starting pixel position, the bottom end pixel position and the vertical maximum span of the pigmentation block, including the area covered by the rectangular frame constructed with the horizontal maximum span and the vertical maximum span as the regional contour area of the measured patch.
[0013] Optionally, determining the image space area of the regional contour of each pigmentation block based on the regional contour area of each pigmentation block includes: multiplying the regional contour area of each pigmentation block by the percentage of the actual area of the plaque texture within the contour area and then multiplying it by the area of each pixel unit to obtain the image space area of the regional contour of each pigmentation block.
[0014] Optionally, the method also includes: converting the image of the regional contour area into a black and white binary bitmap in which the actual area of the plaque texture is black and the rest of the area is white, and taking the percentage of black pixels in the total number of black and white pixels as the effective proportion; determining the effective proportion as the percentage of the actual area of the plaque texture within the contour area.
[0015] Optionally, determining the actual area of the pigmentation block based on the image space area of the regional outline of each pigmentation block includes: multiplying the image space area of the regional outline of each pigmentation block by the effective proportion to determine the actual image space area of the pigmentation block; and multiplying the actual image space area of each pigmentation block by the square of the imaging ratio of the lens module to determine the actual area of each pigmentation block.
[0016] Optionally, the method also includes: if the contour areas of two or more patches overlap during the measurement process, it is necessary to filter out the number of black pixels generated by adjacent patches enclosed in the contours of adjacent overlapping areas that are not associated with the main patch that generates the maximum horizontal and vertical spans when performing black and white binary bitmap conversion, so as to distinguish whether the adjacent patches are connected to the main patch currently being measured.
[0017] Optionally, the method further comprises:
[0018] Determine the color difference of each pigmentation patch;
[0019] For any pigment pixel contained in each patch, firstly, green filtering is performed on the pigment pixel to clear the green spectral component of the pigment pixel, and then blue filtering is performed on the pigment pixel to clear the blue spectral component of the pigment pixel, and finally the red spectral component R of each pigment pixel is determined;
[0020] Secondly, the pigment pixels are filtered in red to clear the red spectral component of the pigment pixels, and then the pigment pixels are filtered in blue to clear the blue spectral component of the pigment pixels, and finally the green spectral component G of each pigment pixel is determined;
[0021] Then, the pigment pixels are subjected to red filtering to clear the red spectral component of the pigment pixels, and then the pigment pixels are subjected to green filtering to clear the green spectral component of the pigment pixels, and finally the blue spectral component B of each pigment pixel is determined;
[0022] The color coordinates corresponding to each pixel included in each pigmentation block are determined according to the red spectral component R, the green spectral component G and the blue spectral component B of each pigment pixel, and the color difference of each pigmentation block is determined by the Euclidean distance in the LAB color space.
[0023] A second aspect of the present invention provides a processor configured to execute the above-mentioned non-contact testing method for skin pigmentation.
[0024] A third aspect of the present invention provides a non-contact testing device for skin pigmentation, comprising the above-mentioned processor.
[0025] A fourth aspect of the present invention provides a machine-readable storage medium having instructions stored thereon, which, when executed by a processor, configure the processor to perform the above-mentioned non-contact testing method for skin pigmentation.
[0026] The above-mentioned non-contact measurement method of skin pigmentation obtains the test picture through an image acquisition device, and inputs the test picture into the pigmentation recognition model to determine the number of pigmentation blocks in the test picture through the pigmentation recognition model, and for each pigmentation block in the test picture, determines the left end starting pixel, right end pixel position and horizontal maximum span of the pigmentation block, determines the top starting pixel position, bottom end pixel position and vertical maximum span of the pigmentation block, determines the regional contour area of each pigmentation block according to the left end starting pixel position, right end pixel position, horizontal maximum span, top starting pixel position, bottom end pixel position and vertical maximum span of the pigmentation block, determines the image space area of the regional contour of each pigmentation block according to the regional contour area of each pigmentation block, and determines the actual area of the pigmentation block according to the image space area of the regional contour of each pigmentation block. This method can be used to detect pigmentation spots, one of the skin surface defects, in a safe, efficient and non-contact manner, quickly, efficiently and accurately, providing a nearly perfect solution for the detection of pigmentation spots. The intrinsically safe product provided can give a fair and objective evaluation of the pigmentation spot data.
[0027] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings:
[0029] Figure 1 Schematically showing a flow chart of a non-contact testing method for skin pigmentation according to an embodiment of the present invention;
[0030] Figure 2 A schematic diagram schematically shows color differentiation according to an embodiment of the present invention;
[0031] Figure 3 A schematic diagram showing two pixel points located in the same row for measuring pigmentation plaques according to an embodiment of the present invention is shown;
[0032] Figure 4 A schematic diagram showing two pixel points located in different rows for measuring pigmented plaques according to an embodiment of the present invention is shown;
[0033] Figure 5 Schematically showing a schematic diagram of measuring the area of pigmented patches according to an embodiment of the present invention;
[0034] Figure 6 The internal structure of a computer device according to an embodiment of the present invention is schematically shown. DETAILED DESCRIPTION
[0035] The specific implementation of the embodiment of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the embodiment of the present invention, and is not used to limit the embodiment of the present invention.
[0036] Figure 1 The flowchart of the non-contact testing method for skin pigmentation according to an embodiment of the present invention is schematically shown. Figure 1 As shown, in one embodiment of the present invention, a non-contact testing method for skin pigmentation is provided, comprising the following steps:
[0037] Step 101: Acquire a picture to be tested through an image acquisition device.
[0038] Step 102: input the image to be tested into a pigmentation recognition model to determine the number of pigmentation blocks in the image to be tested through the pigmentation recognition model.
[0039] Step 103, for each pigmentation block in the image to be tested, determine the left end starting pixel position, the right end pixel position and the maximum horizontal span of the pigmentation block.
[0040] Step 104, determining the top starting pixel position, the bottom ending pixel position and the maximum vertical span of the pigmentation block.
[0041] Step 105, determining the area of the regional contour of each pigmentation block according to the left end starting pixel position, the right end pixel position, the horizontal maximum span, the top starting pixel position, the bottom end pixel position and the vertical maximum span of the pigmentation block.
[0042] Step 106, determining the image space area of the regional contour of each pigmentation block according to the regional contour area of each pigmentation block.
[0043] Step 107, determining the actual area of each pigmentation block according to the spatial area of the regional contour image of each pigmentation block.
[0044] The processor can obtain the image to be tested through the image acquisition device, and the image to be tested can be a user's face image or a skin image of other body parts, etc. The image acquisition device refers to a device with an image acquisition function. For example, a camera, a camcorder, a scanner, and other devices with a camera function such as mobile phones and tablets. Among them, the image receiving sensor size of the optical lens module and the vertical and horizontal distribution of pixels, as well as the size of the pixel unit determine the technical indicators of the detection function characteristics of the lens. The image acquisition device in this solution has an optical lens module with an automatic focusing function. First, the focal length of the lens is automatically adjusted so that the object to be tested is perfectly imaged on the sensor plane of the receiving element, and the distance from the object to be tested to the lens (object distance) and the distance from the lens to the receiving plane (image distance) are accurately measured, and the imaging ratio of the lens is indirectly obtained as the technical basis for implementing this solution. An optical lens module system and operation control driving main control software, an image sensor, a touch-controlled human-machine interface display screen, a pigmentation block image recognition algorithm (1), a screen pixel distance measurement algorithm (2), a screen target area measurement algorithm (3), a screen target quantity statistics algorithm (4), and a target color difference measurement algorithm (5) are used to construct a skin pigmentation block non-contact testing system device, which is characterized by the connection between the various parts.
[0045] The key characteristic indicators of objective data evaluation of pigmentation block test are: quantity, area and color difference with the standard. Therefore, after obtaining the image to be tested, the processor can input the image to be tested into the pigmentation recognition model to determine the number of pigmentation blocks in the image to be tested through the pigmentation recognition model. Then, for each pigmentation block in the image to be tested, the left end starting pixel position, the right end pixel position and the maximum horizontal span of the pigmentation block are determined. The top starting pixel position, the bottom end pixel position and the maximum vertical span of the pigmentation block can also be determined. Then, the area contour area of each pigmentation block can be determined according to the left end starting pixel position, the right end pixel position, the maximum horizontal span, the top starting pixel position, the bottom end pixel position and the maximum vertical span of the pigmentation block. Further, in one embodiment, the area covered by the rectangular frame constructed by the horizontal maximum span and the vertical maximum span can be used as the area contour area of the measured plaque. Then, the image space area of the regional outline of each pigmentation block can be determined according to the regional outline area of each pigmentation block, and the actual area of the pigmentation block can be determined according to the image space area of the regional outline of each pigmentation block.
[0046] In one embodiment, determining the image space area of each pigmentation block area contour according to the area contour area of each pigmentation block includes: multiplying the area contour area of each pigmentation block by the percentage of the real area of the plaque texture in the contour area and then multiplying by the area of each pixel unit to obtain the image space area of each pigmentation block area contour. Specifically, the image of the area contour area can be converted into a bitmap with the real area of the plaque texture as black and the remaining area as white, and the percentage of the total number of black and white pixels occupied by black pixels is taken as the effective proportion. The effective proportion can be determined as the percentage of the real area of the plaque texture in the contour area.
[0047] Specifically, this method can be called the screen target area measurement algorithm. Screen target area measurement algorithm: For a piece of target area to be measured, first use a rectangular frame with a maximum span of not less than the horizontal and vertical lengths to surround the target area to be measured, record the horizontal and vertical pixel numbers and capture the image of the enclosed area, and convert the captured image into a bitmap (the bitmap mode only uses one of the two colors, black and white, to represent the pixels in the image. The image in the bitmap mode is also called a black and white image) and convert it into a black and white binary value. Statistically calculate the percentage of black and white pixels, where the percentage of black pixels represents the percentage of the target area in the entire picture, and then count the horizontal and vertical pixels of the regional image to convert the total area of the image space; finally, the actual area of the target to be measured is converted according to the total number of regional pixels, the area percentage and the lens imaging ratio.
[0048] Furthermore, if the contour areas of two or more patches overlap during the measurement process, it is necessary to filter out the number of black pixels generated by adjacent patches enclosed in the contours of adjacent overlapping areas that are not associated with the main patches that generate the maximum horizontal and vertical spans when performing black-and-white binary bitmap conversion, so as to distinguish whether the adjacent patches are connected to the main patch currently being measured.
[0049] In one embodiment, determining the actual area of the pigmentation block based on the image space area of the regional outline of each pigmentation block includes: multiplying the image space area of the regional outline of each pigmentation block by the effective proportion to determine the actual image space area of the pigmentation block; and multiplying the actual image space area of each pigmentation block by the square of the imaging ratio of the lens module to determine the actual area of each pigmentation block.
[0050] In one embodiment, the method also includes: determining the color difference of each pigmentation block; for any pigment pixel contained in each patch, firstly performing green filtering on the pigment pixel to clear the green spectral component of the pigment pixel, and then performing blue filtering on the pigment pixel to clear the blue spectral component of the pigment pixel, and finally determining the red spectral component R of each pigment pixel; secondly performing red filtering on the pigment pixel to clear the red spectral component of the pigment pixel, and then performing blue filtering on the pigment pixel to clear the blue spectral component of the pigment pixel, and finally determining the green spectral component G of each pigment pixel; then performing red filtering on the pigment pixel to clear the red spectral component of the pigment pixel, and then performing green filtering on the pigment pixel to clear the green spectral component of the pigment pixel, and finally determining the blue spectral component B of each pigment pixel; determining the color coordinates corresponding to each pixel included in each pigmentation block according to the red spectral component R, green spectral component G and blue spectral component B of each pigment pixel, and determining the color difference of each pigmentation block by the Euclidean distance in the LAB color space.
[0051] The target color difference measurement algorithm belongs to the color material subtractive method. Among them, the three primary colors of color light refer to red, green and blue, and the corresponding wavelengths are 700nm, 546.1nm, 435.8nm respectively, and the central wavelength of yellow light is 570nm. The three primary colors of the object to be measured can present various light colors when mixed in a certain proportion. According to the research results of Thomas Young and Helmholtz: these three primary colors are determined to be red, green and blue. Various color states in nature can be produced by mixing these three primary colors in different proportions and strengths. For the target color block to be measured, the red component is tested first. In one embodiment, for each pigmentation block in the picture to be tested, the color difference of each pigmentation block is determined using a color difference measurement model, including:
[0052] Step 1: for each pigmentation block pixel contained in each pigmentation block, perform green filtering on the pigmentation block pixel to clear the green spectral component of the pigmentation block pixel, and then perform blue filtering on the pigmentation block pixel to clear the blue spectral component of the pigmentation block pixel, and finally determine the red spectral component R of each pigmentation block pixel;
[0053] Step 2: for each pigmentation block pixel contained in each pigmentation block, perform red filtering on the pigmentation block pixel to clear the red spectral component of the pigmentation block pixel, and then perform blue filtering on the pigmentation block pixel to clear the blue spectral component of the pigmentation block pixel, and finally determine the green spectral component G of each pigmentation block pixel;
[0054] Step 3: For each pigmentation block pixel contained in each pigmentation block, perform red filtering on the pigmentation block pixel to clear the red spectral component of the pigmentation block pixel, and then perform green filtering on the pigmentation block pixel to clear the green spectral component of the pigmentation block pixel, and finally determine the blue spectral component of each pigmentation block pixel. The LAB color space (as shown in the figure) is a three-dimensional space coordinate based on the human eye's perception of color, which can represent all colors that the human eye can perceive. L represents lightness, A represents red-green difference, and B represents blue-yellow difference.
[0055] The meaning of three basic coordinates:
[0056] 1. Lightness of the color (L*, L*=0 produces black and L*=100 indicates white);
[0057] 2. Position between red / magenta and green (negative a* values indicate green and positive values indicate magenta);
[0058] 3. Position between yellow and blue (negative b* values indicate blue and positive b* values indicate yellow).
[0059] CIELAB is a uniform color space, so-called uniformity means that when the value changes uniformly, the human sense also changes uniformly. Uniform changes in the L*a*b* model correspond to uniform changes in perceived color. Therefore, the relative perceived difference between any two colors in L*a*b* can be approximated by treating each color as a point in a three-dimensional space (with three components: L*, a*, b*) and calculating the Euclidean distance between them.
[0060] The Euclidean distance between two colors in L*a*b* space is ΔE (“Delta E”, ΔE*ab).
[0061]
[0062] The color difference of each pigmentation block can then be determined based on the Euclidean distance.
[0063] In one embodiment, the method further includes: before inputting the image to be tested into the pigmentation recognition model, training the pigmentation recognition model using a preset number of facial image samples; when the prediction accuracy of the pigmentation recognition model reaches a preset accuracy threshold, determining that the pigmentation recognition model training is completed, wherein the preset number is greater than 10.
[0064] In order to improve the prediction accuracy of the model, the model can be trained in advance. Specifically, at least 10 facial pigmentation block image specimens determined by humans are prepared in advance, the recognition features are measured and summarized, and then recognition tests, learning, improvement and updates are carried out. When the pigmentation recognition accuracy is gradually achieved to be no less than 90%, it can be determined that the model has completed training and can be put into practical use.
[0065] In a specific embodiment, Figure 2 The schematic diagram of color differentiation according to an embodiment of the present invention is schematically shown. Figure 3-5 The schematic diagram of the pigmentation plaque shown in the figure, the image acquisition device uses a 1 / 1.65-inch image sensor, the effective diagonal length is 9.72mm, converted to the frame aspect ratio of 3 / 4, the actual size of the image sensor can be obtained to be 7.78x5.83mm, the pixel array is 3648 (H) × 2736 (V), and the pixel scale is 2.13um. The measurement data of the two pigmentation plaques are: ① Color difference 2.7, area 3.6cm 2 ;② Color difference 1.8, area 4.7cm 2 .
[0066] The non-contact test method for skin pigmentation is to obtain the image to be tested through an image acquisition device, input the image to be tested into a pigmentation recognition model, and determine the number of pigmentation blocks in the image to be tested through the pigmentation recognition model. For each pigmentation block in the image to be tested, determine the left end starting pixel, right end pixel position and horizontal maximum span of the pigmentation block, determine the top starting pixel position, bottom end pixel position and vertical maximum span of the pigmentation block, determine the area contour area of each pigmentation block according to the left end starting pixel position, right end pixel position, horizontal maximum span, top starting pixel position, bottom end pixel position and vertical maximum span of the pigmentation block, determine the image space area of the area contour of each pigmentation block according to the area contour area of each pigmentation block, and determine the actual area of the pigmentation block according to the image space area of the area contour of each pigmentation block. For each pigmentation block in the image to be tested, determine the color difference of each pigmentation block using a color difference measurement model. This method can be used to detect pigmentation spots, one of the skin surface defects, in a safe, efficient and non-contact manner, quickly, efficiently and accurately, providing a nearly perfect solution for the detection of pigmentation spots. The intrinsically safe product provided can give a fair and objective evaluation of the pigmentation spot data.
[0067] The processor includes a kernel, and the kernel retrieves the corresponding program unit from the memory. One or more kernels can be provided, and the above-mentioned non-contact test method for skin pigmentation can be realized by adjusting kernel parameters.
[0068] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0069] An embodiment of the present invention provides a storage medium on which a program is stored. When the program is executed by a processor, the non-contact testing method for skin pigmentation is implemented.
[0070] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes the above-mentioned non-contact testing method for skin pigmentation when running.
[0071] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor A01, a network interface A02, a memory (not shown in the figure) and a database (not shown in the figure) connected via a system bus. Among them, the processor A01 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes an internal memory A03 and a non-volatile storage medium A04. The non-volatile storage medium A04 stores an operating system B01, a computer program B02 and a database (not shown in the figure). The internal memory A03 provides an environment for the operation of the operating system B01 and the computer program B02 in the non-volatile storage medium A04. The database of the computer device is used to store data such as skin pictures. The network interface A02 of the computer device is used to communicate with an external terminal through a network connection. When the computer program B02 is executed by the processor A01, a non-contact testing method for skin pigmentation is implemented.
[0072] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0073] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, steps of a non-contact testing method for skin pigmentation are implemented.
[0074] The present application also provides a computer program product which, when executed on a data processing device, is suitable for executing a program for initiating the steps of a non-contact test method for skin pigmentation.
[0075] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0076] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0077] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0078] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0079] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0080] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0081] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0082] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0083] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A non-contact measurement method for skin pigmentation, characterized in that: The method comprises: Acquire the image to be tested through the image acquisition device; Inputting the image to be tested into a pigmentation recognition model to determine the number of pigmentation blocks in the image to be tested through the pigmentation recognition model; For each pigmentation block in the image to be tested, determine the left end starting pixel, the right end pixel position and the maximum horizontal span of the pigmentation block; Determine the top starting pixel, bottom ending pixel position and vertical maximum span of the pigmentation block; Determine the area of the regional contour of each pigmentation block according to the left end starting pixel position, the right end pixel position, the maximum horizontal span of the pigmentation block, the top starting pixel position, the bottom end pixel position and the maximum vertical span of the pigmentation block; Determine the image space area of each pigmentation area contour according to the contour area of each pigmentation area; According to the spatial area of each pigmented area contour image, the actual area of pigmentation is determined; Determining the image space area of each pigmentation area contour according to the area of each pigmentation area contour includes: multiplying the area of each pigmentation area contour by the percentage of the actual area of the pigmentation texture within the contour area and then multiplying by the area of each pixel unit to obtain the image space area of each pigmentation area contour; After converting the image of the regional contour area into black and white binary, with the real area of the pigmentation texture being black and the rest of the area being white, the percentage of black pixels to the total number of black and white pixels is taken as the effective percentage; the effective percentage is determined as the percentage of the real area of the pigmentation texture within the contour area; Determining the actual area of pigmentation based on the image space area of each pigmentation area outline includes: multiplying the image space area of each pigmentation area outline by the effective ratio to determine the actual image space area of the pigmentation; and multiplying the actual image space area of each pigmentation by the square of the lens module imaging ratio to determine the actual area of each pigmentation.
2. The method according to claim 1, characterized in that Determining the area contour of each pigmentation block according to the left end starting pixel position, the right end pixel position, the maximum horizontal span, the top starting pixel position, the bottom end pixel position and the maximum vertical span of the pigmentation block includes: The area covered by the rectangular frame constructed with the maximum horizontal span and the maximum vertical span is the outline area of the pigmentation area to be measured.
3. The method according to claim 1, characterized in that The method further comprises: If the contour areas of two or more pigmentations overlap during the measurement process, it is necessary to filter out the number of black pixels generated by the adjacent pigmentations enclosed in the contours of the adjacent overlapping areas that are not associated with the main pigmentation that generates the maximum horizontal and vertical spans when performing black and white binary bitmap conversion, so as to distinguish whether the adjacent pigmentations are connected to the main pigmentation currently being measured.
4. The method according to claim 1, characterized in that: The method further comprises: Determine the color difference of each pigmentation; For any pigment pixel contained in each pigmentation, firstly, green filtering is performed on the pigment pixel to clear the green spectral component of the pigment pixel, and then blue filtering is performed on the pigment pixel to clear the blue spectral component of the pigment pixel, and finally the red spectral component R of each pigment pixel is determined; Secondly, the pigment pixels are filtered in red to clear the red spectral component of the pigment pixels, and then the pigment pixels are filtered in blue to clear the blue spectral component of the pigment pixels, and finally the green spectral component G of each pigment pixel is determined; Then, the pigment pixels are subjected to red filtering to clear the red spectral component of the pigment pixels, and then the pigment pixels are subjected to green filtering to clear the green spectral component of the pigment pixels, and finally the blue spectral component B of each pigment pixel is determined; The color coordinates corresponding to each pixel included in each pigmentation are determined according to the red spectral component R, the green spectral component G and the blue spectral component B of each pigment pixel, and the color difference of each pigmentation block is determined by the Euclidean distance in the LAB color space.
5. A processor, characterized in that: The device is configured to perform the non-contact measurement method of skin pigmentation according to any one of claims 1 to 4.
6. A non-contact measuring device for skin pigmentation, characterized in that: Comprising a processor according to claim 5.
7. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, the processor is configured to perform the non-contact measurement method of skin pigmentation according to any one of claims 1 to 4.
