CN116959074A - Human skin detection method and device based on multispectral imaging - Google Patents

Human skin detection method and device based on multispectral imaging Download PDF

Info

Publication number
CN116959074A
CN116959074A CN202310946179.9A CN202310946179A CN116959074A CN 116959074 A CN116959074 A CN 116959074A CN 202310946179 A CN202310946179 A CN 202310946179A CN 116959074 A CN116959074 A CN 116959074A
Authority
CN
China
Prior art keywords
image
value
average
pixels
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310946179.9A
Other languages
Chinese (zh)
Other versions
CN116959074B (en
Inventor
朱华栋
李凡
魏长云
王辉
李树亚
李毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking Union Medical College Hospital Chinese Academy of Medical Sciences
Original Assignee
Peking Union Medical College Hospital Chinese Academy of Medical Sciences
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking Union Medical College Hospital Chinese Academy of Medical Sciences filed Critical Peking Union Medical College Hospital Chinese Academy of Medical Sciences
Priority to CN202310946179.9A priority Critical patent/CN116959074B/en
Publication of CN116959074A publication Critical patent/CN116959074A/en
Application granted granted Critical
Publication of CN116959074B publication Critical patent/CN116959074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/0059Measuring for diagnostic purposes; Identification of persons using light, e.g. diagnosis by transillumination, diascopy, fluorescence
    • A61B5/0075Measuring for diagnostic purposes; Identification of persons using light, e.g. diagnosis by transillumination, diascopy, fluorescence by spectroscopy, i.e. measuring spectra, e.g. Raman spectroscopy, infrared absorption spectroscopy
    • AHUMAN NECESSITIES
    • A61MEDICAL OR VETERINARY SCIENCE; HYGIENE
    • A61BDIAGNOSIS; SURGERY; IDENTIFICATION
    • A61B5/00Measuring for diagnostic purposes; Identification of persons
    • A61B5/44Detecting, measuring or recording for evaluating the integumentary system, e.g. skin, hair or nails
    • A61B5/441Skin evaluation, e.g. for skin disorder diagnosis
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • G01N21/31Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry
    • G01N21/35Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light
    • G01N21/3563Investigating relative effect of material at wavelengths characteristic of specific elements or molecules, e.g. atomic absorption spectrometry using infrared light for analysing solids; Preparation of samples therefor
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/55Specular reflectivity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/40Spoof detection, e.g. liveness detection

Landscapes

  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Pathology (AREA)
  • Spectroscopy & Molecular Physics (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Analytical Chemistry (AREA)
  • Theoretical Computer Science (AREA)
  • Chemical & Material Sciences (AREA)
  • Multimedia (AREA)
  • Heart & Thoracic Surgery (AREA)
  • Human Computer Interaction (AREA)
  • Molecular Biology (AREA)
  • Surgery (AREA)
  • Animal Behavior & Ethology (AREA)
  • Public Health (AREA)
  • Veterinary Medicine (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Dermatology (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)
  • Image Analysis (AREA)
  • Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)

Abstract

The invention provides a human skin detection method and device based on multispectral imaging, and belongs to the technical field of multispectral detection. According to the human skin detection method based on multispectral imaging, gray values of forehead and cheek parts in a target multispectral image are analyzed, the reflection degree of red light of different areas can be further analyzed under the condition that the result of target segmentation of different areas is accurate, namely, the reflection degree data of different areas are analyzed and compared in the same target multispectral image, reference data under experimental conditions are not needed to be compared, the influence of different shooting scenes on detection analysis results can be eliminated, the skin conditions of different areas of a human face are detected, the accuracy of detection and identification of the skin of the human face is improved, and the true and false human face can be identified.

Description

Human skin detection method and device based on multispectral imaging
Technical Field
The invention relates to the technical field of multispectral detection, in particular to a human skin detection method and device based on multispectral imaging.
Background
In order to improve security, face recognition is increasingly used in various types of applications. The purpose of face recognition is to prevent face counterfeiting and conveniently identify true and false faces. There are various ways of identifying real and false faces, some of which common methods include 3D structural analysis, eye region analysis, and the like. The 3D structure analysis analyzes texture details such as wrinkles, pores, spots and the like on the surface of the human face by analyzing three-dimensional structure information of the human face, including depth, shape and geometric features, so as to judge the difference between the real human face and the fake human face. Eyes are important features in a human face, and the analysis of the eye area can judge whether the human face is a real human face or not by detecting the features of the eye area, such as eyeball reflection, eye movement tracking and the like.
However, the structural light data obtained by the method has larger dimensionality and larger processing difficulty, and complex models and algorithms are required to be set for analysis, so that the development difficulty is higher. In the related art, a multispectral imaging technology can be adopted to detect human skin, for example, the human face skin is detected to judge whether the human face is a real human face, and the simplest mode is to use infrared light to realize detection and acquisition of local skin temperature, but the false mode is easier.
The multispectral imaging technology can detect the detailed characteristics of the surface of the facial skin, can further analyze and present the problem hidden under the basal layer of the facial skin, and can accurately and quantitatively diagnose the facial skin condition and provide an accurate skin diagnosis report by adopting the multispectral imaging technology to detect and evaluate the facial skin. In order to further improve the accuracy of the detection of the true and false faces, in the related art, characteristic parameters of a face region in a multispectral image, such as gray values, reflectivity, and the like, are compared with characteristic parameters of a true face under experimental conditions, or recognition and judgment are performed through a model trained by using the characteristic parameters of the true face, so as to determine whether the face region is the true skin.
Because the light condition, the shooting angle and the like of the shooting environment of the multispectral image to be identified are complex and changeable, even if the multispectral image contains real skin, the characteristic parameters in the multispectral image can have larger difference with the characteristic parameters under the experimental conditions, and more misjudgment conditions are easy to occur in the identification mode in the related technology, so that the accuracy rate of real and false skin detection is not high, and the face detection device is easy to be deceived.
Disclosure of Invention
The invention provides a human skin detection method and device based on multispectral imaging, which are used for solving the defect of low accuracy of true and false human skin detection in the prior art and realizing the effect of improving the accuracy of human face skin detection.
The invention provides a human skin detection method based on multispectral imaging, which comprises the following steps:
acquiring a target multispectral image, wherein the target multispectral image comprises human face features;
identifying the face features in the target multispectral image to obtain a first image corresponding to the face region;
performing feature recognition on the first image, and obtaining a target image set after target segmentation on the first image; the target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lip;
determining a first average gray value corresponding to all pixels of the second image on a green light wave band and a second average gray value corresponding to all pixels of the third image on the green light wave band;
determining a first average reflectance value corresponding to all pixels of the second image on a red light band, a second average reflectance value corresponding to all pixels of the third image on the red light band, and a third average reflectance value corresponding to all pixels of the fourth image on the red light band, if the difference between the second average gray value and the first average gray value is greater than a first target threshold;
And determining the skin of the face feature in the target multispectral image to be real skin under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is larger than a second target threshold value and the difference value between the first average reflectivity value and the third average reflectivity value is larger than the second target threshold value.
According to the human skin detection method based on multispectral imaging, the target image set further comprises a fifth image of a region corresponding to a nose and a sixth image of a region corresponding to eyes; after the determining the first average reflectance value corresponding to all pixels of the second image over the red band, the second average reflectance value corresponding to all pixels of the third image over the red band, and the third average reflectance value corresponding to all pixels of the fourth image over the red band, the method further comprises:
calculating a fourth average reflectance value corresponding to all pixels of the fifth image on a red light band and a fifth average reflectance value corresponding to all pixels of the sixth image on the red light band respectively when the difference between the first average reflectance value and the second average reflectance value is greater than a second target threshold and the difference between the first average reflectance value and the third average reflectance value is less than or equal to the second target threshold;
And determining that the skin of the face feature in the target multispectral image is false skin when the difference value between the first average reflectivity value and the fourth average reflectivity value is smaller than or equal to the second target threshold value and the difference value between the first average reflectivity value and the fifth average reflectivity value is smaller than or equal to the second target threshold value.
According to the human skin detection method based on multispectral imaging, the target image set further comprises a fifth image of a region corresponding to a nose and a sixth image of a region corresponding to eyes; after the determining the first average reflectance value corresponding to all pixels of the second image over the red band, the second average reflectance value corresponding to all pixels of the third image over the red band, and the third average reflectance value corresponding to all pixels of the fourth image over the red band, the method further comprises:
calculating a fourth average reflectance value corresponding to all pixels of the fifth image on a red light band and a fifth average reflectance value corresponding to all pixels of the sixth image on the red light band respectively when the difference between the first average reflectance value and the second average reflectance value is greater than a second target threshold and the difference between the first average reflectance value and the third average reflectance value is less than or equal to the second target threshold;
And determining that the skin of the face feature in the target multispectral image is real skin under the condition that at least one of the difference value of the first average reflectivity value and the fourth average reflectivity value and the difference value of the first average reflectivity value and the fifth average reflectivity value is larger than the second target threshold.
According to the human skin detection method based on multispectral imaging provided by the invention, when the difference between the first average reflectance value and the second average reflectance value is greater than a second target threshold value and the difference between the first average reflectance value and the third average reflectance value is less than or equal to the second target threshold value, a fourth average reflectance value corresponding to all pixels of the fifth image on a red light band and a fifth average reflectance value corresponding to all pixels of the sixth image on the red light band are respectively calculated, and the method comprises the following steps:
determining a gray value corresponding to each pixel in the fourth image on a red light wave band;
determining a target pixel in the fourth image, the gray value of which is greater than a third target threshold value, and the target proportion of the total number of pixels of the target pixel in the fourth image;
And respectively calculating a fourth average reflectance value corresponding to all pixels of the fifth image on a red light wave band and a fifth average reflectance value corresponding to all pixels of the sixth image on the red light wave band under the condition that the target proportion is smaller than a fourth target threshold value.
According to the human skin detection method based on multispectral imaging provided by the invention, after the first average reflectance value corresponding to all pixels of the second image on the red light band, the second average reflectance value corresponding to all pixels of the third image on the red light band and the third average reflectance value corresponding to all pixels of the fourth image on the red light band are determined, the method further comprises:
and determining the skin of the face feature in the target multispectral image to be fake skin under the condition that the difference value of the first average reflectivity value and the second average reflectivity value is smaller than or equal to the second target threshold value and the difference value of the first average reflectivity value and the third average reflectivity value is smaller than or equal to the second target threshold value.
According to the human skin detection method based on multispectral imaging provided by the invention, the determining of the first average gray value corresponding to all pixels of the second image on the green light wave band and the second average gray value corresponding to all pixels of the third image on the green light wave band comprises the following steps:
Extracting a first sub-image of a channel corresponding to a green light wave band from the second image, and extracting a second sub-image of a channel corresponding to the green light wave band from the third image;
and determining the gray values of all pixels of the first sub-image, calculating an average value to obtain the first average gray value, and determining the gray values of all pixels of the second sub-image, and calculating an average value to obtain the second average gray value.
According to the human skin detection method based on multispectral imaging provided by the invention, the determining the first average reflectance value corresponding to all pixels of the second image on the red light band, the second average reflectance value corresponding to all pixels of the third image on the red light band and the third average reflectance value corresponding to all pixels of the fourth image on the red light band comprises the following steps:
extracting a third sub-image of a channel corresponding to a red light wave band from the second image, extracting a fourth sub-image of a channel corresponding to the red light wave band from the third image, and extracting a fifth sub-image of a channel corresponding to the red light wave band from the fourth image;
determining the relative reflectivity values of all pixels of the third sub-image, calculating an average value to obtain the first average reflectivity value, determining the relative reflectivity values of all pixels of the fourth sub-image, calculating an average value to obtain the second average reflectivity value, and determining the relative reflectivity values of all pixels of the fifth sub-image, and calculating an average value to obtain the third average reflectivity value.
The invention also provides a human skin detection device based on multispectral imaging, which comprises:
the acquisition module is used for acquiring a target multispectral image, wherein the target multispectral image comprises human face features;
the first processing module is used for identifying the face characteristics in the target multispectral image to obtain a first image corresponding to the face area;
the second processing module is used for carrying out feature recognition on the first image and obtaining a target image set after the first image is subjected to target segmentation; the target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lip;
a third processing module, configured to determine a first average gray value corresponding to all pixels of the second image in a green light band and a second average gray value corresponding to all pixels of the third image in the green light band;
a fourth processing module, configured to determine a first average reflectance value corresponding to all pixels of the second image on a red light band, a second average reflectance value corresponding to all pixels of the third image on a red light band, and a third average reflectance value corresponding to all pixels of the fourth image on a red light band, where a difference between the second average gray value and the first average gray value is greater than a first target threshold;
And a fifth processing module, configured to determine that skin of the face feature in the target multispectral image is real skin when the difference between the first average reflectance value and the second average reflectance value is greater than a second target threshold, and the difference between the first average reflectance value and the third average reflectance value is greater than the second target threshold.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the human skin detection method based on multispectral imaging as described in any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a human skin detection method based on multispectral imaging as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a human skin detection method based on multispectral imaging as described in any one of the above.
According to the human skin detection method and device based on multispectral imaging, the human face area in the target multispectral image is divided into different areas, the average gray values of the forehead and cheek parts are analyzed, the reflection degree of red light of different areas of the human face can be further analyzed under the condition that the accurate result of target segmentation of the different areas is ensured, namely, the reflection degree data of different parts in the same target multispectral image are analyzed and compared, reference data under experimental conditions are not needed to be compared, the influence of different shooting scenes on the detection analysis result can be eliminated, the skin condition of different areas of the human face is detected, the accuracy of detection and identification of the human face skin is improved, and the true and false human face can be identified.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a human skin detection method based on multispectral imaging;
FIG. 2 is a second flow chart of a method for detecting human skin based on multispectral imaging according to the present invention;
FIG. 3 is a schematic diagram of a human skin detection device based on multispectral imaging;
fig. 4 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following describes a human skin detection method and device based on multispectral imaging with reference to fig. 1 to 4.
As shown in fig. 1, a human skin detection method based on multispectral imaging according to an embodiment of the present invention mainly includes step 110, step 120, step 130, step 140, step 150, and step 160.
Step 110, a target multispectral image is acquired.
It should be noted that the target multispectral image includes a face feature, that is, at least a part of the area in the multispectral image is a face area.
In the single-band imaging process, an object to be detected is usually placed under a single-band detection light to acquire radiation brightness, so as to obtain a gray level image. In the multiband imaging process, the object to be detected is placed under detection light of different wavebands to acquire the radiation brightness, so as to obtain a multispectral image. A multispectral image is an image made up of a number of channels, the number of which is related to the wavelength resolution of the multispectral camera sensor, each channel capturing light of a specified wavelength, i.e. one channel for each band. The multispectral image comprises spectrum information of a plurality of wave bands, so that a plurality of sub-images corresponding to different wave bands can be obtained from the multispectral image, and each sub-image records information in one channel image.
In some embodiments, the target multispectral image may be acquired directly by a multispectral camera. A multispectral camera is a visual camera that utilizes multispectral imaging techniques for acquiring a target multispectral image.
A multispectral camera is a camera capable of capturing and recording spectral information in multiple bands simultaneously. It may have multiple optical filters and sensors that can acquire spectral data in different bands simultaneously. The principle of a multispectral camera is based on the absorption and reflection properties of light of different wavelengths at the surface of an object, whereby features and information of the object are extracted by capturing and analyzing these spectral data.
In some embodiments, a multispectral camera uses multiple optical filters or spectral beamsplitters to split incident light into different bands. Each band corresponds to a sensor and is in turn used to capture light of a particular wavelength range.
Each sensor records spectral data of a specific wave band and converts the spectral data into a digital signal, and the sensors of different wave bands capture the spectral information data of the same scene at the same time. The captured spectral information data can be processed and analyzed by a computer, and the processing method comprises spectrum reconstruction, spectrum correction, spectrum analysis, feature extraction and the like, so as to acquire the required information.
The band division of light is typically based on different regions of the electromagnetic spectrum, which correspond to different wavelengths or frequency ranges. For example, in the present embodiment, the multispectral camera may capture at least a channel sub-image of a frequency band corresponding to green light and red light in visible light.
I.e. the target multispectral image that can be acquired by the multispectral camera may comprise at least a sub-image of green light in the wavelength range 492nm-577nm and a sub-image of red light in the wavelength range 625nm-740 nm.
Of course, the target multispectral image may also include sub-images of other wavelength ranges, without limitation.
And 120, identifying the face features in the target multispectral image to obtain a first image corresponding to the face region.
It can be appreciated that a face detection algorithm may be used to identify a face feature in the target multispectral image, and the target segmentation algorithm is used to segment the face region to obtain a first image corresponding to the face region.
In this embodiment, a feature extraction algorithm may be used to extract key visual features from an image, and then a classification algorithm, such as a support vector machine or a deep learning model, may be used to train and classify the extracted features to identify facial features. For example, the deep learning model may be a model of R-CNN or YOLO, or the like.
On the basis, an image segmentation algorithm such as threshold segmentation, edge detection, region growing and the like or a deep learning algorithm can be used for dividing image pixels into different regions or segmented objects, so that a first image corresponding to a face region is obtained.
And 130, performing feature recognition on the first image, and obtaining a target image set after target segmentation on the first image.
It can be understood that the obtained first image of the face region may be further processed to further perform target detection and target segmentation, that is, different positions in the face are identified and target image sets of different regions corresponding to the different positions are segmented.
The target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lips.
When the second image, the third image and the fourth image are identified and segmented, the second image, the third image and the fourth image can be segmented into regular rectangles, so that the difficulty of image processing can be reduced, the efficiency of image processing can be improved, and the development difficulty of an algorithm can be reduced.
For the second image of the area corresponding to the cheek and the third image of the area corresponding to the forehead, the areas corresponding to the cheek area and the forehead area are larger, and when the target segmentation is carried out, the target segmentation can be carried out by selecting part of the positions of the cheek area and the forehead area, so that the influence of other face areas on the cheek and the forehead edge is reduced as much as possible. When the region corresponding to the lips is subjected to target segmentation, the region around the lip region can be considered to be contained as much as possible in the fourth image due to the smaller lip region.
The cheek means the region where the two sides of the face are located under the eyes and beside the nose and extend to the corners of the mouth. The cheeks extend from the inferior orbital rim, down to the superior rim of the mandible, and from the nasal side to the corners of the mouth. The cheeks contain portions of the sides and front of the face.
The areas corresponding to the face cheeks of the person and the areas corresponding to the lips are rich in capillary blood vessels relative to other areas, and the areas have better red light absorption effect, so that the red light reflectivity is lower, the areas corresponding to the forehead can be obviously distinguished, the red light emissivity data of the areas can be analyzed, whether the face in the target multispectral image meets the reflectivity difference rule of the different areas of the face or not can be analyzed, and the reflectivity of the face area in experimental data does not need to be compared.
Step 140, determining a first average gray value corresponding to all pixels of the second image in the green light band and a second average gray value corresponding to all pixels of the third image in the green light band.
It should be noted that, the sensitivity of the human eye to the green light wave band is the highest, and the perception effect of green light in the human eye is better. Therefore, the gray level calculation of the image with the green light wave band is more in line with the visual perception of human eyes, and the cheek area easy to generate shadow and the forehead area easy to reflect light with high brightness can be effectively distinguished, so that the calculation result is more in line with the perception of the brightness of the image.
In some embodiments, determining the first average gray value for all pixels of the second image over the green band and the second average gray value for all pixels of the third image over the green band may include the following process.
A first sub-image of a channel corresponding to the green band may be extracted from the second image and a second sub-image of a channel corresponding to the green band may be extracted from the third image.
In this case, the gray values of all pixels of the first sub-image may be determined and the average value calculated to obtain a first average gray value, and the gray values of all pixels of the second sub-image may be determined and the average value calculated to obtain a second average gray value.
In other words, the color depth values of all pixels of the first sub-image and the second sub-image of the green single channel can be averaged respectively to obtain the first average gray value and the second average gray value, so that the accuracy of the second image and the third image separated by the target can be determined.
Step 150, determining a first average reflectance value corresponding to all pixels of the second image in the red light band, a second average reflectance value corresponding to all pixels of the third image in the red light band, and a third average reflectance value corresponding to all pixels of the fourth image in the red light band, if the difference between the second average gray value and the first average gray value is greater than the first target threshold.
It should be noted that the first target threshold may be set according to empirical data, which is not limited herein.
And under the condition that the difference value between the second average gray value and the first average gray value is larger than the first target threshold value, the third image corresponding to the second average gray value is darker than the second image corresponding to the first average gray value, namely the cheek area corresponding to the third image is darker than the forehead area corresponding to the second image, and the general rule of the face image is met. In addition, since the feature distinction of the forehead region and the cheek region is not obvious enough, confusion and errors are easy to occur when the target detection and the segmentation are performed, and further, in the target segmentation process of obtaining the second image and the third image, the accuracy of the target segmentation result is judged, and further, the second image and the third image which are more accurate can be used as the basis of the subsequent detection.
On the basis, a first average reflectance value corresponding to all pixels of the second image in the red light band, a second average reflectance value corresponding to all pixels of the third image in the red light band, and a third average reflectance value corresponding to all pixels of the fourth image in the red light band are further determined.
It should be noted that, the reflection of the skin humidity to the light can also have a certain influence, and the skin with higher humidity is easy to have misjudgment, and can be screened out first, so that the subsequent independent judgment can be conveniently carried out. When the humidity of the skin surface increases, the interaction of light with the skin surface is changed due to the presence of moisture, thereby affecting the reflection characteristics of light.
In the process of acquiring the target multispectral image, the multispectral image to be processed can be screened first. When skin humidity is great, the influence on light reflection of short wave infrared light wave band is great. The wavelength of the short-wave infrared light band is typically between 1000 nanometers and 2500 nanometers. On the basis, a sub-image of the multispectral image to be processed on a channel corresponding to the short-wave infrared band can be acquired, so that the reflectivity is determined, and the humidity of a human face in the image is further determined.
When the skin humidity is large, the short-wave infrared light wave band is easier to be absorbed, the reflectivity is relatively low, and the reflectivity is larger, the lower the reflectivity is, the detection of the skin humidity in the multispectral image to be processed can be realized, so that the multispectral image to be processed with the skin humidity possibly large is screened out, and the possibility that the subsequent processing process is misjudged is reduced.
In some embodiments, determining the first average reflectance value for all pixels of the second image over the red band, the second average reflectance value for all pixels of the third image over the red band, and the third average reflectance value for all pixels of the fourth image over the red band includes the following.
It will be appreciated that a third sub-image of the channel corresponding to the red band may be extracted from the second image, a fourth sub-image of the channel corresponding to the red band may be extracted from the third image, and a fifth sub-image of the channel corresponding to the red band may be extracted from the fourth image.
In this case, the relative reflectance values of all pixels of the third sub-image may be determined and averaged to obtain a first average reflectance value, the relative reflectance values of all pixels of the fourth sub-image may be determined and averaged to obtain a second average reflectance value, and the relative reflectance values of all pixels of the fifth sub-image may be determined and averaged to obtain a third average reflectance value.
It is emphasized that the pixel data itself cannot directly provide an accurate value of absolute reflectivity. Calculating the reflectivity requires a combination of other measurement and calibration procedures to obtain more reliable results. In calculating the relative reflectance values for each pixel, spectral correction may be performed to eliminate the light source intensity differences at different wavelengths and the response differences of the multispectral camera. This can be achieved by calibration using a reference light source or standard object.
On the basis, the pixel values in the image are compared with a reference standard, and the relative reflectivity of the object is calculated. This typically involves comparing the pixel values with those of a reference standard to derive a relative relationship of reflectivity.
For example, the reflectance values of each pixel in the image may be compared to reflectance values of corresponding bands in a reference spectral library to obtain a relative reflectance value for each pixel. This process typically involves calculating the correlation coefficient of the reflectivity of each pixel with the reflectivity of the reference band, and then applying different interpolation methods such as, for example, linear interpolation, inverse distance weighted interpolation, etc., to obtain the relative reflectivity value of each pixel.
On this basis, the respective relative reflectance values are averaged, thereby obtaining a second average reflectance value and a third average reflectance value.
Step 160, determining that the skin of the face feature in the target multispectral image is real skin when the difference between the first average reflectivity value and the second average reflectivity value is greater than the second target threshold value and the difference between the first average reflectivity value and the third average reflectivity value is greater than the second target threshold value.
It should be noted that the second target threshold may be set according to empirical data, which is not limited herein.
Under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is larger than a second target threshold value, the red light reflection degree of the forehead area corresponding to the second image is obviously larger than the red light reflection degree of the cheek area corresponding to the third image, the characteristics of the cheek and the forehead in a real face are met, namely, hemoglobin and the like in dense capillaries in the cheek have a strong absorption effect on the red light, and then the red light reflection value is lower.
Under the condition that the difference value between the first average reflectivity value and the third average reflectivity value is larger than a second target threshold value, the red light reflection degree of the forehead area corresponding to the second image is obviously larger than the red light reflection degree of the lip area corresponding to the fourth image, the characteristics of lips and forehead in a real human face are met, namely, hemoglobin and the like in denser capillaries in the lips have stronger absorption effect on the red light, and then the red light reflection value is lower.
On the basis, the skin of the face feature in the current target multispectral image can be determined to be real skin.
It is understood that hemoglobin and the like in capillaries have a strong absorption effect on red light and infrared light. In some scenarios, the acquired blood oxygen saturation may also be detected by illuminating the skin with red and infrared light. The oxygenation state of hemoglobin can influence the absorption degree of red light and infrared light, and then the saturation of oxygen in blood is calculated by analyzing the intensity change of the red light and the infrared light in the reflected light after the skin is irradiated by the light.
According to the human skin detection method based on multispectral imaging, the human face area in the target multispectral image is divided into different areas, the average gray values of the forehead and cheek parts are analyzed, the reflection degree of red light of different areas of the human face can be further analyzed under the condition that the accurate result of target segmentation of the different areas is ensured, namely, the analysis and comparison of reflection degree data of different parts in the same target multispectral image are performed, the reference data under the experimental condition are not used for comparison, the influence of different shooting scenes on the detection and analysis result can be eliminated, the skin conditions of different areas of the human face are detected, the accuracy of detection and identification of the human face skin is improved, and the false human face can be identified.
Of course, in some embodiments, after determining the first average reflectance value corresponding to all pixels of the second image in the red light band, the second average reflectance value corresponding to all pixels of the third image in the red light band, and the third average reflectance value corresponding to all pixels of the fourth image in the red light band, a human skin detection method based on multispectral imaging according to an embodiment of the present invention further includes: and determining the skin of the face feature in the target multispectral image to be false skin under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is smaller than or equal to a second target threshold value and the difference value between the first average reflectivity value and the third average reflectivity value is smaller than or equal to the second target threshold value.
Under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is smaller than or equal to a second target threshold value, the red light reflection degree of the forehead area corresponding to the second image is not obviously larger than the red light reflection degree of the cheek area corresponding to the third image, and the characteristics of the cheek and the forehead in the real face are not met.
Under the condition that the difference value between the first average reflectivity value and the third average reflectivity value is smaller than or equal to a second target threshold value, the red light reflection degree of the forehead area corresponding to the second image is not obviously larger than the red light reflection degree of the lip area corresponding to the fourth image, and the characteristics of lips and the forehead in a real face are not met.
On the basis, the skin of the face feature in the current target multispectral image can be directly determined to be false skin.
In some embodiments, the set of target images further includes a fifth image of the region corresponding to the nose and a sixth image of the region corresponding to the eyes.
It will be appreciated that the fifth image of the region corresponding to the nose and the sixth image of the region corresponding to the eyes may be acquired using similar object detection and object segmentation methods as described above.
On the basis, after determining the first average reflectance value corresponding to all pixels of the second image in the red light band, the second average reflectance value corresponding to all pixels of the third image in the red light band, and the third average reflectance value corresponding to all pixels of the fourth image in the red light band, the human skin detection method based on multispectral imaging according to the embodiment of the invention further comprises: and respectively calculating a third average reflectivity value corresponding to all pixels of the fifth image on the red light wave band and a fourth average reflectivity value corresponding to all pixels of the sixth image on the red light wave band under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is larger than a second target threshold and the difference value between the first average reflectivity value and the third average reflectivity value is smaller than or equal to the second target threshold.
It can be understood that, when the difference between the first average reflectance value and the second average reflectance value is greater than the second target threshold, the degree of reflection of the red light by the forehead region corresponding to the second image is significantly greater than the degree of reflection of the red light by the cheek region corresponding to the third image, which accords with the characteristics of the cheek and forehead in a real human face, that is, hemoglobin in denser capillaries in the cheek has a stronger absorption effect on the red light, thereby resulting in a lower reflectance value of the red light.
Under the condition that the difference value between the first average reflectivity value and the third average reflectivity value is smaller than or equal to a second target threshold value, the red light reflection degree of the forehead area corresponding to the second image is not obviously larger than the red light reflection degree of the lip area corresponding to the fourth image, and the characteristics of lips and the forehead in a real face are not met.
In this case, the determination result of the genuine or fake face skin cannot be directly obtained in consideration of the detected error and the error in the image processing process. The fifth image of the region corresponding to the nose and the sixth image of the region corresponding to the eyes can be analyzed again.
In other words, a fourth average reflectance value for all pixels of the fifth image over the red band and a fifth average reflectance value for all pixels of the sixth image over the red band may be calculated, respectively.
And under the condition that the difference value between the first average reflectivity value and the fourth average reflectivity value is smaller than or equal to the second target threshold value, the red light reflection degree of the forehead area corresponding to the second image is not obviously larger than the red light reflection degree of the nose area corresponding to the fifth image. Because the nose part of the human face also has more capillaries, the above result does not conform to the characteristics of the nose and forehead in the real human face.
And under the condition that the difference value between the first average reflectivity value and the fifth average reflectivity value is smaller than or equal to the second target threshold value, the red light reflection degree of the forehead area corresponding to the second image is not obviously larger than the red light reflection degree of the eye area corresponding to the sixth image. Because the eyes of the human face have more capillaries, the above result does not accord with the characteristics of eyes and forehead in the real human face.
Thus, it may be determined that the skin of the face feature in the target multispectral image is false skin if the difference between the first average reflectance value and the fourth average reflectance value is less than or equal to the second target threshold and the difference between the first average reflectance value and the fifth average reflectance value is less than or equal to the second target threshold.
In the above embodiment of the present invention, since the cheek and lip regions are less affected by the shooting angle and the open/close state of the mouth, the detection and analysis are preferably performed according to the reflection degree of the cheek and lip to red light, and when the detection result is ambiguous, the nose and eyes are further considered, so that the accuracy of the detection result can be further improved.
In some embodiments, the set of target images further includes a fifth image of the region corresponding to the nose and a sixth image of the region corresponding to the eyes.
After determining the first average reflectance value corresponding to all pixels of the second image in the red light band, the second average reflectance value corresponding to all pixels of the third image in the red light band, and the third average reflectance value corresponding to all pixels of the fourth image in the red light band, the human skin detection method based on multispectral imaging according to the embodiment of the invention further includes: and respectively calculating a fourth average reflectance value corresponding to all pixels of the fifth image on the red light wave band and a fifth average reflectance value corresponding to all pixels of the sixth image on the red light wave band under the condition that the difference value between the first average reflectance value and the second average reflectance value is larger than a second target threshold and the difference value between the first average reflectance value and the third average reflectance value is smaller than or equal to the second target threshold.
And under the condition that at least one of the difference value between the first average reflectivity value and the third average reflectivity value and the difference value between the first average reflectivity value and the fourth average reflectivity value is larger than a second target threshold value, determining the skin of the face feature in the target multispectral image as real skin, thereby improving the accuracy of the detection result.
In some embodiments, as shown in fig. 2, in a case where the difference between the first average reflectance value and the second average reflectance value is greater than the second target threshold value and the difference between the first average reflectance value and the third average reflectance value is less than or equal to the second target threshold value, calculating a fourth average reflectance value corresponding to all pixels of the fifth image in the red light band and a fifth average reflectance value corresponding to all pixels of the sixth image in the red light band, respectively, may include steps 210, 220, and 230.
At step 210, a gray value corresponding to each pixel in the fourth image over the red band is determined.
Step 220, determining a target pixel in the fourth image having a gray value greater than the third target threshold and a target proportion of the total number of pixels in the fourth image for the target pixel.
In step 230, in the case that the target ratio is smaller than the fourth target threshold, a fourth average reflectance value corresponding to all pixels of the fifth image in the red light band and a fifth average reflectance value corresponding to all pixels of the sixth image in the red light band are calculated respectively.
It can be understood that, since the lip image may include more non-lip areas in the process of performing object segmentation, so as to affect the detection result, the fourth image corresponding to the lip area may be analyzed first to determine whether the fourth image includes more non-lip areas.
As the color of the lips is redder, a more distinct gray value can be obtained by utilizing the image corresponding to the red light wave band, and then the actual pixels of the lips and the skin pixels around the lips are distinguished.
On the basis of this, a target pixel in which the gray value of the pixel in the fourth image is larger than the third target threshold value and a target proportion of the total number of pixels of the target pixel in the fourth image may be determined.
The target pixel having a gray value greater than the third target threshold may be determined to be the actual lip region. The third target threshold value and the fourth target threshold value may be set according to actual conditions, and are not limited herein.
Under the condition that the target proportion is smaller than a fourth target threshold value, the fourth image contains more non-lip parts, more deviation possibly exists in the analysis result of lips, further, the fourth average reflectance value corresponding to all pixels of the fifth image on a red light wave band and the fifth average reflectance value corresponding to all pixels of the sixth image on the red light wave band can be calculated respectively, and analysis of nose and eye areas is introduced to assist in judging true and false skin, so that the detection accuracy is improved.
The human skin detection device based on multispectral imaging provided by the invention is described below, and the human skin detection device based on multispectral imaging described below and the human skin detection method based on multispectral imaging described above can be correspondingly referred to each other.
As shown in fig. 3, the human skin detection device based on multispectral imaging according to the embodiment of the invention mainly includes an acquisition module 310, a first processing module 320, a second processing module 330, a third processing module 340, a fourth processing module 350, and a fifth processing module 360.
The acquiring module 310 is configured to acquire a target multispectral image, where the target multispectral image includes a face feature;
the first processing module 320 is configured to identify a face feature in the target multispectral image, so as to obtain a first image corresponding to the face region;
the second processing module 330 is configured to perform feature recognition on the first image, and obtain a target image set after performing target segmentation on the first image; the target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lip;
the third processing module 340 is configured to determine a first average gray value corresponding to all pixels of the second image in the green light band and a second average gray value corresponding to all pixels of the third image in the green light band;
the fourth processing module 350 is configured to determine, if the difference between the second average gray value and the first average gray value is greater than the first target threshold, a first average reflectance value corresponding to all pixels of the second image in the red light band, a second average reflectance value corresponding to all pixels of the third image in the red light band, and a third average reflectance value corresponding to all pixels of the fourth image in the red light band;
The fifth processing module 360 is configured to determine that the skin of the face feature in the target multispectral image is real skin if the difference between the first average reflectance value and the second average reflectance value is greater than the second target threshold and the difference between the first average reflectance value and the third average reflectance value is greater than the second target threshold.
According to the human skin detection device based on multispectral imaging, the human face area in the target multispectral image is divided into different areas, the average gray values of the forehead and cheek parts are analyzed, the reflection degree of red light of different areas of the human face can be further analyzed under the condition that the accurate result of target segmentation of the different areas is ensured, namely, the analysis and comparison of reflection degree data of different parts in the same target multispectral image are performed, the reference data under the experimental condition are not used for comparison, the influence of different shooting scenes on the detection and analysis result can be eliminated, the skin conditions of different areas of the human face are detected, the accuracy of detection and identification of the human face skin is improved, and the false human face can be identified.
Fig. 4 illustrates a physical schematic diagram of an electronic device, as shown in fig. 4, which may include: processor 410, communication interface (Communications Interface) 420, memory 430 and communication bus 440, wherein processor 410, communication interface 420 and memory 430 communicate with each other via communication bus 440. The processor 410 may invoke logic instructions in the memory 430 to perform a multispectral imaging-based human skin detection method comprising: acquiring a target multispectral image, wherein the target multispectral image comprises human face features; identifying the face features in the target multispectral image to obtain a first image corresponding to the face region; performing feature recognition on the first image, and obtaining a target image set after target segmentation on the first image; the target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lip; determining a first average gray value corresponding to all pixels of the second image on a green light wave band and a second average gray value corresponding to all pixels of the third image on the green light wave band; determining a first average reflectance value corresponding to all pixels of the second image on the red light band, a second average reflectance value corresponding to all pixels of the third image on the red light band, and a third average reflectance value corresponding to all pixels of the fourth image on the red light band when the difference between the second average gray value and the first average gray value is greater than a first target threshold; and determining the skin of the face feature in the target multispectral image as real skin under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is larger than a second target threshold value and the difference value between the first average reflectivity value and the third average reflectivity value is larger than the second target threshold value.
Further, the logic instructions in the memory 430 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, the computer program product comprising a computer program, the computer program being storable on a non-transitory computer readable storage medium, the computer program, when executed by a processor, being capable of performing the method for detecting human skin based on multispectral imaging provided by the above methods, the method comprising: acquiring a target multispectral image, wherein the target multispectral image comprises human face features; identifying the face features in the target multispectral image to obtain a first image corresponding to the face region; performing feature recognition on the first image, and obtaining a target image set after target segmentation on the first image; the target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lip; determining a first average gray value corresponding to all pixels of the second image on a green light wave band and a second average gray value corresponding to all pixels of the third image on the green light wave band; determining a first average reflectance value corresponding to all pixels of the second image on the red light band, a second average reflectance value corresponding to all pixels of the third image on the red light band, and a third average reflectance value corresponding to all pixels of the fourth image on the red light band when the difference between the second average gray value and the first average gray value is greater than a first target threshold; and determining the skin of the face feature in the target multispectral image as real skin under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is larger than a second target threshold value and the difference value between the first average reflectivity value and the third average reflectivity value is larger than the second target threshold value.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the method for detecting human skin based on multispectral imaging provided by the above methods, the method comprising: acquiring a target multispectral image, wherein the target multispectral image comprises human face features; identifying the face features in the target multispectral image to obtain a first image corresponding to the face region; performing feature recognition on the first image, and obtaining a target image set after target segmentation on the first image; the target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lip; determining a first average gray value corresponding to all pixels of the second image on a green light wave band and a second average gray value corresponding to all pixels of the third image on the green light wave band; determining a first average reflectance value corresponding to all pixels of the second image on the red light band, a second average reflectance value corresponding to all pixels of the third image on the red light band, and a third average reflectance value corresponding to all pixels of the fourth image on the red light band when the difference between the second average gray value and the first average gray value is greater than a first target threshold; and determining the skin of the face feature in the target multispectral image as real skin under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is larger than a second target threshold value and the difference value between the first average reflectivity value and the third average reflectivity value is larger than the second target threshold value.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A human skin detection method based on multispectral imaging, comprising:
acquiring a target multispectral image, wherein the target multispectral image comprises human face features;
identifying the face features in the target multispectral image to obtain a first image corresponding to the face region;
performing feature recognition on the first image, and obtaining a target image set after target segmentation on the first image; the target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lip;
determining a first average gray value corresponding to all pixels of the second image on a green light wave band and a second average gray value corresponding to all pixels of the third image on the green light wave band;
Determining a first average reflectance value corresponding to all pixels of the second image on a red light band, a second average reflectance value corresponding to all pixels of the third image on the red light band, and a third average reflectance value corresponding to all pixels of the fourth image on the red light band, if the difference between the second average gray value and the first average gray value is greater than a first target threshold;
and determining the skin of the face feature in the target multispectral image to be real skin under the condition that the difference value between the first average reflectivity value and the second average reflectivity value is larger than a second target threshold value and the difference value between the first average reflectivity value and the third average reflectivity value is larger than the second target threshold value.
2. The multispectral imaging-based human skin detection method of claim 1, wherein the target image set further comprises a fifth image of an area corresponding to a nose and a sixth image of an area corresponding to an eye; after the determining the first average reflectance value corresponding to all pixels of the second image over the red band, the second average reflectance value corresponding to all pixels of the third image over the red band, and the third average reflectance value corresponding to all pixels of the fourth image over the red band, the method further comprises:
Calculating a fourth average reflectance value corresponding to all pixels of the fifth image on a red light band and a fifth average reflectance value corresponding to all pixels of the sixth image on the red light band respectively when the difference between the first average reflectance value and the second average reflectance value is greater than a second target threshold and the difference between the first average reflectance value and the third average reflectance value is less than or equal to the second target threshold;
and determining that the skin of the face feature in the target multispectral image is false skin when the difference value between the first average reflectivity value and the fourth average reflectivity value is smaller than or equal to the second target threshold value and the difference value between the first average reflectivity value and the fifth average reflectivity value is smaller than or equal to the second target threshold value.
3. The multispectral imaging-based human skin detection method of claim 1, wherein the target image set further comprises a fifth image of an area corresponding to a nose and a sixth image of an area corresponding to an eye; after the determining the first average reflectance value corresponding to all pixels of the second image over the red band, the second average reflectance value corresponding to all pixels of the third image over the red band, and the third average reflectance value corresponding to all pixels of the fourth image over the red band, the method further comprises:
Calculating a fourth average reflectance value corresponding to all pixels of the fifth image on a red light band and a fifth average reflectance value corresponding to all pixels of the sixth image on the red light band respectively when the difference between the first average reflectance value and the second average reflectance value is greater than a second target threshold and the difference between the first average reflectance value and the third average reflectance value is less than or equal to the second target threshold;
and determining that the skin of the face feature in the target multispectral image is real skin under the condition that at least one of the difference value of the first average reflectivity value and the fourth average reflectivity value and the difference value of the first average reflectivity value and the fifth average reflectivity value is larger than the second target threshold.
4. A human skin detection method based on multispectral imaging according to claim 2 or 3, wherein, in the case that the difference between the first average reflectance value and the second average reflectance value is greater than a second target threshold value, and the difference between the first average reflectance value and the third average reflectance value is less than or equal to the second target threshold value, calculating a fourth average reflectance value corresponding to all pixels of the fifth image in a red light band and a fifth average reflectance value corresponding to all pixels of the sixth image in a red light band respectively, comprises:
Determining a gray value corresponding to each pixel in the fourth image on a red light wave band;
determining a target pixel in the fourth image, the gray value of which is greater than a third target threshold value, and the target proportion of the total number of pixels of the target pixel in the fourth image;
and respectively calculating a fourth average reflectance value corresponding to all pixels of the fifth image on a red light wave band and a fifth average reflectance value corresponding to all pixels of the sixth image on the red light wave band under the condition that the target proportion is smaller than a fourth target threshold value.
5. The multispectral imaging-based human skin detection method of claim 1, wherein after the determining a first average reflectance value for all pixels of the second image over the red band, a second average reflectance value for all pixels of the third image over the red band, and a third average reflectance value for all pixels of the fourth image over the red band, the method further comprises:
and determining the skin of the face feature in the target multispectral image to be fake skin under the condition that the difference value of the first average reflectivity value and the second average reflectivity value is smaller than or equal to the second target threshold value and the difference value of the first average reflectivity value and the third average reflectivity value is smaller than or equal to the second target threshold value.
6. The multispectral imaging-based human skin detection method of claim 1, wherein the determining a first average gray value for all pixels of the second image over a green light band and a second average gray value for all pixels of the third image over a green light band comprises:
extracting a first sub-image of a channel corresponding to a green light wave band from the second image, and extracting a second sub-image of a channel corresponding to the green light wave band from the third image;
and determining the gray values of all pixels of the first sub-image, calculating an average value to obtain the first average gray value, and determining the gray values of all pixels of the second sub-image, and calculating an average value to obtain the second average gray value.
7. The multispectral imaging-based human skin detection method of claim 1, wherein the determining a first average reflectance value for all pixels of the second image over a red light band, a second average reflectance value for all pixels of the third image over a red light band, and a third average reflectance value for all pixels of the fourth image over a red light band comprises:
Extracting a third sub-image of a channel corresponding to a red light wave band from the second image, extracting a fourth sub-image of a channel corresponding to the red light wave band from the third image, and extracting a fifth sub-image of a channel corresponding to the red light wave band from the fourth image;
determining the relative reflectivity values of all pixels of the third sub-image, calculating an average value to obtain the first average reflectivity value, determining the relative reflectivity values of all pixels of the fourth sub-image, calculating an average value to obtain the second average reflectivity value, and determining the relative reflectivity values of all pixels of the fifth sub-image, and calculating an average value to obtain the third average reflectivity value.
8. A human skin detection device based on multispectral imaging is characterized in that,
the acquisition module is used for acquiring a target multispectral image, wherein the target multispectral image comprises human face features;
the first processing module is used for identifying the face characteristics in the target multispectral image to obtain a first image corresponding to the face area;
the second processing module is used for carrying out feature recognition on the first image and obtaining a target image set after the first image is subjected to target segmentation; the target image set at least comprises a second image of an area corresponding to the forehead, a third image of an area corresponding to the cheek and a fourth image of an area corresponding to the lip;
A third processing module, configured to determine a first average gray value corresponding to all pixels of the second image in a green light band and a second average gray value corresponding to all pixels of the third image in the green light band;
a fourth processing module, configured to determine a first average reflectance value corresponding to all pixels of the second image on a red light band, a second average reflectance value corresponding to all pixels of the third image on a red light band, and a third average reflectance value corresponding to all pixels of the fourth image on a red light band, where a difference between the second average gray value and the first average gray value is greater than a first target threshold;
and a fifth processing module, configured to determine that skin of the face feature in the target multispectral image is real skin when the difference between the first average reflectance value and the second average reflectance value is greater than a second target threshold, and the difference between the first average reflectance value and the third average reflectance value is greater than the second target threshold.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the multispectral imaging-based human skin detection method of any one of claims 1 to 7 when the program is executed by the processor.
10. A non-transitory computer readable storage medium having stored thereon a computer program, wherein the computer program when executed by a processor implements the multispectral imaging-based human skin detection method of any one of claims 1 to 7.
CN202310946179.9A 2023-07-31 2023-07-31 Human skin detection method and device based on multispectral imaging Active CN116959074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310946179.9A CN116959074B (en) 2023-07-31 2023-07-31 Human skin detection method and device based on multispectral imaging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310946179.9A CN116959074B (en) 2023-07-31 2023-07-31 Human skin detection method and device based on multispectral imaging

Publications (2)

Publication Number Publication Date
CN116959074A true CN116959074A (en) 2023-10-27
CN116959074B CN116959074B (en) 2024-09-10

Family

ID=88451036

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310946179.9A Active CN116959074B (en) 2023-07-31 2023-07-31 Human skin detection method and device based on multispectral imaging

Country Status (1)

Country Link
CN (1) CN116959074B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271964A (en) * 1995-02-06 1995-10-20 Takata Kogyosho:Kk Facial feature deciding method
CN107808115A (en) * 2017-09-27 2018-03-16 联想(北京)有限公司 A kind of biopsy method, device and storage medium
CN108764071A (en) * 2018-05-11 2018-11-06 四川大学 It is a kind of based on infrared and visible images real human face detection method and device
CN110069962A (en) * 2018-01-23 2019-07-30 深圳市祈飞科技有限公司 A kind of biopsy method and system
CN111814564A (en) * 2020-06-09 2020-10-23 广州视源电子科技股份有限公司 Multispectral image-based living body detection method, device, equipment and storage medium
CN113609907A (en) * 2021-07-01 2021-11-05 奥比中光科技集团股份有限公司 Method, device and equipment for acquiring multispectral data
WO2022111512A1 (en) * 2020-11-26 2022-06-02 杭州海康威视数字技术股份有限公司 Facial liveness detection method and apparatus, and device
CN115100714A (en) * 2022-06-27 2022-09-23 平安银行股份有限公司 Living body detection method and device based on face image and server
CN115393931A (en) * 2022-08-19 2022-11-25 奥比中光科技集团股份有限公司 Living body detection method, living body detection equipment and storage medium
US20220383021A1 (en) * 2021-05-21 2022-12-01 Ford Global Technologies, Llc Counterfeit image detection
US20220398406A1 (en) * 2021-06-09 2022-12-15 Nec Corporation Of America Detecting people wearing masks to prevent impersonation attacks
US20230206686A1 (en) * 2020-09-17 2023-06-29 Fujitsu Limited Face authentication method, storage medium, and face authentication device

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07271964A (en) * 1995-02-06 1995-10-20 Takata Kogyosho:Kk Facial feature deciding method
CN107808115A (en) * 2017-09-27 2018-03-16 联想(北京)有限公司 A kind of biopsy method, device and storage medium
CN110069962A (en) * 2018-01-23 2019-07-30 深圳市祈飞科技有限公司 A kind of biopsy method and system
CN108764071A (en) * 2018-05-11 2018-11-06 四川大学 It is a kind of based on infrared and visible images real human face detection method and device
CN111814564A (en) * 2020-06-09 2020-10-23 广州视源电子科技股份有限公司 Multispectral image-based living body detection method, device, equipment and storage medium
US20230206686A1 (en) * 2020-09-17 2023-06-29 Fujitsu Limited Face authentication method, storage medium, and face authentication device
WO2022111512A1 (en) * 2020-11-26 2022-06-02 杭州海康威视数字技术股份有限公司 Facial liveness detection method and apparatus, and device
US20220383021A1 (en) * 2021-05-21 2022-12-01 Ford Global Technologies, Llc Counterfeit image detection
US20220398406A1 (en) * 2021-06-09 2022-12-15 Nec Corporation Of America Detecting people wearing masks to prevent impersonation attacks
CN113609907A (en) * 2021-07-01 2021-11-05 奥比中光科技集团股份有限公司 Method, device and equipment for acquiring multispectral data
CN115100714A (en) * 2022-06-27 2022-09-23 平安银行股份有限公司 Living body detection method and device based on face image and server
CN115393931A (en) * 2022-08-19 2022-11-25 奥比中光科技集团股份有限公司 Living body detection method, living body detection equipment and storage medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
R. RAGHAVENDRA等: "Face Presentation Attack Detection by Exploring Spectral Signatures", 《 2017 IEEE CONFERENCE ON COMPUTER VISION AND PATTERN RECOGNITION WORKSHOPS (CVPRW)》, 24 August 2017 (2017-08-24), pages 672 - 679 *
SYED, WW (SYED, WAFA WAHEEDA)等: "Infrared Versus Visible Image Matching for Multispectral Face Recognition", 《 FOURTH INTERNATIONAL CONGRESS ON INFORMATION AND COMMUNICATION TECHNOLOGY》, vol. 2, no. 1027, 18 June 2021 (2021-06-18), pages 497 - 507 *
张淑姚等: "人脸识别活体检测技术研究", 《信息记录材料》, no. 06, 1 June 2018 (2018-06-01), pages 123 - 124 *
王辉等: "人脸活体特征检测实验平台设计与实现", 《实验技术与管理》, no. 05, 22 May 2018 (2018-05-22), pages 86 - 89 *
胡妙春: "多光谱人脸活体检测特征的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》, no. 9, 15 September 2015 (2015-09-15), pages 138 - 1428 *
计算机视觉研究院: "改进的阴影抑制用于光照鲁棒的人脸识别", Retrieved from the Internet <URL:https://blog.csdn.net/gzq0723/article/details/90036533> *

Also Published As

Publication number Publication date
CN116959074B (en) 2024-09-10

Similar Documents

Publication Publication Date Title
CN108038456B (en) Anti-deception method in face recognition system
CN110852160B (en) Image-based biometric identification system and computer-implemented method
US9351683B2 (en) Wrinkle detection method, wrinkle detection device and recording medium storing wrinkle detection program, as well as wrinkle evaluation method, wrinkle evaluation device and recording medium storing wrinkle evaluation program
US11514270B2 (en) Speckle contrast analysis using machine learning for visualizing flow
EP1480168B1 (en) Method and apparatus for red-eye detection
US8548257B2 (en) Distinguishing between faces and non-faces
CN110969077A (en) Living body detection method based on color change
CN111524080A (en) Face skin feature identification method, terminal and computer equipment
KR20230116095A (en) Systems and methods for performing fingerprint based user authentication using imagery captured using mobile devices
CN112991345B (en) Image authenticity detection method and device, computer equipment and storage medium
KR101315646B1 (en) Method and apparatus for finger vein pattern extraction using guided gabor filter
CN106372629A (en) Living body detection method and device
WO2009029638A1 (en) Iris recognition
CN112396011A (en) Face recognition system based on video image heart rate detection and living body detection
JPWO2020095739A1 (en) Information processing equipment, information processing methods, and programs
EP3580725A1 (en) A method of matching colours
Thamaraimanalan et al. Multi biometric authentication using SVM and ANN classifiers
KR101436988B1 (en) Method and Apparatus of Skin Pigmentation Detection Using Projection Transformed Block Coefficient
EP3180736A1 (en) A method of detecting a falsified presentation to a vascular recognition system
KR101870226B1 (en) Apparatus and method for detecting fake biometrics
CN116959074B (en) Human skin detection method and device based on multispectral imaging
CN112861588A (en) Living body detection method and device
WO2022120532A1 (en) Presentation attack detection
WO2024009005A1 (en) Method, apparatus, and computer program product for face liveness detection
CN117649688A (en) Near infrared image-based image recognition method, system and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant