Skin texture detection method, apparatus, device, and storage medium

By acquiring images from multiple perspectives and calculating multi-dimensional features, a skin texture intensity map is generated, which solves the problem of inaccurate skin texture detection in existing technologies and achieves comprehensive and accurate skin texture detection.

CN116128852BActive Publication Date: 2026-04-28XIAMEN MEITUEVE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN MEITUEVE TECH CO LTD
Filing Date
2023-02-21
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing skin texture detection methods are often based on a single perspective and cannot comprehensively and accurately reflect the state of skin texture.

Method used

By acquiring multi-view images of the face to be detected, multiple sets of key facial feature points and multiple mask maps of the regions to be analyzed are determined. Multi-dimensional skin texture feature values ​​are calculated, skin texture intensity maps are generated, and skin texture feature statistics are performed to finally determine the target skin texture parameters of the face to be detected.

Benefits of technology

It enables skin texture detection from multiple perspectives and dimensions, reduces the error of single-view or local area analysis, and improves the accuracy of detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116128852B_ABST
    Figure CN116128852B_ABST
Patent Text Reader

Abstract

The application provides a skin texture detection method and device, equipment and a storage medium, and relates to the technical field of image processing. The method comprises the following steps: acquiring multiple-view images of a face to be detected, determining multiple sets of face key feature points, acquisition images of multiple analysis regions and mask images; determining skin texture intensity maps of each analysis region according to the multiple sets of face key feature points, the acquisition images of each analysis region and the mask images; performing skin texture feature statistics on the skin texture intensity maps of each analysis region according to the mask images of each analysis region, obtaining skin texture feature values of each analysis region in multiple dimensions; determining skin texture parameters of each analysis region according to the skin texture feature values of each analysis region in multiple dimensions; and determining target skin texture parameters of the face to be detected according to the skin texture parameters of the multiple analysis regions. The application can comprehensively and accurately detect skin texture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically, to a method, apparatus, device, and storage medium for skin texture detection. Background Technology

[0002] Skin texture is a biological characteristic of the human epidermis. As people's quality of life improves, they are paying more and more attention to skin quality, especially facial skin quality.

[0003] As human skin ages physiologically, the texture of facial skin often changes from delicate, soft, and shiny to rough, dry, loose, and dull. Analyzing the state of facial skin texture can reflect the health of the skin.

[0004] However, existing skin texture detection methods often detect skin texture from a single perspective and have a single evaluation index, which cannot comprehensively and accurately reflect the state of skin texture. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of the prior art by providing a skin texture detection method, apparatus, device, and storage medium, so as to comprehensively and accurately detect skin texture.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:

[0007] In a first aspect, embodiments of this application provide a skin texture detection method, the method comprising:

[0008] Based on the multi-view images of the face to be detected, multiple sets of key facial feature points, multiple images of the regions to be analyzed, and mask images of the multiple regions to be analyzed are determined.

[0009] Based on the multiple sets of key facial feature points, the acquired image of each region to be analyzed, and the mask image of each region to be analyzed, the skin texture intensity map of each region to be analyzed is determined;

[0010] Based on the mask map of each region to be analyzed, skin texture feature statistics are performed on the skin texture intensity map of each region to be analyzed to obtain skin texture feature values ​​of each region to be analyzed in multiple dimensions.

[0011] Based on the skin texture feature values ​​of each region to be analyzed in the multiple dimensions, the skin texture parameters of each region to be analyzed are determined;

[0012] Based on the skin texture parameters of the multiple regions to be analyzed, the target skin texture parameters of the face to be detected are determined.

[0013] Optionally, determining the skin texture intensity map of each region to be analyzed based on the multiple sets of facial key feature points, the acquired image of each region to be analyzed, and the mask image of each region to be analyzed includes:

[0014] Based on the acquired image of the region to be analyzed, a grayscale image of the region to be analyzed is generated;

[0015] Based on the multiple sets of key facial feature points and the grayscale image of the region to be analyzed, a Gaussian difference map of the region to be analyzed is generated.

[0016] Based on the Gaussian difference map and the mask map of the region to be analyzed, a skin texture intensity map of the region to be analyzed is generated.

[0017] Optionally, generating a Gaussian difference map of the region to be analyzed based on the multiple sets of facial key feature points and the grayscale image of the region to be analyzed includes:

[0018] Calculate the facial length parameter based on multiple feature point pairs from the multiple sets of facial key feature points;

[0019] Calculate the Gaussian difference kernel function based on the facial length parameter;

[0020] Based on the Gaussian difference kernel function and the grayscale image of the region to be analyzed, a Gaussian difference map of the region to be analyzed is generated.

[0021] Optionally, determining the skin texture parameters of the region to be analyzed based on the skin texture feature values ​​of the region to be analyzed in the multiple dimensions includes:

[0022] Based on the target fitting function corresponding to the skin texture feature value of each dimension and the skin texture feature value of each dimension, calculate the transformation feature value of each dimension;

[0023] The skin texture parameters of the region to be analyzed are calculated by linearly combining the transformation feature values ​​of the multiple dimensions.

[0024] Optionally, before calculating the transformation feature value of each dimension based on the target fitting function corresponding to the skin texture feature value of each dimension and the skin texture feature value of each dimension, the method further includes:

[0025] Multiple sample facial images are acquired, and the multiple sample facial images are pre-annotated with facial reference evaluation parameters and region reference evaluation parameters of the multiple regions to be analyzed.

[0026] Calculate the multi-dimensional sample skin texture feature values ​​of the region to be analyzed in the multiple sample facial images;

[0027] Based on the preset fitting function corresponding to the sample skin texture feature value of each dimension, calculate the sample transformation feature value of each dimension;

[0028] Based on the sample transformation feature values ​​of the multiple dimensions and the preset linear combination function, the regional sample evaluation parameters of the region to be analyzed are calculated.

[0029] Calculate facial sample evaluation parameters based on the sample evaluation parameters of the multiple regions to be analyzed;

[0030] Based on the region reference evaluation parameters, the region sample evaluation parameters, the face reference evaluation parameters, and the region reference evaluation parameters, the preset fitting function for each dimension is iterated to determine the fitting function with the smallest loss value as the target fitting function for each dimension.

[0031] Optionally, the multi-dimensional skin texture feature values ​​include: the number of skin texture lines; the step of performing skin texture feature statistics on the skin texture intensity map of the region to be analyzed based on the mask map of the region to be analyzed, to obtain the multi-dimensional skin texture feature values ​​of the region to be analyzed, includes:

[0032] The skin texture intensity map of the region to be analyzed is binarized to obtain a binarized image;

[0033] Perform connected component analysis on the binarized image to determine at least one connected component;

[0034] Iterate through each pixel in each connected component and determine the type of each pixel based on the set of its neighboring nodes.

[0035] Based on the type of each pixel in the at least one connected component, count the number of skin texture lines in the region to be analyzed.

[0036] Optionally, the step of traversing each pixel in each connected component and determining the type of each pixel based on its set of neighboring pixels includes:

[0037] If the number of neighboring points included in a pixel is 0 or 1, the pixel is determined to be an endpoint;

[0038] If the number of neighboring points included in a pixel is 2, then the pixel is determined to be the middle point;

[0039] If the number of neighboring points included in a pixel is greater than or equal to 3, the pixel is determined to be an intersection point.

[0040] Optionally, the step of counting the number of skin texture lines in the region to be analyzed based on the type of each pixel in the at least one connected component includes:

[0041] If the number of intersection points in each connected component is 0, then each connected component is determined to have a skin texture.

[0042] If the number of intersection points in each connected component is greater than or equal to 1, traverse each intersection point, determine the set of adjacent points of each adjacent point in the set of adjacent points of each intersection point, generate the set of adjacent edges of each intersection point, and each adjacent edge in the set of adjacent edges takes each intersection point as the starting point and the intersection point or endpoint of the last set of adjacent points as the ending point.

[0043] Based on the incident angle and exit angle of each adjacent edge, at least two adjacent edges in the same direction are designated as adjacent edges in the same direction.

[0044] The number of skin texture lines in each connected component is determined based on the number of adjacent edges in the same direction and the number of other independent adjacent edges;

[0045] The number of skin texture lines in the region to be analyzed is determined based on the number of skin texture lines in the at least one connected component.

[0046] Secondly, embodiments of this application also provide a skin texture detection device, the device comprising:

[0047] The image acquisition and processing module is used to determine multiple sets of key facial feature points, multiple acquisition images of regions to be analyzed, and mask images of the multiple regions to be analyzed based on multi-view acquired images of the face to be detected.

[0048] The skin texture enhancement module is used to determine the skin texture intensity map of each region to be analyzed based on the multiple sets of facial key feature points, the acquired map of each region to be analyzed, and the mask map of each region to be analyzed.

[0049] The texture feature statistics module is used to perform skin texture feature statistics on the skin texture intensity map of each region to be analyzed based on the mask map of each region to be analyzed, so as to obtain the skin texture feature values ​​of each region to be analyzed in multiple dimensions.

[0050] The region parameter calculation module is used to determine the skin texture parameters of each region to be analyzed based on the skin texture feature values ​​of each region to be analyzed in multiple dimensions.

[0051] The facial parameter calculation module is used to determine the target skin texture parameters of the face to be detected based on the skin texture parameters of the multiple regions to be analyzed.

[0052] Optionally, the skin texture enhancement module includes:

[0053] A grayscale image generation unit is used to generate a grayscale image of the region to be analyzed based on the acquired image of the region to be analyzed.

[0054] The Gaussian difference map generation unit is used to generate a Gaussian difference map of the region to be analyzed based on the multiple sets of facial key feature points and the grayscale image of the region to be analyzed.

[0055] The intensity map generation unit is used to generate a skin texture intensity map of the region to be analyzed based on the difference of Gaussians map of the region to be analyzed and the mask map of the region to be analyzed.

[0056] Optionally, the Gaussian difference map generation unit includes:

[0057] The length parameter calculation subunit is used to calculate the facial length parameter based on multiple feature point pairs in the multiple sets of facial key feature points;

[0058] The kernel function calculation subunit is used to calculate the difference of Gaussians kernel function based on the face length parameter;

[0059] The Gaussian difference map generation subunit is used to generate a Gaussian difference map of the region to be analyzed based on the Gaussian difference kernel function and the grayscale image of the region to be analyzed.

[0060] Optionally, the regional parameter calculation module includes:

[0061] The transformation feature value calculation unit is used to calculate the transformation feature value of each dimension based on the target fitting function corresponding to the skin texture feature value of each dimension and the skin texture feature value of each dimension.

[0062] The region parameter calculation unit is used to linearly combine the transformation feature values ​​of the multiple dimensions to calculate the skin texture parameters of the region to be analyzed.

[0063] Optionally, before the transformation feature value calculation unit, the device further includes:

[0064] The sample image acquisition module is used to acquire multiple sample facial images, which are pre-annotated with facial reference evaluation parameters and region reference evaluation parameters of the multiple regions to be analyzed.

[0065] The sample feature value calculation module is used to calculate the multi-dimensional sample skin texture feature values ​​of the region to be analyzed in the multiple sample facial images;

[0066] The sample transformation feature value calculation module is used to calculate the sample transformation feature value for each dimension based on the preset fitting function corresponding to the sample skin texture feature value for each dimension.

[0067] The regional sample evaluation parameter calculation module is used to calculate the regional sample evaluation parameters of the region to be analyzed based on the sample transformation feature values ​​of the multiple dimensions and the preset linear combination function.

[0068] The facial sample evaluation parameter calculation module is used to calculate facial sample evaluation parameters based on the sample evaluation parameters of the multiple regions to be analyzed.

[0069] The fitting function iteration module is used to iterate the preset fitting function for each dimension based on the region reference evaluation parameters, the region sample evaluation parameters, the face reference evaluation parameters, and the region reference evaluation parameters, and to determine the fitting function with the minimum loss value as the target fitting function for each dimension.

[0070] Optionally, the multi-dimensional skin texture feature values ​​include: the number of skin texture lines; the texture feature statistics module includes:

[0071] The binarization unit is used to binarize the skin texture intensity map of the region to be analyzed to obtain a binarized image;

[0072] A connected component determination unit is used to perform connected component analysis on the binarized image and determine at least one connected component.

[0073] The pixel type determination unit is used to traverse each pixel in each connected component and determine the type of each pixel based on the set of adjacent points contained in each pixel.

[0074] The skin texture count unit is used to count the number of skin textures in the region to be analyzed based on the type of each pixel in the at least one connected component.

[0075] Optionally, the pixel type determination unit is specifically used to determine the pixel as an endpoint if the number of adjacent points included in the pixel set is 0 or 1; to determine the pixel as an intermediate point if the number of adjacent points included in the pixel set is 2; and to determine the pixel as an intersection point if the number of adjacent points included in the pixel set is greater than or equal to 3.

[0076] Optionally, the skin texture bar counting unit includes:

[0077] The first skin texture count subunit is used to determine that each connected component has a skin texture if the number of intersection points in each connected component is 0.

[0078] The adjacent edge determination subunit is used to traverse each intersection point if the number of intersection points in each connected component is greater than or equal to 1, determine the adjacent point set of each adjacent point in the adjacent point set of each intersection point, and generate the adjacent edge set of each intersection point. Each adjacent edge in the adjacent edge set takes each intersection point as its starting point and the intersection point or endpoint of the last adjacent point set as its ending point.

[0079] The same-direction adjacent edge determination sub-unit is used to determine at least two adjacent edges in the same direction as same-direction adjacent edges based on the incident angle and exit angle of each adjacent edge.

[0080] The second skin texture count subunit is used to determine the number of skin textures in each connected component based on the number of adjacent edges in the same direction and the number of other independent adjacent edges.

[0081] The regional skin texture count subunit is used to determine the number of skin textures in the region to be analyzed based on the number of skin textures in the at least one connected component.

[0082] Thirdly, embodiments of this application also provide a skin texture detection device, including: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the skin texture detection device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the skin texture detection method as described in any of the first aspects.

[0083] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the skin texture detection method as described in any of the first aspects.

[0084] The beneficial effects of this application are:

[0085] This application provides a skin texture detection method, apparatus, device, and storage medium. By acquiring multiple viewpoint images of the face to be detected, multiple regions to be analyzed are obtained from the multi-view acquired images. By calculating multi-dimensional skin texture feature values ​​of the skin texture of the multiple regions to be analyzed, the skin texture of the entire face to be detected is detected from multiple viewpoints and multi-dimensional indicators. This reduces the error of single viewpoint or local area analysis, realizes comprehensive and accurate detection of skin texture, and improves the accuracy of detection results. Attached Figure Description

[0086] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0087] Figure 1 A flowchart illustrating the skin texture detection method provided in this application embodiment. Figure 1 ;

[0088] Figure 2(a) is a mid-view skin mask diagram provided in an embodiment of this application;

[0089] Figure 2(b) is a skin mask diagram from the left perspective provided in an embodiment of this application;

[0090] Figure 2(c) is a skin mask diagram from the right perspective provided in an embodiment of this application;

[0091] Figure 3 Flowchart 2 of the skin texture detection method provided in the embodiments of this application;

[0092] Figure 4 A flowchart illustrating the skin texture detection method provided in this application embodiment. Figure 3 ;

[0093] Figure 5 A flowchart illustrating the skin texture detection method provided in this application embodiment. Figure 4 ;

[0094] Figure 6 A flowchart illustrating the skin texture detection method provided in this application embodiment. Figure 5 ;

[0095] Figure 7 A flowchart illustrating the skin texture detection method provided in this application embodiment. Figure 6 ;

[0096] Figure 8 A schematic diagram of the set of adjacent points;

[0097] Figure 9 A flowchart illustrating the skin texture detection method provided in this application embodiment. Figure 7 ;

[0098] Figure 10 A schematic diagram of an adjacent edge set;

[0099] Figure 11 This is a schematic diagram of adjacent edges in the same direction;

[0100] Figure 12This is a schematic diagram of the skin texture detection device provided in the embodiments of this application;

[0101] Figure 13 This is a schematic diagram of a skin texture detection device provided in an embodiment of this application. Detailed Implementation

[0102] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0103] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0104] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0105] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.

[0106] Before describing the skin texture detection method provided in the embodiments of this application, the skin texture detection device used in the embodiments of this application will be introduced first.

[0107] The skin texture detection device provided in this application embodiment, also known as a skin texture detector, can be composed of an image acquisition module and an image analysis module. The image acquisition module and the image analysis module can each be composed of two independent devices, namely a camera device and a computer device. The camera device and the computer device are communicatively connected. The camera device is used to acquire multi-view images of the target object's face and send the multi-view images to the computer device. The computer device executes the skin texture detection method of this application embodiment and detects the skin texture of the target object's face based on the multi-view images.

[0108] In one possible implementation, the camera device can be a standalone camera device. During the image acquisition process, different angles of the target object's face are directed toward the camera device to acquire multi-angle images of the target object's face to be detected.

[0109] In another possible implementation, the camera device can be composed of a multi-view camera device, which can acquire multi-view images of the target object's face without the target object being stationary.

[0110] In some embodiments, to improve the accuracy of skin texture detection, the skin texture detection device also includes a parallel polarized light source, which provides parallel polarized light to the face of the target object, so that the multi-view images acquired by the camera device can be parallel polarized light images.

[0111] Based on the aforementioned skin texture detection device, this application provides a skin texture detection method. Please refer to... Figure 1 This is a flowchart illustrating the skin texture detection method provided in the embodiments of this application. Figure 1 ,like Figure 1 As shown, the method may include:

[0112] S10: Based on the multi-view images of the face to be detected, determine multiple sets of key facial feature points, multiple acquisition images of the regions to be analyzed, and multiple mask images of the regions to be analyzed.

[0113] In this embodiment, a multi-view image Y is acquired by a camera device. The multi-view image Y includes left-view, center-view, and right-view images of the face to be detected. A facial key point detection algorithm is used to detect facial key points in each view image, determining multiple sets of facial key feature points. Each view image corresponds to one set of facial key feature points. For example, the multi-view image Y can be a multi-view parallel polarized light image.

[0114] A skin mask transformation algorithm is used to transform multi-view acquired images to determine a multi-view skin mask image M1. The skin mask image M1 is represented in the form of a binary image, with background pixel values ​​of 0 and skin region pixel values ​​of 1.

[0115] Based on a set of key facial feature points corresponding to the images acquired from each viewpoint, the required region to be analyzed is determined in the image acquired from that viewpoint, and the required mask image M2 for the region to be analyzed is determined in the skin mask image M1 for that viewpoint. The acquired images for multiple regions to be analyzed include: a mid-view forehead region acquired image, a mid-view left face region acquired image, a left-view left face region acquired image, a mid-view right face region acquired image, and a right-view right face region acquired image; the mask image M2 for multiple regions to be analyzed includes: a mid-view forehead region mask, a mid-view left face region mask, a left-view left face region mask, a mid-view right face region mask, and a right-view right face region mask.

[0116] For example, please refer to Figure 2(a), which is a mid-view skin mask provided in an embodiment of this application. As shown in Figure 2(a), the key facial feature points include: the upper edge of the forehead, the right brow peak, the right eyebrow, the bridge of the nose, the left eyebrow, the left brow peak, the right inner corner of the eye, the right outer corner of the eye, the intersection of the right ear and the face, the starting point of the right mandible, the right ala of the nose, the left inner corner of the eye, the left outer corner of the eye, the intersection of the left ear and the face, the starting point of the left mandible, and the left ala of the nose, which can be represented by points 0 to 15. Based on key feature points 0 to 5, a mask for the forehead region is determined in the mid-view skin mask; based on key feature points 6 to 10, a mask for the left face region is determined in the mid-view skin mask; and based on key feature points 11 to 15, a mask for the right face region is determined in the mid-view skin mask.

[0117] Please refer to Figure 2(b), which is a skin mask map of the left view provided in the embodiment of this application. As shown in Figure 2(b), the mask map of the left face region of the left view is determined in the skin mask map of the left view based on key feature points 6 to 10.

[0118] Please refer to Figure 2(c), which is a skin mask map of the right view provided in the embodiment of this application. As shown in Figure 2(c), the mask map of the right face region of the right view is determined in the skin mask map of the right view based on key feature points 11 to 15.

[0119] S20: Based on multiple sets of key facial feature points, the acquired image of each region to be analyzed, and the mask image of each region to be analyzed, determine the skin texture intensity map of each region to be analyzed.

[0120] In this embodiment, multiple sets of facial key feature points are used to perform Gaussian processing on the acquired image Y of the region to be analyzed, and the mask image M2 of the region to be analyzed is enhanced according to the texture in the Gaussian-processed image to generate a skin texture intensity map S. The skin texture intensity map S is used to represent textures with different intensities.

[0121] S30: Based on the mask map of each region to be analyzed, perform skin texture feature statistics on the skin texture intensity map of each region to be analyzed, and obtain the skin texture feature values ​​of each region to be analyzed in multiple dimensions.

[0122] In this embodiment, based on the grayscale values ​​of each pixel in the mask image M2 of each region to be analyzed, pixels with a grayscale value of 1 in the mask image are determined. The distribution of grayscale values ​​corresponding to each pixel in the skin texture intensity map S is then statistically analyzed to obtain the overall intensity histogram H. The overall intensity histogram H indicates the number of pixels with different grayscale values ​​in the skin texture intensity map S. Based on the number of pixels with each grayscale value, skin texture feature values ​​in multiple dimensions are calculated. For example, the number of pixels counted in the overall intensity histogram H is... Where H(i) is the number of pixels corresponding to each gray value i.

[0123] It should be noted that since the pixel value of the background area in the skin mask is 0 and the pixel value of the skin area is 1, the gray value of each pixel in the mask of the area to be analyzed is 1. Therefore, the distribution of each gray value in the skin texture intensity map can be directly statistically analyzed.

[0124] In one possible implementation, if n is greater than 0, skin texture feature values ​​in multiple dimensions can be calculated for each region to be analyzed. For example, the formulas for calculating the skin texture feature values ​​in each dimension are as follows:

[0125] Overall intensity mean μ1:

[0126] Mean groove strength μ2:

[0127] Mean ridge strength μ3:

[0128] Overall strength standard deviation σ1:

[0129] Standard deviation of groove strength σ2:

[0130] Standard deviation of ridge strength σ3:

[0131] Overall strength skewness

[0132] Overall intensity kurtosis

[0133] Total intensity entropy ε:

[0134] Skin groove area ratio ω1:

[0135] Skin crest area ratio ω2:

[0136] In addition, the multi-dimensional skin texture feature values ​​also include the number of skin grooves τ1 and the number of skin ridges τ2. The number of skin grooves τ1 is calculated as follows: in the skin texture intensity map S, pixels with a grayscale value less than 127 are set to 1, and the pixel values ​​of all other pixels are set to 0, resulting in a binary image. The number of skin grooves τ1 is then calculated using a preset counting algorithm. The number of skin ridges τ2 is calculated as follows: in the skin texture intensity map S, pixels with a grayscale value greater than or equal to 127 are set to 1, and the pixel values ​​of all other pixels are set to 0, resulting in a binary image. The number of skin ridges τ2 is then calculated using a preset counting algorithm.

[0137] The parts that exist in a crisscrossing pattern of depressions of varying depths are called skin grooves, and the parts that rise relative to the skin grooves are called skin ridges.

[0138] It should be noted that the process of determining the skin texture intensity map and multiple dimensions of skin texture feature values ​​described above requires performing this process on each region to be analyzed, i.e., obtaining multiple dimensions of skin texture feature values ​​for each region to be analyzed.

[0139] S40: Determine the skin texture parameters of each region to be analyzed based on the skin texture feature values ​​of each region in multiple dimensions.

[0140] In this embodiment, by using a preset calculation method, the skin texture feature values ​​of each region to be analyzed in multiple dimensions can be calculated, thereby determining the skin texture parameters of each region to be analyzed. The preset calculation method can be a simple weighted calculation method or a fitting algorithm.

[0141] S50: Determine the target skin texture parameters of the face to be detected based on the skin texture parameters of multiple regions to be analyzed.

[0142] In this embodiment, the skin texture parameters of multiple regions to be analyzed are weighted and summed to obtain the target skin evaluation parameters of the entire face to be detected.

[0143] For example, if the skin texture parameters for the forehead region (medium-angle view), left face region (medium-angle view), left face region (left-angle view), right face region (medium-angle view), and right face region (right-angle view) are s1, s2, s3, s4, and s5 respectively, then the target skin evaluation parameters for the face to be detected are: Among them, w i The weights for each region.

[0144] In some embodiments, w can be calculated through prior analysis or regression fitting. i ,ensure It equals 1.

[0145] The skin texture detection method provided in the above embodiments acquires multiple viewpoint images of the face to be detected, thereby obtaining multiple regions to be analyzed from the multi-viewpoint images. By calculating multi-dimensional skin texture feature values ​​of the skin texture of the multiple regions to be analyzed, the skin texture of the entire face to be detected is detected from multiple viewpoints and multi-dimensional indicators. This reduces the error of single viewpoint or local area analysis, achieves comprehensive and accurate detection of skin texture, and improves the accuracy of the detection results.

[0146] The following combination Figure 3 One possible implementation of the skin texture enhancement map for determining the region to be analyzed is described above.

[0147] Please refer to Figure 3 This is a schematic flowchart of the skin texture detection method provided in this application embodiment, as shown in Figure 2. Figure 3 As shown, the above S20 may include:

[0148] S21: Generate a grayscale image of the region to be analyzed based on the acquired image of the region to be analyzed.

[0149] In this embodiment, the acquired image of the region to be analyzed is an image in the RGB color space. By converting the acquired image from the RGB color space to the grayscale space, the grayscale image F of the region to be analyzed can be obtained.

[0150] For example, the conversion relationship can be F = 0.299Yr + 0.587Yg + 0.114Yb, where Yr, Yg, and Yb represent the values ​​of the acquired image Y in the R, G, and B channels, respectively, and the pixel values ​​of the grayscale image F are in the range of [0, 255].

[0151] S22: Generate a Gaussian difference map of the region to be analyzed based on multiple sets of key facial feature points and grayscale images of the region to be analyzed.

[0152] In this embodiment, a Gaussian difference kernel function is calculated based on the distance parameters between multiple sets of key facial feature points. The grayscale image of the region to be analyzed is then convolved with the Gaussian difference kernel function to generate a Gaussian difference image G of the region to be analyzed. The Gaussian difference image (DOG) is the result of low-pass filtering and noise reduction of the grayscale image of the region to be analyzed.

[0153] S23: Generate a skin texture intensity map of the region to be analyzed based on the difference of Gaussian map and the mask map of the region to be analyzed.

[0154] In this embodiment, the pixel intensity value of each pixel in the mask image M2 of the region to be analyzed is calculated based on the difference of Gaussian map G of the region to be analyzed, and the skin texture intensity map S of the region to be analyzed is generated.

[0155] For example, the formula for calculating the skin texture intensity value S can be expressed as:

[0156] S(x,y)=G(x,y)·I(G(x,y)≤-t or G(x,y)≥t)·M2(x,y)+127

[0157] Where t is a preset threshold parameter, and its value range is t∈(0,128), I represents the truth function, and its function value is 1 when the condition is met, otherwise it is 0, and "·" represents matrix multiplication by position.

[0158] In one possible implementation, please refer to Figure 4 This is a flowchart illustrating the skin texture detection method provided in the embodiments of this application. Figure 3 ,like Figure 4 As shown, the above S22 may include:

[0159] S221: Calculate the facial length parameter based on multiple feature point pairs from multiple sets of facial key feature points.

[0160] In this embodiment, at least one feature point pair is selected in each group of facial key feature points. At least one feature point pair indicates the feature point at the same position in multiple groups of facial key feature points. The facial length parameter is calculated based on the position parameters of multiple feature point pairs in images acquired from different viewpoints.

[0161] For example, in each group of facial key feature points, the feature point pairs (8, 13) and (9, 14) are selected. A total of 6 feature point pairs are formed from multiple groups of facial key feature points across three viewpoints. The coordinates of each feature point pair are (x, y, y). i1 y i1 ) and (x i2 y i2 If the facial length parameter d is 0, then the formula for calculating it can be:

[0162]

[0163] S222: Calculate the Gaussian difference kernel function based on the facial length parameter.

[0164] In this embodiment, the Gaussian standard deviation parameter σ is calculated based on the facial length parameter. a and σ b According to σ a and σ b Calculate the Gaussian difference kernel function based on the coordinates of each pixel.

[0165] For example, the Gaussian standard deviation parameter σ a and σ b It can be represented as: σ a =tanh(ad)+1, σ b =bσ a Where a and b are preset coefficients, where a∈(0,1) and b∈(1,+∞), the Gaussian difference kernel function can be expressed as:

[0166]

[0167] S223: Generate a Gaussian difference map of the region to be analyzed based on the Gaussian difference kernel function and the grayscale image of the region to be analyzed.

[0168] In this implementation, the difference of Gaussian kernel function is used to convolve the grayscale image F of the region to be analyzed, generating the difference of Gaussian image G of the region to be analyzed. For example, the convolution formula can be:

[0169]

[0170] The following combination Figure 5 One possible implementation method for calculating the skin texture parameters of the region to be analyzed is described above.

[0171] Please refer to Figure 5 This is a flowchart illustrating the skin texture detection method provided in the embodiments of this application. Figure 4 ,like Figure 5 As shown, the above S40 may include:

[0172] S41: Calculate the transformation feature value for each dimension based on the target fitting function corresponding to the skin texture feature value for each dimension and the skin texture feature value for each dimension.

[0173] In this embodiment, a target fitting function is pre-set for each dimension of skin texture feature value. The function type of the target fitting function corresponding to each dimension of skin texture feature value can be the same or different, but the parameters of the same type of target fitting function are different for skin texture feature values ​​of different dimensions.

[0174] The skin texture feature value of each dimension is input into the corresponding target fitting function to obtain the transformation feature value of each dimension.

[0175] For example, the target fitting function is generally a basic function, such as a linear function, a power function, or an exponential function, which are expressed as: f1(x) = ax b +c、f2(x)=ab x +c、f3(x)=ae bx+c+d, where x is the skin texture feature value and f(x) is the transformation feature value.

[0176] S42: Perform a linear combination of the transformation feature values ​​of multiple dimensions to calculate the skin texture parameters of the region to be analyzed.

[0177] In this embodiment, the transformation feature values ​​of multiple dimensions are combined into a vector v = [v1, v2, ..., v...]. n The weighted coefficient vector k = [k1, k2, ..., k] is based on the transformed feature values ​​of multiple dimensions. n The skin texture parameters of the region to be analyzed are obtained by linearly combining the transformation feature values ​​of multiple dimensions.

[0178] In some embodiments, a linear combination function f(t) = kv can be constructed based on the weight coefficient vector k of the transformed feature values ​​in multiple dimensions. T +b, where b is the intercept coefficient, solves for the linear combination function to determine the skin texture parameters of the region to be analyzed. For example, the linear combination function can be solved using the least squares method or the gradient descent method.

[0179] In one possible implementation, please refer to Figure 6 This is a flowchart illustrating the skin texture detection method provided in the embodiments of this application. Figure 5 ,like Figure 6 As shown, prior to S41 above, the method may further include:

[0180] S61: Acquire multiple sample facial images, which are pre-annotated with facial reference evaluation parameters and multiple region reference evaluation parameters for the areas to be analyzed.

[0181] In this embodiment, multiple sample facial images are acquired using a camera device. These sample facial images include parallel polarized light images of multiple faces from multiple viewpoints.

[0182] Each image was scored by multiple annotators based on the skin texture, with scores for multiple regions to be analyzed and the overall image scored separately. The regional and overall scores of the same image from multiple annotators were then averaged to determine the facial reference evaluation parameters and regional reference evaluation parameters for each sample facial image.

[0183] S62: Calculate the multi-dimensional sample skin texture feature values ​​of the region to be analyzed in multiple sample facial images.

[0184] In this embodiment, the sample skin texture features of multiple regions to be analyzed in multiple dimensions of each sample facial image are calculated in the same way as in S10 to S30 above. The specific implementation method can be referred to in S10 to S30 above, and will not be described in detail here.

[0185] S63: Calculate the sample transformation feature value for each dimension based on the preset fitting function corresponding to the sample skin texture feature value for each dimension.

[0186] In this embodiment, a preset fitting function is set for the sample skin texture feature value of each dimension, and the sample transformation feature value of each dimension is calculated according to the preset fitting function.

[0187] S64: Calculate the regional sample evaluation parameters of the region to be analyzed based on the sample transformation feature values ​​of multiple dimensions and the preset linear combination function.

[0188] In this embodiment, a vector composed of multiple sample transformation feature values ​​of multiple dimensions is input into a preset linear combination function to calculate the regional sample evaluation parameters of the region to be analyzed.

[0189] S65: Calculate facial sample evaluation parameters based on the sample evaluation parameters of multiple regions to be analyzed.

[0190] In this embodiment, the evaluation parameters of multiple regions to be analyzed are weighted and summed to obtain the facial sample evaluation parameters.

[0191] S66: Based on the regional reference evaluation parameters, regional sample evaluation parameters, facial reference evaluation parameters, and regional reference evaluation parameters, iterate the preset fitting function for each dimension to determine the fitting function with the minimum loss value as the target fitting function for each dimension.

[0192] In this embodiment, a loss function is calculated based on the region reference evaluation parameters, region sample evaluation parameters, facial reference evaluation parameters, and region reference evaluation parameters. The preset fitting function for each dimension is then iterated based on the loss function. When the loss value reaches its minimum, the iteratively obtained fitting function is the target fitting function. For example, the loss function can be calculated using the sum of squared errors.

[0193] In some embodiments, during the iteration process, it is also necessary to iterate the preset linear fitting function and the weight parameters of the sample evaluation parameters of multiple regions to be analyzed to obtain the target linear fitting function and the target weight parameters.

[0194] The skin texture detection method provided in the above embodiments calculates multi-dimensional transformation feature values ​​using a target fitting function corresponding to multi-dimensional skin texture feature values, and performs linear fitting on the multi-dimensional transformation feature values ​​to calculate the skin texture parameters of the region to be analyzed. This can improve the accuracy of the calculation results and the precision of skin texture detection.

[0195] In one possible implementation, multi-dimensional skin texture feature values ​​include: the number of skin texture lines. The following combines... Figure 7This paper describes one possible implementation method for counting skin texture lines.

[0196] In one possible implementation, please refer to Figure 7 This is a flowchart illustrating the skin texture detection method provided in the embodiments of this application. Figure 6 ,like Figure 7 As shown, the above S30 includes:

[0197] S31: Binarize the skin texture intensity map of the region to be analyzed to obtain a binarized image.

[0198] In this embodiment, the number of skin texture lines is divided into the number of skin grooves and the number of skin ridges. Based on the number of skin grooves or skin ridges to be calculated, the skin texture intensity map of the area to be analyzed is converted into a binary image.

[0199] In one possible implementation, if the number of skin grooves is calculated, the pixel values ​​of pixels with a gray value less than 127 in the skin texture intensity map S are set to 1, and the pixel values ​​of the remaining pixels are set to 0, thus obtaining a binarized image.

[0200] In another possible implementation, if the number of skin ridges is calculated, the pixel values ​​of pixels with a gray value greater than or equal to 127 in the skin texture intensity map S are set to 1, and the pixel values ​​of the remaining pixels are set to 0, thus obtaining a binarized image.

[0201] S32: Perform connected component analysis on the binarized image to determine at least one connected component.

[0202] In this embodiment, a preset connected component analysis algorithm is used to perform connected component analysis on the binarized image to obtain connected component analysis results. The connected component analysis results include at least one connected component, and different labels are used to represent different connected components.

[0203] For example, the connected component analysis algorithm can be the Two-pass algorithm, the Seed Filling algorithm, etc., and this embodiment does not limit it.

[0204] In one possible implementation, in order to reduce the computational cost of counting skin texture lines and reduce the number of pixels that need to be traversed during connected component analysis and subsequent neighbor set traversal, a skeleton extraction algorithm is used to extract the skeleton of the binarized image before connected component analysis to obtain a skeleton map. Connected component analysis is then performed on the skeleton map to determine at least one connected component.

[0205] For example, the skeleton extraction algorithm can be the Zhang-Suen algorithm, the Lee algorithm, etc., and this embodiment does not limit it.

[0206] S33: Traverse each pixel in each connected component and determine the type of each pixel based on the set of adjacent pixels it contains.

[0207] In this embodiment, each pixel in each connected component is traversed. For each pixel, the set of adjacent points in the neighborhood is determined based on the adjacent points within the 8-neighborhood range. The type of each pixel is determined based on the number of adjacent points in the set of each pixel.

[0208] In one possible implementation, if a pixel contains 0 or 1 neighboring points, the pixel is determined to be an endpoint; if a pixel contains 2 neighboring points, the pixel is determined to be an intermediate point; if a pixel contains 3 or more neighboring points, the pixel is determined to be an intersection point.

[0209] For example, please refer to Figure 8 , is a schematic diagram of the set of adjacent points, such as Figure 8 As shown, point 0 is the current pixel. Points 1-8, numbered clockwise from 12 o'clock, constitute the 8-neighborhood of point 0. If any of points 1-8 has a pixel value of 1, that point is determined to be an adjacent point of point 0. For all adjacent points of point 0, the set of independent or interconnected adjacent points that are not connected to other adjacent points is taken as the adjacent point set.

[0210] like Figure 8 As shown in (a), point 0 has no adjacent points within its 8-neighborhood, so the set of adjacent points is 0, and point 0 is the endpoint; Figure 8 As shown in (b), point 0 has one adjacent point 4, which forms an adjacent point set. The number of adjacent points in the set is 1. Points 0 and 4 form a line segment, with point 0 being one endpoint of the line segment. Figure 8 As shown in (c), point 0 has 3 adjacent points 1, 5, and 8. Points 1 and 8 are connected to form an adjacent point set, while point 5 forms its own adjacent point set. Therefore, the number of adjacent point sets is 2. Points 1 and 5 form a line segment, and point 0 is the midpoint of this line segment. Figure 8 As shown in (d), point 0 has 4 adjacent points 1, 3, 5, and 8. Among them, 1 and 8 are connected to form an adjacent point set, 3 forms an adjacent point set by itself, and the number of adjacent point sets is 3. Points 1 and 5 form a line segment, and points 0 and 3 form a line segment. Point 0 is the intersection point of the two line segments.

[0211] S34: Based on the type of each pixel in at least one connected component, count the number of skin texture lines in the region to be analyzed.

[0212] In this embodiment, the number of pixels of each type in each connected component is counted to determine the number of skin texture lines in each connected component. Based on the number of skin texture lines in at least one connected component, the number of skin texture lines in each region to be analyzed is determined.

[0213] In one possible implementation, S24 above includes: if the number of intersection points in each connected component is 0, determining that each connected component has a skin texture.

[0214] In this embodiment, if the number of intersection points on a connected component is 0, the connected component may be a loop, an isolated point, or a line, and the connected component is treated as a skin texture.

[0215] In one possible implementation, please refer to Figure 9 This is a flowchart illustrating the skin texture detection method provided in the embodiments of this application. Figure 7 ,like Figure 9 As shown, S34 above includes:

[0216] S341: If the number of intersection points in each connected component is greater than or equal to 1, traverse each intersection point, determine the set of adjacent points of each adjacent point in the set of adjacent points of each intersection point, generate the set of adjacent edges of each intersection point, and each adjacent edge in the set of adjacent edges takes each intersection point as its starting point and the intersection point or endpoint of the last set of adjacent points as its ending point.

[0217] In this embodiment, if each connected component has at least one interaction point, then each intersection point is traversed to determine the set of adjacent points of each intersection point. The adjacent points in the set of adjacent points of each interaction point are traversed again to determine the set of adjacent points of each adjacent point. Depth traversal is performed continuously. If the adjacent point is determined to be an endpoint or an intersection point based on the set of adjacent points of the adjacent point, then the depth traversal of the adjacent point ends. If the adjacent point is an intermediate point, then the adjacent points in the set of adjacent points of the adjacent point continue to be traversed until an endpoint or intersection point is reached, then the traversal stops.

[0218] According to the traversal order and the points visited, starting from the intersection point, determine the adjacent edges formed by the intersection point and other intersection points or endpoints, and obtain the set of adjacent edges for each intersection point. The path of each adjacent edge is intersection point - (intermediate point) - intersection point / endpoint.

[0219] For example, please refer to Figure 10 Here is a schematic diagram of an adjacent edge set, such as... Figure 10 As shown, the intersection point A is determined to be the intermediate point through the set of adjacent points 1 of an adjacent point. The adjacent point A is determined to be the endpoint A through the set of adjacent points 1-1 of an adjacent point in the set of adjacent points 1. Thus, the intersection point A forms an adjacent edge 1 through the intermediate point to the endpoint A.

[0220] If the set of adjacent points 2 of the intersection point A is determined to be the endpoint B, then the intersection point A and the endpoint B form an adjacent edge 2.

[0221] If the set of adjacent points 3 through which the intersection point A passes determines that the adjacent point is the intersection point B, then the intersection point A and the intersection point B form an adjacent edge 3.

[0222] S342: Based on the incident angle and exit angle of each adjacent edge, at least two adjacent edges in the same direction are designated as adjacent edges in the same direction.

[0223] In this embodiment, the start point and end point of each adjacent edge are determined. In one adjacent edge set, all adjacent edges have the same start point. A first reference point is taken on the adjacent edge at a preset distance from the start point, and a second reference point is taken on the adjacent edge at a preset distance from the end point. The incident angle from the start point to the first reference point, the exit angle from the first reference point to the start point, the incident angle from the second reference point to the end point, and the exit angle from the end point to the second reference point are calculated.

[0224] For any two adjacent edges, determine whether the two adjacent edges are adjacent edges in the same direction based on the incident angle from the starting point of one adjacent edge to the first reference point and the exit angle from the terminal of the other adjacent edge to the second reference point, or the exit angle from the first reference point of one adjacent edge to the starting point and the incident angle from the second reference point of the other adjacent edge to the ending point.

[0225] If the angle between the incident angle from the start point of one adjacent edge to the first reference point and the exit angle from the end point of another adjacent edge to the second reference point is less than a preset threshold, or if the angle between the exit angle from the first reference point of one adjacent edge to the start point and the incident angle from the second reference point of another adjacent edge to the end point is less than a preset threshold, these two adjacent edges are combined into a common adjacent edge.

[0226] By traversing the set of adjacent edges, at least one adjacent edge in the same direction is determined, and the remaining adjacent edges with included angles greater than or equal to a preset threshold are independent adjacent edges.

[0227] For example, take the starting point (x) s ,y s ), the first reference point (x) from the starting point s+r ,y s+r ), endpoint (x) e ,y e ), the second reference point (x) starting from the endpoint e-r ,y e-r ), where r>0, calculate the incident angle at the starting point respectively. Launch angle of the starting point Angle of incidence at the endpoint Launch angle at the finish line

[0228] Please refer to Figure 11 This is a schematic diagram of adjacent edges in the same direction, such as... Figure 11 As shown, if the angle between the incident angle of adjacent edge 1 and the exit angle of adjacent edge 3 is less than a preset threshold, then adjacent edge 1 and adjacent edge 3 constitute adjacent edges in the same direction, while adjacent edge 2 is an independent adjacent edge.

[0229] S343: Determine the number of skin texture lines for each connected component based on the number of adjacent edges in the same direction and the number of other independent adjacent edges.

[0230] In this embodiment, each adjacent edge in the same direction is a skin texture, and each independent adjacent edge is also a skin texture. The number of skin textures for each connected component is determined based on the number of adjacent edges in the same direction and the number of other independent adjacent edges.

[0231] S344: Determine the number of skin texture lines in the region to be analyzed based on the number of skin texture lines in at least one connected component.

[0232] In this embodiment, the number of skin texture lines in the region to be analyzed is determined based on the sum of the number of skin texture lines in at least one connected component.

[0233] The skin texture detection method provided in the above embodiments determines the number of skin texture lines by performing connected component analysis on the image. The number of skin texture lines is then used as a skin texture feature value to calculate the skin texture parameters of the region to be analyzed, which can improve the accuracy of the calculation results and the precision of skin texture detection.

[0234] In one possible implementation, the skin texture enhancement effect map of the region to be analyzed can also be calculated based on the skin texture intensity map S of the region to be analyzed, the grayscale map F of the region to be analyzed, the mask map M2 of the region to be analyzed, and the multi-view sampled image Y.

[0235] Specifically, a filter kernel K2 is constructed. The filter kernel K2 is a filter kernel with an odd side length, with a center value of 0, all values ​​on the upper right diagonal being -c, and all values ​​on the lower diagonal being c. Based on the skin texture intensity map S of the region to be analyzed, the grayscale map F of the region to be analyzed, the mask map M2 of the region to be analyzed, and the filter kernel K2, the enhancement coefficient map C is calculated. Based on the enhancement coefficient map C of the region to be analyzed and the multi-view sampled image Y, the skin texture enhancement effect map E of the region to be analyzed is generated.

[0236] For example, the filter kernel K2 is represented as Enhancement coefficient diagram C is represented as Skin texture enhancement effect image E is represented as Skin texture intensity map S and skin texture enhancement effect map E can be used to visually and intuitively perceive skin texture.

[0237] Based on the above method embodiments, this application also provides a skin texture detection device. Please refer to... Figure 12 This is a schematic diagram of the skin texture detection device provided in the embodiments of this application, as shown below. Figure 12 As shown, the device may include:

[0238] The image acquisition and processing module 10 is used to determine multiple sets of key facial feature points, multiple acquisition images of the region to be analyzed, and multiple mask images of the region to be analyzed based on the multi-view acquired images of the face to be detected.

[0239] The skin texture enhancement module 20 is used to determine the skin texture intensity map of each region to be analyzed based on multiple sets of facial key feature points, the acquired map of each region to be analyzed, and the mask map of each region to be analyzed.

[0240] The texture feature statistics module 30 is used to perform skin texture feature statistics on the skin texture intensity map of each region to be analyzed based on the mask map of each region to be analyzed, and obtain the skin texture feature values ​​of each region to be analyzed in multiple dimensions.

[0241] The region parameter calculation module 40 is used to determine the skin texture parameters of each region to be analyzed based on the skin texture feature values ​​of each region to be analyzed in multiple dimensions.

[0242] The facial parameter calculation module 50 is used to determine the target skin texture parameters of the face to be detected based on the skin texture parameters of multiple regions to be analyzed.

[0243] Optional, skin texture enhancement module 20 includes:

[0244] The grayscale image generation unit is used to generate a grayscale image of the area to be analyzed based on the acquired image of the area to be analyzed.

[0245] The Gaussian difference map generation unit is used to generate a Gaussian difference map of the region to be analyzed based on multiple sets of facial key feature points and grayscale images of the region to be analyzed.

[0246] The intensity map generation unit is used to generate a skin texture intensity map of the region to be analyzed based on the difference of Gaussians map and the mask map of the region to be analyzed.

[0247] Optionally, the Gaussian difference map generation unit includes:

[0248] The length parameter calculation subunit is used to calculate the facial length parameter based on multiple feature point pairs from multiple sets of facial key feature points;

[0249] The kernel function calculation subunit is used to calculate the difference of Gaussians kernel function based on the face length parameter;

[0250] The Gaussian difference map generation sub-unit is used to generate a Gaussian difference map of the region to be analyzed based on the Gaussian difference kernel function and the grayscale image of the region to be analyzed.

[0251] Optional, the regional parameter calculation module 40 includes:

[0252] The transformation feature value calculation unit is used to calculate the transformation feature value of each dimension based on the target fitting function corresponding to the skin texture feature value of each dimension and the skin texture feature value of each dimension.

[0253] The region parameter calculation unit is used to linearly combine the transformation feature values ​​of multiple dimensions to calculate the skin texture parameters of the region to be analyzed.

[0254] Optionally, before the transformation feature value calculation unit, the device further includes:

[0255] The sample image acquisition module is used to acquire multiple sample facial images. These multiple sample facial images are pre-annotated with facial reference evaluation parameters and region reference evaluation parameters for multiple regions to be analyzed.

[0256] The sample feature value calculation module is used to calculate the multi-dimensional sample skin texture feature values ​​of the region to be analyzed in multiple sample facial images;

[0257] The sample transformation feature value calculation module is used to calculate the sample transformation feature value for each dimension based on the preset fitting function corresponding to the sample skin texture feature value for each dimension.

[0258] The regional sample evaluation parameter calculation module is used to calculate the regional sample evaluation parameters of the region to be analyzed based on the sample transformation feature values ​​of multiple dimensions and the preset linear combination function.

[0259] The facial sample evaluation parameter calculation module is used to calculate facial sample evaluation parameters based on the sample evaluation parameters of multiple regions to be analyzed.

[0260] The fitting function iteration module is used to iterate the preset fitting function for each dimension based on the regional reference evaluation parameters, regional sample evaluation parameters, facial reference evaluation parameters, and regional reference evaluation parameters, and to determine the fitting function with the minimum loss value as the target fitting function for each dimension.

[0261] Optional, multi-dimensional skin texture feature values ​​include: the number of skin texture lines; texture feature statistics module 30, including:

[0262] The binarization unit is used to binarize the skin texture intensity map of the region to be analyzed, so as to obtain a binarized image;

[0263] A connected component determination unit is used to perform connected component analysis on a binarized image and determine at least one connected component.

[0264] The pixel type determination unit is used to traverse each pixel in each connected component and determine the type of each pixel based on the set of adjacent points contained in each pixel.

[0265] The skin texture count unit is used to count the number of skin textures in the region to be analyzed based on the type of each pixel in at least one connected component.

[0266] Optionally, the pixel type determination unit is specifically used to determine the pixel as an endpoint if the number of adjacent points it includes is 0 or 1; to determine the pixel as an intermediate point if the number of adjacent points it includes is 2; and to determine the pixel as an intersection point if the number of adjacent points it includes is greater than or equal to 3.

[0267] Optional, skin texture bar count unit, including:

[0268] The first skin texture count subunit is used to determine that each connected component has a skin texture if the number of intersection points in each connected component is 0.

[0269] The adjacency edge determination sub-unit is used to traverse each intersection point if the number of intersection points in each connected component is greater than or equal to 1, determine the adjacency point set of each intersection point in the adjacency point set, generate the adjacency edge set of each intersection point, and each adjacency edge in the adjacency edge set takes each intersection point as its starting point and the intersection point or endpoint of the last adjacency point set as its ending point.

[0270] The same-direction adjacent edge determination sub-unit is used to determine at least two adjacent edges in the same direction as same-direction adjacent edges based on the incident angle and exit angle of each adjacent edge.

[0271] The second skin texture count subunit is used to determine the number of skin textures in each connected component based on the number of adjacent edges in the same direction and the number of other independent adjacent edges.

[0272] The region skin texture count subunit is used to determine the number of skin textures in the region to be analyzed based on the number of skin textures in at least one connected component.

[0273] The above-described apparatus is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effects are similar, so they will not be described again here.

[0274] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0275] Please refer to Figure 13 This is a schematic diagram of the skin texture detection device provided in the embodiments of this application, as shown below. Figure 13 As shown, the skin texture detection device 100 includes: a processor 101, a storage medium 102, and a bus.

[0276] Storage medium 102 stores program instructions executable by processor 101. When skin texture detection device 100 is running, processor 101 communicates with storage medium 102 via a bus, and processor 101 executes the program instructions to perform the above-described method embodiment. The specific implementation and technical effects are similar and will not be described in detail here.

[0277] Optionally, the present invention also provides a computer-readable storage medium storing a computer program, which is executed by a processor to perform the above-described method embodiments.

[0278] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0279] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0280] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0281] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0282] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for detecting skin texture, characterized in that, The method includes: Based on the multi-view images of the face to be detected, multiple sets of key facial feature points, multiple images of the regions to be analyzed, and mask images of the multiple regions to be analyzed are determined. Based on the multiple sets of key facial feature points, the acquired image of each region to be analyzed, and the mask image of each region to be analyzed, the skin texture intensity map of each region to be analyzed is determined; Based on the mask map of each region to be analyzed, skin texture feature statistics are performed on the skin texture intensity map of each region to be analyzed to obtain skin texture feature values ​​of each region to be analyzed in multiple dimensions. Based on the skin texture feature values ​​of each region to be analyzed in the multiple dimensions, the skin texture parameters of each region to be analyzed are determined; Based on the skin texture parameters of the multiple regions to be analyzed, the target skin texture parameters of the face to be detected are determined; The multi-dimensional skin texture feature values ​​include: the number of skin texture lines; the step of performing skin texture feature statistics on the skin texture intensity map of each region to be analyzed based on the mask map of each region to be analyzed, to obtain the multi-dimensional skin texture feature values ​​of each region to be analyzed, including: The skin texture intensity map of the region to be analyzed is binarized to obtain a binarized image; Perform connected component analysis on the binarized image to determine at least one connected component; Iterate through each pixel in each connected component and determine the type of each pixel based on the set of its neighboring nodes. Based on the type of each pixel in the at least one connected component, count the number of skin texture lines in the region to be analyzed.

2. The method according to claim 1, characterized in that, The step of determining the skin texture intensity map of each region to be analyzed based on the multiple sets of facial key feature points, the acquired image of each region to be analyzed, and the mask image of each region to be analyzed includes: Based on the acquired image of the region to be analyzed, a grayscale image of the region to be analyzed is generated; Based on the multiple sets of key facial feature points and the grayscale image of the region to be analyzed, a Gaussian difference map of the region to be analyzed is generated. Based on the Gaussian difference map and the mask map of the region to be analyzed, a skin texture intensity map of the region to be analyzed is generated.

3. The method according to claim 2, characterized in that, The step of generating a Gaussian difference map of the region to be analyzed based on the multiple sets of facial key feature points and the grayscale image of the region to be analyzed includes: Calculate the facial length parameter based on multiple feature point pairs from the multiple sets of facial key feature points; Calculate the Gaussian difference kernel function based on the facial length parameter; Based on the Gaussian difference kernel function and the grayscale image of the region to be analyzed, a Gaussian difference map of the region to be analyzed is generated.

4. The method according to claim 1, characterized in that, The step of determining the skin texture parameters of each region to be analyzed based on the skin texture feature values ​​of each region to be analyzed in multiple dimensions includes: Based on the target fitting function corresponding to the skin texture feature value of each dimension and the skin texture feature value of each dimension, calculate the transformation feature value of each dimension; The skin texture parameters of the region to be analyzed are calculated by linearly combining the transformation feature values ​​of the multiple dimensions.

5. The method according to claim 4, characterized in that, Before calculating the transformation feature value of each dimension based on the target fitting function corresponding to the skin texture feature value of each dimension and the skin texture feature value of each dimension, the method further includes: Multiple sample facial images are acquired, and the multiple sample facial images are pre-annotated with facial reference evaluation parameters and region reference evaluation parameters of the multiple regions to be analyzed. Calculate the multi-dimensional sample skin texture feature values ​​of the region to be analyzed in the multiple sample facial images; Based on the preset fitting function corresponding to the sample skin texture feature value of each dimension, calculate the sample transformation feature value of each dimension; Based on the sample transformation feature values ​​of the multiple dimensions and the preset linear combination function, the regional sample evaluation parameters of the region to be analyzed are calculated. Calculate facial sample evaluation parameters based on the sample evaluation parameters of the multiple regions to be analyzed; Based on the region reference evaluation parameters, the region sample evaluation parameters, the face reference evaluation parameters, and the region reference evaluation parameters, the preset fitting function for each dimension is iterated to determine the fitting function with the smallest loss value as the target fitting function for each dimension.

6. The method according to claim 1, characterized in that, The process of traversing each pixel in each connected component and determining the type of each pixel based on its set of neighboring pixels includes: If the number of neighboring points included in a pixel is 0 or 1, the pixel is determined to be an endpoint; If the number of neighboring points included in a pixel is 2, then the pixel is determined to be the middle point; If the number of neighboring points included in a pixel is greater than or equal to 3, the pixel is determined to be an intersection point.

7. The method according to claim 6, characterized in that, The step of counting the number of skin texture lines in the region to be analyzed based on the type of each pixel in the at least one connected component includes: If the number of intersection points in each connected component is 0, then each connected component is determined to have a skin texture. If the number of intersection points in each connected component is greater than or equal to 1, traverse each intersection point, determine the set of adjacent points of each adjacent point in the set of adjacent points of each intersection point, generate the set of adjacent edges of each intersection point, and each adjacent edge in the set of adjacent edges takes each intersection point as the starting point and the intersection point or endpoint of the last set of adjacent points as the ending point. Based on the incident angle and exit angle of each adjacent edge, at least two adjacent edges in the same direction are designated as adjacent edges in the same direction. The number of skin texture lines in each connected component is determined based on the number of adjacent edges in the same direction and the number of other independent adjacent edges; The number of skin texture lines in the region to be analyzed is determined based on the number of skin texture lines in the at least one connected component.

8. A skin texture detection device, characterized in that, The device includes: The image acquisition and processing module is used to determine multiple sets of key facial feature points, multiple acquisition images of regions to be analyzed, and mask images of the multiple regions to be analyzed based on multi-view acquired images of the face to be detected. The skin texture enhancement module is used to determine the skin texture intensity map of each region to be analyzed based on the multiple sets of facial key feature points, the acquired map of each region to be analyzed, and the mask map of each region to be analyzed. The texture feature statistics module is used to perform skin texture feature statistics on the skin texture intensity map of each region to be analyzed based on the mask map of each region to be analyzed, so as to obtain the skin texture feature values ​​of each region to be analyzed in multiple dimensions. The region parameter calculation module is used to determine the skin texture parameters of each region to be analyzed based on the skin texture feature values ​​of each region to be analyzed in multiple dimensions. The facial parameter calculation module is used to determine the target skin texture parameters of the face to be detected based on the skin texture parameters of the multiple regions to be analyzed. The multi-dimensional skin texture feature values ​​include: the number of skin texture lines; the texture feature statistics module includes: The binarization unit is used to binarize the skin texture intensity map of the region to be analyzed to obtain a binarized image; A connected component determination unit is used to perform connected component analysis on the binarized image and determine at least one connected component. The pixel type determination unit is used to traverse each pixel in each connected component and determine the type of each pixel based on the set of adjacent points contained in each pixel. The skin texture count unit is used to count the number of skin textures in the region to be analyzed based on the type of each pixel in the at least one connected component.

9. A skin texture detection device, characterized in that, include: The device includes a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the skin texture detection device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the skin texture detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the steps of the skin texture detection method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Skin detection method and device, terminal equipment and computer storage medium

    CN113129250A

  • Wrinkle state analysis device and wrinkle state analysis method

    JP2017012384A