CN112070065A - Method and device for detecting infrared image and depth image and face recognition system - Google Patents

Method and device for detecting infrared image and depth image and face recognition system Download PDF

Info

Publication number
CN112070065A
CN112070065A CN202011066614.1A CN202011066614A CN112070065A CN 112070065 A CN112070065 A CN 112070065A CN 202011066614 A CN202011066614 A CN 202011066614A CN 112070065 A CN112070065 A CN 112070065A
Authority
CN
China
Prior art keywords
image
infrared
detected
face recognition
depth
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.)
Pending
Application number
CN202011066614.1A
Other languages
Chinese (zh)
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.)
Shenzhen Orbbec Co Ltd
Original Assignee
Shenzhen Orbbec Co Ltd
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 Shenzhen Orbbec Co Ltd filed Critical Shenzhen Orbbec Co Ltd
Priority to CN202011066614.1A priority Critical patent/CN112070065A/en
Publication of CN112070065A publication Critical patent/CN112070065A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]

Abstract

The invention discloses a method and a device for detecting an infrared image and a depth image and a face recognition system, and the method comprises the following steps: s200, acquiring an image to be detected which is acquired by a camera within a preset distance range and contains a target; s210, traversing pixel points of the image to be detected, detecting whether pixel points in a preset distance range exist or not, and if yes, judging that the image to be detected is a depth image; if the infrared image does not exist, judging that the image to be detected is an infrared image; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image. The invention can accurately and effectively distinguish the infrared image and the depth image, and respectively input the distinguished infrared image and the distinguished depth image into the corresponding face recognition models, thereby improving the efficiency and the accuracy of face recognition.

Description

Method and device for detecting infrared image and depth image and face recognition system
Technical Field
The invention relates to the technical field of digital image processing, in particular to a method and a device for detecting an infrared image and a depth image and a face recognition system.
Background
Face recognition has gradually entered into people's daily life, and for example, the face recognition is applied to a plurality of fields such as security check, traffic, face brushing payment and the like. The face recognition is a biological recognition technology for identity recognition based on facial feature information of a face, and a series of activities for recognizing the detected face are performed by acquiring images or video stream data containing the face by using a camera or a camera and processing the data according to a corresponding algorithm program.
Generally, RGB images (color images), IR images (gray images) and depth images (depth images) are commonly used for face recognition, and different images should be processed and recognized by different algorithms; the RGB image needs to be processed by adopting a face recognition algorithm program based on the RGB image, the IR image needs to be processed by adopting a face recognition algorithm program based on the IR image, and the depth image needs to be processed by adopting a face recognition algorithm program based on the depth image.
In the prior art, an IR image and a depth image usually share one camera to acquire images, and the acquired images are respectively put into corresponding face recognition algorithm programs to be processed, so as to complete face recognition; however, in practical applications, it is easy to mistakenly take the IR image as a depth image and mistakenly place the depth image in a living body face recognition algorithm based on the depth image, or mistakenly place the depth image in a face recognition algorithm based on the IR image, thereby resulting in a wrong recognition result.
Therefore, in order to solve the problems in the prior art, it is necessary to develop a technical scheme for distinguishing the IR image from the depth image, and respectively transmitting the distinguished IR image and depth image into corresponding face recognition algorithms to ensure that a correct recognition result is obtained.
The above background disclosure is only for the purpose of assisting understanding of the inventive concept and technical solutions of the present invention, and does not necessarily belong to the prior art of the present patent application, and should not be used for evaluating the novelty and inventive step of the present application in the case that there is no clear evidence that the above content is disclosed at the filing date of the present patent application.
Disclosure of Invention
The present invention is directed to a method and an apparatus for detecting an infrared image and a depth image, and a face recognition system, so as to solve at least one of the above-mentioned problems in the background art.
In order to achieve the above purpose, the technical solution of the embodiment of the present invention is realized as follows:
a method for detecting an infrared image and a depth image comprises the following steps:
s200, acquiring an image to be detected which is acquired by a camera within a preset distance range and contains a target;
s210, traversing pixel points of the image to be detected, detecting whether pixel points in a preset distance range exist or not, and if yes, judging that the image to be detected is a depth image; if the infrared image does not exist, judging that the image to be detected is an infrared image; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image.
In some embodiments, a static image is collected by an infrared camera as the image to be detected; or acquiring continuous video streams through an infrared camera, and selecting one or more frames of images from the acquired video streams as the images to be detected.
In some embodiments, there is further included the step of: and carrying out image digital processing on the acquired image to be detected to obtain a digital image.
In some embodiments, the method further comprises the steps of:
s220, inputting the image to be detected into a corresponding face recognition model for face recognition.
In some embodiments, when the image to be detected is an infrared image, the infrared image is input into an infrared face recognition model; and when the image to be detected is a depth image, inputting the depth image into a depth face recognition model.
The other technical scheme of the embodiment of the invention is as follows:
an apparatus for detecting infrared images and depth images, comprising:
the infrared camera is used for collecting an image to be detected containing a target within a preset distance range;
the processor is used for traversing pixel points of the image to be detected, detecting whether pixel points in a preset distance range exist or not, judging that the image to be detected is a depth image if the pixel points exist, and judging that the image to be detected is an infrared image if the pixel points do not exist; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image.
In some embodiments, the infrared camera comprises an infrared emission module and a camera module; the infrared emission module emits infrared light to irradiate the target, and the camera module collects images obtained by reflecting the target.
In some embodiments, the processor comprises a single processor or a plurality of processor units of different functionality.
The embodiment of the invention adopts another technical scheme that:
a face recognition system comprises the device for detecting the infrared image and the depth image and the face recognition device in the technical scheme of any embodiment; the device for detecting the infrared image and the depth image is used for identifying an acquired image to be detected and inputting the image to be detected into the face recognition device; the face recognition device is used for carrying out face recognition on the input image to be detected.
In some embodiments, the face recognition apparatus includes:
the infrared face recognition model is used for carrying out face recognition on the input infrared image;
and the depth face recognition model is used for carrying out face recognition on the input depth image.
The technical scheme of the invention has the beneficial effects that:
compared with the prior art, the method and the device for detecting the infrared image and the depth image and the face recognition system can accurately and effectively distinguish the infrared image and the depth image, and respectively input the distinguished infrared image and the distinguished depth image into the corresponding face recognition models, so that the efficiency and the accuracy of face recognition can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flowchart illustration of a method of detecting an infrared image and a depth image according to one embodiment of the invention.
Fig. 2 is a schematic block diagram of an apparatus for detecting an infrared image and a depth image according to an embodiment of the present invention.
Fig. 3 is a schematic block diagram of a face recognition system using the apparatus for detecting infrared images and depth images of the embodiment of fig. 2.
FIG. 4 is a flowchart illustration of a method of detecting an infrared image and a depth image according to another embodiment of the invention.
Fig. 5 is a schematic block diagram of an apparatus for detecting an infrared image and a depth image according to another embodiment of the present invention.
Fig. 6 is a schematic block diagram of a face recognition system using the apparatus for detecting infrared images and depth images in the embodiment of fig. 5.
FIG. 7 is a flowchart illustration of a method of detecting an infrared image and a depth image in accordance with yet another embodiment of the invention.
Fig. 8 is a schematic block diagram of a method and apparatus for detecting an infrared image and a depth image according to another embodiment of the present invention.
Fig. 9 is a schematic block diagram of a face recognition system using the apparatus for detecting infrared images and depth images of the embodiment of fig. 8.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the embodiments of the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It will be understood that when an element is referred to as being "secured to" or "disposed on" another element, it can be directly on the other element or be indirectly on the other element. When an element is referred to as being "connected to" another element, it can be directly connected to the other element or be indirectly connected to the other element. The connection may be for fixation or for circuit connection.
It is to be understood that the terms "length," "width," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are used in an orientation or positional relationship indicated in the drawings for convenience in describing the embodiments of the present invention and to simplify the description, and are not intended to indicate or imply that the referenced device or element must have a particular orientation, be constructed in a particular orientation, and be in any way limiting of the present invention.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present invention, "a plurality" means two or more unless specifically limited otherwise.
Referring to fig. 1, fig. 1 is a flowchart of a method for detecting an infrared image and a depth image according to an embodiment of the present disclosure, where the method includes the following steps:
s100, acquiring an image to be detected which is acquired by a camera and contains a target;
in one embodiment, an infrared camera is utilized to capture images; the infrared camera can acquire static images, such as pictures in formats of JPEG, TIFF, BMP, GIF, PNG, RAW and the like. Or the infrared camera can also collect continuous video streams, and then one or more frames of images are selected from the collected video streams as images to be detected; accordingly, the image to be detected may be a still image or a video frame image, which is not limited herein.
S110, performing binarization processing on the acquired image to be detected to obtain a binarized image;
for easy understanding, the digital image is briefly described, the digital image is obtained by discretizing a continuous analog image, the digital image can be identified by a computer as a dot matrix image, each digital image is composed of a plurality of pixel points, and each pixel point has attributes such as color, gray level and the like. In the RGB image, the color of each pixel point has R, G, B three components, and each component has 255 values; the IR image, i.e. the gray image, is an image containing only luminance information and no color information, and the variation range of each pixel point in the gray image has 256 kinds, i.e. the image is composed of 256 kinds of colors with different gray levels, generally 0 represents pure black, 255 represents pure white, the middle color is gradually changed from black to white, i.e. the increase of the number 0 to 255 is the increase of luminance.
The binarization processing of the image is to define the gray value of a pixel point on the image as 0 or 255 (actual codes are mapped to 0 and 1); wherein, 0 is pure black, 1 is pure white, make the whole picture present the obvious black and white effect, namely the gray scale image of 256 brightness levels is chosen and got and still can reflect the image whole and two quantification images of the local characteristic through the appropriate threshold value; specifically, a threshold value is determined, each pixel point of the 0-255 gray level image is traversed, if the gray level value of the pixel point is larger than the threshold value, the pixel point is set to be 1, and if not, the pixel point is set to be 0. The collective nature of the image is only related to the position of the point having a pixel value of 0 or 255, and the multi-level value of the pixel is not involved, so that the processing becomes simple and the amount of processing and compression of data is small.
Specifically, in one embodiment, a pixel value K with the maximum target edge gradient in the image to be detected is selected, binarization of the image to be detected is performed by using a pixel value method, the pixel value with the pixel value smaller than K is set to be 0, and the pixel value with the pixel value greater than or equal to K is set to be 255, so that a binarized image is obtained. It should be noted that the image to be detected may not include the target object, that is, the acquired image may be a pure background image, and therefore, other methods may also be used to perform binarization processing on the image, which is not limited herein.
S120, traversing and calculating the area of a connected region formed by pixel points with continuous pixel values of 0 in a target region of the binary image;
s130, comparing the area of the communication area with the size of a preset area threshold value, judging that the image to be detected is a depth image when the area of the communication area is larger than the preset area threshold value, and judging that the image to be detected is an infrared image when the area of the communication area is smaller than the preset area threshold value.
It can be understood that when the infrared camera collects an image, the infrared camera automatically compensates for the pixel value, and therefore, the situation that the continuous pixel value is 0 rarely occurs in the infrared image. For the depth image, a large number of values in the first row of the image is 0, and the depth value of the pixel point where the depth cannot be measured is 0. Therefore, whether the image to be detected is an infrared image or a depth image can be judged by calculating the area of a connected region formed by pixel points with continuous pixel values of 0.
In some embodiments, the above method further comprises the steps of:
and S140, inputting the image to be detected into a corresponding face recognition model for face recognition.
And determining an image to be detected according to the comparison and judgment result in the step S130, and inputting the image to be detected into a corresponding face recognition model for face recognition. Specifically, for example: when the image to be detected is an infrared image, inputting the infrared image into an infrared face recognition model; and when the image to be detected is a depth image, inputting the depth image into a depth face recognition model. Generally, the face detection includes two steps of living body detection and feature comparison, different images use different algorithms of living body detection and feature comparison, and if infrared images are input into a depth face recognition model or depth images are input into the infrared face recognition model, the recognition effect is greatly influenced. Therefore, in the embodiment of the invention, the images are distinguished, whether the images are infrared images or depth images is identified, and then the identified infrared images and depth images are respectively input into the corresponding face identification models, so that the efficiency and the precision of face identification are improved.
Referring to fig. 2, fig. 2 is a diagram illustrating an apparatus 200 for detecting an infrared image and a depth image according to another embodiment of the present disclosure, where the apparatus includes: the infrared camera is used for collecting an image to be detected containing a target; the processor is used for carrying out binarization processing on the image to be detected to obtain a binarized image, and traversing and calculating the area of a communication region formed by pixel points with continuous pixel values of 0 in a target region of the binarized image; and comparing the area of the communication area with the size of a preset area threshold value, judging that the image to be detected is a depth image when the area of the communication area is larger than the area threshold value, and judging that the image to be detected is an infrared image when the area of the communication area is smaller than the preset area threshold value.
In some embodiments, the infrared camera comprises an infrared emission module and a camera module; the infrared emitting module emits infrared rays to irradiate the target, and the camera module collects images obtained by reflecting the target.
In some embodiments, a pixel value of the image to be detected with the largest target edge gradient is selected as a threshold value by the processor, a pixel value of which the pixel point value is smaller than the threshold value is set as 0, and a pixel value of which the pixel point value is greater than or equal to the threshold value is set as 255, so as to obtain a binarized image.
It should be noted that the apparatus 200 for detecting an infrared image and a depth image in the embodiment of fig. 2 is used for executing the method in the embodiment of fig. 1, and specific description refers to the embodiment of fig. 1, which is not repeated herein.
Referring to fig. 3, fig. 3 is a face recognition system 300 according to another embodiment of the present application, including the apparatus 200 for detecting an infrared image and a depth image and the face recognition apparatus 210 according to the above-mentioned embodiments; the device 200 for detecting infrared images and depth images is used for identifying the collected images to be detected and inputting the images to be detected into the face recognition device 210; the face recognition apparatus 210 includes: an infrared face recognition model 211 for performing face recognition on an input infrared image; and the depth face recognition model 212 is used for carrying out face recognition on the input depth image. Different images are input into the corresponding face recognition models, so that the face recognition efficiency and accuracy can be improved.
It can be understood that the pixel values of the pixel points in the infrared image represent gray levels, and the pixel values of the pixel points in the depth image represent depths (distances), for example, in an 8-bit infrared image, the gray level range is [0,255], and there are no pixel points with gray levels greater than 255 in the infrared image, so that for an image collected in some distance ranges, the infrared image and the depth image can be distinguished by traversing the pixel points which do not exist in the infrared image.
Referring to fig. 4, fig. 4 shows a method for detecting an infrared image and a depth image according to another embodiment of the present application, the method including the steps of:
s200, acquiring an image to be detected which is acquired by a camera within a preset distance range and contains a target;
in one embodiment, the image is captured by an infrared camera, wherein the infrared camera can capture still images, such as pictures in JPEG, TIFF, BMP, GIF, PNG, RAW format, etc. Or the infrared camera can also collect continuous video streams, and then one or more frames of images are selected from the collected video streams as images to be detected; accordingly, the image to be detected may be a still image or a video frame image, which is not limited herein.
S210, traversing pixel points of the image to be detected, detecting whether pixel points in a preset distance range exist or not, and if yes, judging that the image to be detected is a depth image; if the infrared image does not exist, judging that the image to be detected is an infrared image; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image.
In some embodiments, the distance range between the camera and the target is known, for example, in some three-dimensional reconstruction or face-brushing scenes, the target and the camera must be within a certain distance range to obtain a more ideal image due to the limitation Of the camera FOV (field Of View). If the distance range between the target and the camera is 300mm and 1000mm, for an 8-bit infrared image, no pixel point with the pixel value range of 300 and 1000 can exist, at the moment, whether a pixel point with the pixel value of 300 and 1000 exists in the image to be detected can be traversed, if not, the image to be detected can be judged to be the infrared image, and if not, the image to be detected is a depth image.
It should be understood that the acquired images are digitized into digital images before being recognized and processed by a processor (computer), and the image digitization is the discretization of continuous images, mainly including the processing of sampling and quantization. Sampling is the spatial division of a continuous image into M × N grids, one grid being called a pixel, each grid being represented by a luminance value. Quantization is the process of converting the corresponding continuous brightness variation interval on the sampling point into a single specific number. The 8-bit infrared image refers to 8-bit quantization, and the corresponding gray level is generally [0,255 ]; therefore, the image can also be subjected to 10-bit quantization processing, and the corresponding gray level is generally [0,1023], in which case the minimum value of the distance range between the target and the camera should be greater than 1023, and the processing can be performed according to the actual situation in practical application, which is not limited herein.
In some embodiments, the above method further comprises the steps of:
s220, inputting the image to be detected into a corresponding face recognition model for face recognition.
And determining whether the image to be detected is a depth image or an infrared image according to the comparison and judgment result in the step S210, and inputting the image to be detected into a corresponding face recognition model for face recognition. Specifically, for example, when the image to be detected is an infrared image, the infrared image is input into an infrared face recognition model; and when the image to be detected is a depth image, inputting the depth image into a depth face recognition model. Generally, the face detection includes two steps of living body detection and feature comparison, different images use different algorithms of living body detection and feature comparison, and if infrared images are input into a depth face recognition model or depth images are input into the infrared face recognition model, the recognition effect is greatly influenced. Therefore, in the embodiment of the invention, the images are firstly distinguished, the infrared image and the depth image are identified, and then the identified infrared image and the identified depth image are respectively input into the corresponding face identification models, so that the efficiency and the precision of face identification can be greatly improved.
Referring to fig. 5, fig. 5 is a diagram illustrating an apparatus 500 for detecting an infrared image and a depth image according to another embodiment of the present disclosure, where the apparatus includes: the infrared camera is used for collecting an image to be detected containing a target within a preset distance range; the processor is used for traversing pixel points of the image to be detected, detecting whether pixel points in a preset distance range exist or not, judging that the image to be detected is a depth image if the pixel points exist, and judging that the image to be detected is an infrared image if the pixel points do not exist; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image. In some embodiments, the infrared camera includes an infrared emission module and a camera module, and the infrared emission module emits infrared light to illuminate the target, and the infrared light is reflected by the target and is collected by the camera module to obtain an image of the target.
It should be noted that the processor may be a single processor, or may include multiple processor units, such as processor units with different functions. In some embodiments, the processor may also be an integrated System On Chip (SOC) including, without limitation, a central processing unit, an on-chip memory, a controller, a communication interface, and the like.
It should be noted that the apparatus 200 for detecting an infrared image and a depth image in the embodiment of fig. 5 is used for executing the method in the embodiment of fig. 4, and specific description refers to the embodiment of fig. 4, which is not repeated herein.
Referring to fig. 6, fig. 6 is a face recognition system 600 according to another embodiment of the present application, including an apparatus 500 for detecting an infrared image and a depth image in the embodiment shown in fig. 5, for distinguishing a captured image to be detected; the face recognition device 510 is used for receiving the image output by the device 500 for detecting infrared images and depth images, and comprises an infrared face recognition model 511 for performing face recognition on the input infrared image; and the depth face recognition model 512 is used for carrying out face recognition on the input depth image. Different images are input into the corresponding face recognition models, so that the face recognition efficiency and accuracy can be improved.
In the method for detecting an infrared image and a depth image shown in fig. 4, there is a certain limit to the distance range between the camera and the target, so that once the distance falls within the range of the gray-scale value corresponding to the infrared image, the method will fail; in the method for detecting an infrared image and a depth image shown in fig. 1, although the distance between the camera and the target is not limited, the same processing needs to be performed on images acquired at all distances, a large amount of resources are occupied, and the method is not concise.
Referring to fig. 7, as another embodiment of the present application, a method for detecting an infrared image and a depth image is further provided, and fig. 7 is a flowchart of a method for detecting an infrared image and a depth image according to another embodiment of the present application, where the method includes the following steps:
s300, acquiring an image to be detected which is acquired by a camera and contains a target;
in one embodiment, an infrared camera is utilized to capture images; the infrared camera can acquire static images, such as pictures in formats of JPEG, TIFF, BMP, GIF, PNG, RAW and the like. Or the infrared camera can also collect continuous video streams, and then one or more frames of images are selected from the collected video streams as images to be detected; accordingly, the image to be detected may be a still image or a video frame image, and is not limited herein.
S310, estimating a distance value d between the target and the camera according to the image to be detected;
in one embodiment, estimating the distance value d between the target and the camera comprises the following steps:
s3101, calculating the proportion of the target in the image to be detected;
s3102, calculating the distance value d according to the proportion and a preset distance coefficient; the distance coefficient is related to the intensity of infrared light emitted by the camera, and the larger the intensity of the infrared light is, the smaller the distance coefficient is.
It should be noted that the distance d may also be estimated by other methods, which are not limited in the embodiment of the present invention, and any other suitable methods may also be used in the present application.
S320, judging whether the distance value d is within the pixel value range of the infrared image, and detecting the image to be detected according to the judgment result so as to determine that the image to be detected is a depth image or an infrared image.
In step S320, if the distance value d is within the pixel value range of the infrared image, the detecting the image to be detected includes the following steps:
s3201, carrying out binarization processing on the acquired image to be detected to obtain a binarized image;
in one embodiment, a pixel value K with the maximum target edge gradient in an image to be detected is selected, binarization of the image to be detected is performed by using a pixel value method, the pixel value with the pixel value smaller than K is set to be 0, and the pixel value with the pixel value greater than or equal to K is set to be 255, so that a binarized image is obtained.
S3202, traversing and calculating the area of a connected region formed by pixel points with continuous pixel values of 0 in a target region of the binary image;
s3203, comparing the area of the communication area with the size of a preset area threshold, judging that the image to be detected is a depth image when the area of the communication area is larger than the preset area threshold, and judging that the image to be detected is an infrared image when the area of the communication area is smaller than the preset area threshold.
It can be understood that when the infrared camera collects an image, the infrared camera automatically compensates for the pixel value, and therefore, the situation that the continuous pixel value is 0 rarely occurs in the infrared image. For the depth image, a large number of values in the first row of the image is 0, and the depth value of the pixel point where the depth cannot be measured is 0. Therefore, whether the image is an infrared image or a depth image can be determined by calculating the area of a connected region formed by pixel points whose pixel values are continuously 0.
In step S320, if the distance value d is not within the pixel value range of the infrared image, the detecting the image to be detected includes the following steps:
s3210, traversing pixel points of the image to be detected, detecting whether pixel points in a preset distance range exist, if so, judging that the image to be detected is a depth image, and if not, judging that the image to be detected is an infrared image; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image.
In some embodiments, the above method further comprises the steps of:
s330, inputting the image to be detected into a corresponding face recognition model for face recognition.
And determining whether the image to be detected is a depth image or an infrared image according to the detection in the step S320, and respectively inputting the depth image and the infrared image determined by the detection into corresponding face recognition models for face recognition. Specifically, for example, when the image to be detected is an infrared image, the infrared image is input into an infrared face recognition model; and when the image to be detected is a depth image, inputting the depth image into a depth face recognition model. Generally, the face detection includes two steps of living body detection and feature comparison, different images use different algorithms of living body detection and feature comparison, and if infrared images are input into a depth face recognition model or depth images are input into the infrared face recognition model, the recognition effect is greatly influenced. Therefore, in the embodiment of the invention, the image is firstly distinguished to distinguish whether the image is an infrared image or a depth image, and then the distinguished infrared image and the distinguished depth image are respectively input into the corresponding face recognition models, so that the face recognition efficiency and precision are improved.
Referring to fig. 8, fig. 8 is a diagram illustrating an apparatus 700 for detecting an infrared image and a depth image according to another embodiment of the present disclosure, where the apparatus includes: the infrared camera is used for collecting an image to be detected containing a target; and the processor is used for estimating a distance value d between the target and the infrared camera according to the image to be detected, judging whether the distance value d is within a pixel value range of the infrared image, and detecting the image to be detected according to a judgment result so as to determine that the image to be detected is a depth image or an infrared image. In some embodiments, the infrared camera comprises an infrared emission module and a camera module; the infrared emitting module emits infrared rays to irradiate the target, and the camera module collects images obtained by reflecting the target.
Specifically, when the judgment result is that the distance value d is within the pixel value range of the infrared image, the processor is further configured to perform binarization processing on the image to be detected to obtain a binarized image, and traverse and calculate the area of a connected region formed by pixel points of which the pixel values are continuously 0 in a target region of the binarized image; and comparing the area of the communication area with the size of a preset area threshold value, judging that the image to be detected is a depth image when the area of the communication area is larger than the area threshold value, and judging that the image to be detected is an infrared image when the area of the communication area is smaller than the preset area threshold value.
When the judgment result is that the distance value d is not within the pixel value range of the infrared image, the processor is further used for traversing pixel points of the image to be detected, detecting whether pixel points within a preset distance range exist or not, if yes, judging that the image to be detected is a depth image, and if not, judging that the image to be detected is the infrared image; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image.
It should be noted that the processor may be a single processor, or may include multiple processor units, such as processor units with different functions. In some embodiments, the processor may also be an integrated System On Chip (SOC) including, without limitation, a central processing unit, an on-chip memory, a controller, a communication interface, and the like.
It should be noted that the apparatus 200 for detecting an infrared image and a depth image in the embodiment of fig. 8 is used for executing the method in the embodiment of fig. 7, and specific description refers to the embodiment of fig. 7, which is not repeated herein.
Referring to fig. 9, fig. 9 is a face recognition system 800 according to another embodiment of the present application, including an apparatus 700 for detecting an infrared image and a depth image and a face recognition apparatus 710 in the embodiment shown in fig. 8; the device 700 for detecting infrared images and depth images is used for distinguishing the collected images to be detected and inputting the images to be detected into the face recognition device 710; the face recognition device 710 includes an infrared face recognition model 711, configured to perform face recognition on an input infrared image; and a depth face recognition model 712 for performing face recognition on the input depth image. Different images are input into corresponding face recognition models, so that the face recognition efficiency and accuracy can be improved.
An embodiment of the present invention further provides a storage medium for storing a computer program, where the computer program is executed to at least perform the method for detecting an infrared image and a depth image according to any of the embodiments described above.
The storage medium may be implemented by any type of volatile or non-volatile storage device, or combination thereof. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an erasable Programmable Read-Only Memory (EPROM), an electrically erasable Programmable Read-Only Memory (EEPROM), a magnetic random Access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical Disc, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data rate Synchronous Dynamic Random Access Memory (DDRSDRAM, Double Data rate Synchronous Dynamic Random Access Memory), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous link Dynamic Random Access Memory (SLDRAM, Synchronous Dynamic Random Access Memory (DRAM), Direct Memory (DRM, Random Access Memory). The storage media described in connection with the embodiments of the invention are intended to comprise, without being limited to, these and any other suitable types of memory.
Embodiments of the present invention may comprise or utilize a special purpose or general-purpose computer including computer hardware, as discussed in greater detail below. Embodiments within the scope of the present invention also include physical and other computer-readable media for carrying or storing computer-executable instructions and/or data structures. Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer system. The computer-readable medium storing the computer-executable instructions is a physical storage medium. Computer-readable media carrying computer-executable instructions are transmission media. Thus, by way of example, and not limitation, embodiments of the invention can include at least two distinct computer-readable media: physical computer-readable storage media and transmission computer-readable media.
The embodiment of the present application further provides a computer device, where the computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement at least the method for detecting an infrared image and a depth image in any of the foregoing embodiments.
It is to be understood that the foregoing is a more detailed description of the invention, and that specific embodiments are not to be considered as limiting the invention. It will be apparent to those skilled in the art that various substitutions and modifications can be made to the described embodiments without departing from the spirit of the invention, and these substitutions and modifications should be considered to fall within the scope of the invention. In the description herein, references to the description of the term "one embodiment," "some embodiments," "preferred embodiments," "an example," "a specific example," or "some examples" or the like are intended to mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention.
In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction. Although embodiments of the present invention and their advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the scope of the invention as defined by the appended claims.
Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. One of ordinary skill in the art will readily appreciate that the above-disclosed, presently existing or later to be developed, processes, machines, manufacture, compositions of matter, means, methods, or steps, that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.

Claims (10)

1. A method for detecting an infrared image and a depth image is characterized by comprising the following steps:
s200, acquiring an image to be detected which is acquired by a camera within a preset distance range and contains a target;
s210, traversing pixel points of the image to be detected, detecting whether pixel points in a preset distance range exist or not, and if yes, judging that the image to be detected is a depth image; if the infrared image does not exist, judging that the image to be detected is an infrared image; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image.
2. The method of detecting infrared images and depth images of claim 1, wherein: in the step S200, a static image is collected by an infrared camera and is used as the image to be detected; or acquiring continuous video streams through an infrared camera, and selecting one or more frames of images from the acquired video streams as the images to be detected.
3. The method of detecting infrared images and depth images of claim 1, wherein: in step S210, the method further includes the steps of: and carrying out image digital processing on the acquired image to be detected to obtain a digital image.
4. The method of detecting infrared images and depth images of claim 1, further comprising the steps of:
s220, inputting the image to be detected into a corresponding face recognition model for face recognition.
5. The method of detecting infrared images and depth images of claim 4, wherein: when the image to be detected is an infrared image, inputting the infrared image into an infrared face recognition model; and when the image to be detected is a depth image, inputting the depth image into a depth face recognition model.
6. An apparatus for detecting infrared images and depth images, comprising:
the infrared camera is used for collecting an image to be detected containing a target within a preset distance range;
the processor is used for traversing pixel points of the image to be detected, detecting whether pixel points in a preset distance range exist or not, judging that the image to be detected is a depth image if the pixel points exist, and judging that the image to be detected is an infrared image if the pixel points do not exist; and the minimum value of the preset distance range is greater than the maximum pixel value of the infrared image.
7. The apparatus for detecting infrared images and depth images of claim 6, wherein: the infrared camera comprises an infrared emission module and a camera module; the infrared emission module emits infrared light to irradiate a target, and the camera module collects an image obtained by reflecting the target.
8. The apparatus for detecting infrared images and depth images of claim 6, wherein: the processor may comprise a single processor or a plurality of processor units of different functionality.
9. A face recognition system comprising the apparatus for detecting infrared images and depth images according to any one of claims 6 to 8, and a face recognition apparatus; the device for detecting the infrared image and the depth image is used for identifying an acquired image to be detected and inputting the image to be detected into the face recognition device; the face recognition device is used for carrying out face recognition on the input image to be detected.
10. The face recognition system of claim 9, wherein: the face recognition apparatus includes:
the infrared face recognition model is used for carrying out face recognition on the input infrared image;
and the depth face recognition model is used for carrying out face recognition on the input depth image.
CN202011066614.1A 2020-10-01 2020-10-01 Method and device for detecting infrared image and depth image and face recognition system Pending CN112070065A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011066614.1A CN112070065A (en) 2020-10-01 2020-10-01 Method and device for detecting infrared image and depth image and face recognition system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011066614.1A CN112070065A (en) 2020-10-01 2020-10-01 Method and device for detecting infrared image and depth image and face recognition system

Publications (1)

Publication Number Publication Date
CN112070065A true CN112070065A (en) 2020-12-11

Family

ID=73683971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011066614.1A Pending CN112070065A (en) 2020-10-01 2020-10-01 Method and device for detecting infrared image and depth image and face recognition system

Country Status (1)

Country Link
CN (1) CN112070065A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110079714A1 (en) * 2009-10-01 2011-04-07 Microsoft Corporation Imager for constructing color and depth images
US20120133737A1 (en) * 2010-11-30 2012-05-31 Min Dong-Ki Image sensor for simultaneously obtaining color image and depth image, method of operating the image sensor, and image processing sytem including the image sensor
US20160171340A1 (en) * 2014-12-11 2016-06-16 Intel Corporation Labeling component parts of objects and detecting component properties in imaging data
CN108764053A (en) * 2018-04-28 2018-11-06 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
US20200120237A1 (en) * 2018-10-15 2020-04-16 Lips Corporation Processing method using depth image detection
CN111078014A (en) * 2019-12-16 2020-04-28 深圳数拓科技有限公司 Multidimensional data acquisition and application method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110079714A1 (en) * 2009-10-01 2011-04-07 Microsoft Corporation Imager for constructing color and depth images
US20120133737A1 (en) * 2010-11-30 2012-05-31 Min Dong-Ki Image sensor for simultaneously obtaining color image and depth image, method of operating the image sensor, and image processing sytem including the image sensor
US20160171340A1 (en) * 2014-12-11 2016-06-16 Intel Corporation Labeling component parts of objects and detecting component properties in imaging data
CN108764053A (en) * 2018-04-28 2018-11-06 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment
US20200120237A1 (en) * 2018-10-15 2020-04-16 Lips Corporation Processing method using depth image detection
CN111078014A (en) * 2019-12-16 2020-04-28 深圳数拓科技有限公司 Multidimensional data acquisition and application method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SEONGJOO LEE ETC: ""Design of a configurable bit-resolution CMOS image sensor for the image depth extraction"", 《2016 INTERNATIONAL SOC DESIGN CONFERENCE (ISOCC)》, 26 October 2016 (2016-10-26) *
沈跃;徐慧;刘慧;李宁;: "基于Kinect传感器的温室植株绿色与深度检测方法", 中国农机化学报, no. 08, 15 August 2016 (2016-08-15) *

Similar Documents

Publication Publication Date Title
CN113766125B (en) Focusing method and device, electronic equipment and computer readable storage medium
CN111368601B (en) Living body detection method and apparatus, electronic device, and computer-readable storage medium
CN109949347B (en) Human body tracking method, device, system, electronic equipment and storage medium
KR101906796B1 (en) Device and method for image analyzing based on deep learning
CN110580481B (en) Light field image key position detection method based on EPI
CN109327626B (en) Image acquisition method and device, electronic equipment and computer readable storage medium
JP4389602B2 (en) Object detection apparatus, object detection method, and program
US11244429B2 (en) Method of providing a sharpness measure for an image
CN100380911C (en) Image processing method and image processing apparatus
CN110909640A (en) Method and device for determining water level line, storage medium and electronic device
JP2010003177A (en) Image processor
US8718370B2 (en) Optical information-reading apparatus and optical information-reading method
KR101769741B1 (en) Method and apparatus for recognizing iris through pupil detection
CN1042981C (en) Reader for symbolic information
KR101695246B1 (en) Device for estimating light source and method thereof
CN112036375A (en) Method and device for detecting infrared image and depth image and face recognition system
CN113808135A (en) Image brightness abnormality detection method, electronic device, and storage medium
JPH0715703B2 (en) Character reading method
CN112070065A (en) Method and device for detecting infrared image and depth image and face recognition system
CN112036376A (en) Method and device for detecting infrared image and depth image and face recognition system
JP2017521011A (en) Symbol optical detection method
CN112052823A (en) Target detection method and device
CN112070771B (en) Adaptive threshold segmentation method and device based on HS channel and storage medium
JP2007060468A (en) Image sensor
JPS63240832A (en) Image measuring method for calculating contour line of lung part

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
CB02 Change of applicant information

Address after: 11-13 / F, joint headquarters building, high tech Zone, 63 Xuefu Road, Yuehai street, Nanshan District, Shenzhen, Guangdong 518000

Applicant after: Obi Zhongguang Technology Group Co., Ltd

Address before: 11-13 / F, joint headquarters building, high tech Zone, 63 Xuefu Road, Yuehai street, Nanshan District, Shenzhen, Guangdong 518000

Applicant before: SHENZHEN ORBBEC Co.,Ltd.

CB02 Change of applicant information