CN109002786A - Method for detecting human face, equipment and computer readable storage medium - Google Patents
Method for detecting human face, equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN109002786A CN109002786A CN201810741579.5A CN201810741579A CN109002786A CN 109002786 A CN109002786 A CN 109002786A CN 201810741579 A CN201810741579 A CN 201810741579A CN 109002786 A CN109002786 A CN 109002786A
- Authority
- CN
- China
- Prior art keywords
- frame
- facial image
- infrared
- visible light
- overlapping
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/161—Detection; Localisation; Normalisation
- G06V40/166—Detection; Localisation; Normalisation using acquisition arrangements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/10—Image acquisition
- G06V10/12—Details of acquisition arrangements; Constructional details thereof
- G06V10/14—Optical characteristics of the device performing the acquisition or on the illumination arrangements
- G06V10/143—Sensing or illuminating at different wavelengths
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/10—Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
- G06V40/16—Human faces, e.g. facial parts, sketches or expressions
- G06V40/172—Classification, e.g. identification
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- Human Computer Interaction (AREA)
- Oral & Maxillofacial Surgery (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Image Analysis (AREA)
- Studio Devices (AREA)
Abstract
The invention discloses a kind of method for detecting human face, and whether this method comprises: obtaining the visible light frame that synchronization visible image capturing head takes and the infrared frame that infrared camera takes, detecting in visible light frame and infrared frame includes facial image;When detecting in visible light frame and infrared frame includes facial image, judge whether the facial image in visible light frame matches with preset facial image;If matching, it will be seen that light frame and the overlapping of infrared frame;After visible light frame is Chong Die with infrared frame, the degree of overlapping of the facial image in facial image and infrared frame in visible light frame is calculated using preset algorithm;Judge whether the degree of overlapping being calculated is greater than or equal to preset threshold, if so, determining that Face datection passes through.The invention also discloses a kind of human-face detection equipments and a kind of computer readable storage medium.The present invention can be improved the safety and reliability of Face datection.
Description
Technical field
The present invention relates to field of security technology more particularly to method for detecting human face, equipment and computer readable storage medium.
Background technique
Human face detection tech is very widely used in the security systems such as gate inhibition at present, compared to figure and features such as iris, fingerprints
Feature, face is more intuitive, and can cooperate supervision of the cities Web vector graphic, and the later period of inquiry is facilitated to investigate.
In existing human face detection tech, facial image is acquired generally by visible image capturing head, to carry out people
Face identification, however since visible image capturing head cannot be distinguished photo and true face, unwarranted stranger can be with
Identifying system is cheated by photo, so as to cause security risk.
Thus, the safety and reliability of existing human face detection tech need to be improved.
Summary of the invention
It is a primary object of the present invention to propose a kind of method for detecting human face, equipment and computer readable storage medium, purport
In the safety and reliability for improving Face datection.
To achieve the above object, the present invention provides a kind of method for detecting human face, is applied to human-face detection equipment, the face
Detection device is connect with a binocular camera, and the binocular camera includes a visible image capturing head and an infrared photography
Head, described method includes following steps:
What the visible light frame and the infrared camera that visible image capturing head described in acquisition synchronization takes took
Whether infrared frame detects in the visible light frame and the infrared frame comprising facial image;
When detecting in the visible light frame and the infrared frame includes facial image, judge in the visible light frame
Facial image whether matched with preset facial image;
If the facial image in the visible light frame is matched with preset facial image, by the visible light frame and described
Infrared frame overlapping;
After the visible light frame is Chong Die with the infrared frame, the face in the visible light frame is calculated using preset algorithm
The degree of overlapping of facial image in image and the infrared frame;
Judge whether the degree of overlapping being calculated is greater than or equal to preset threshold, if so, determining that Face datection is logical
It crosses.
Preferably, described to obtain the visible light frame and the infrared photography that visible image capturing head described in synchronization takes
The infrared frame that takes of head, before detecting in the visible light frame and the infrared frame the step of whether include facial image, and also
Include:
The setting instruction of degree of overlapping threshold value is received, setting degree of overlapping threshold value is instructed according to the setting.
Preferably, described after the visible light frame is Chong Die with the infrared frame, it is calculated using preset algorithm described visible
The step of degree of overlapping of facial image and the facial image in the infrared frame in light frame includes:
After the visible light frame is Chong Die with the infrared frame, known in the visible light frame using the first facial image collimation mark
Facial image position, the position of facial image in the infrared frame is known using the second facial image collimation mark;
Calculate the overlapping area of the first facial image frame and the second facial image frame;
The facial image in facial image and the infrared frame in the visible light frame is calculated according to the overlapping area
Degree of overlapping.
Preferably, the step of overlapping area for calculating the first facial image frame and the second facial image frame
Include:
Establish plane right-angle coordinate;
Obtain the original in the first facial image frame and the second facial image frame with the plane right-angle coordinate
Coordinate of the point apart from nearest vertex, is denoted as (x respectively1,y1) and (x2,y2), meanwhile, obtain the first facial image frame and
The second facial image frame is denoted as w in the width of x-axis direction respectively1And w2And the first facial image frame and described
Two facial image frames are denoted as h in the height in y-axis direction respectively1And h2;
Pass through formula: overlapping area=(xR-xL)×(yR-yL), calculate the first facial image frame and second people
The overlapping area of face image frame, wherein
xL=max { x1,x2, yL=max { y1,y2, xR=min { x1+w1, x2+w2, yR=min { y1+h1, y2+h2}。
Preferably, described to be calculated in facial image and the infrared frame in the visible light frame according to the overlapping area
Facial image degree of overlapping the step of include:
Calculate the area of the first facial image frame and the larger area in the second facial image frame;
Facial image in the visible light frame according to the areal calculation of the overlapping area and the larger area with
The degree of overlapping of facial image in the infrared frame.
Preferably, described to calculate the first facial image frame and the larger area in the second facial image frame
The step of area includes:
Pass through formula: the area of larger area=max { w1×h1,w2×h2, calculate the first facial image frame and
The area of larger area in the second facial image frame;
Face figure in the visible light frame according to the areal calculation of the overlapping area and the larger area
As and the facial image in the infrared frame degree of overlapping the step of include:
Work as xR<xLOr yR<yLWhen, degree of overlapping δ=0;
Work as xR≥xLAnd yR≥yLWhen, degree of overlapping δ=(xR-xL)×(yR-yL)/max{w1×h1,w2×h2}。
Preferably, after the step of whether including facial image in the detection visible light frame and the infrared frame,
Further include:
If detecting comprising facial image in the visible light frame and not including facial image in the infrared frame, determine
Face datection does not pass through.
Preferably, after the step of whether degree of overlapping that the judgement is calculated is greater than or equal to preset threshold,
Further include:
If the degree of overlapping is less than preset threshold, determine that Face datection does not pass through.
In addition, to achieve the above object, the present invention also provides a kind of human-face detection equipment, the human-face detection equipment and one
Binocular camera connection, the binocular camera include a visible image capturing head and an infrared camera, the face inspection
Measurement equipment includes: memory, processor and is stored in the Face datection that can be run on the memory and on the processor
The step of program, the Face datection program realizes method for detecting human face as described above when being executed by the processor.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium
Face datection program is stored on storage medium, the Face datection program realizes face as described above when being executed by processor
The step of detection method.
Method for detecting human face proposed by the present invention acquires visible light frame and infrared frame by binocular camera, works as visible light
Include facial image in frame and infrared frame, and facial image in visible light frame and the matching of preset facial image and with it is infrared
When facial image degree of overlapping in frame is greater than or equal to preset threshold, just judgement Face datection passes through, compared with the prior art in
For single pass visible image capturing head acquisition facial image to carry out recognition of face, the present invention can be improved the safety of Face datection
Property and reliability.
Detailed description of the invention
Fig. 1 is the device structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of the present inventor's face detecting method first embodiment;
Fig. 3 is the refinement flow diagram of step S40 in the present inventor's face detecting method second embodiment;
Fig. 4 is the overlapping schematic diagram of visible light frame and facial image in infrared frame in the embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are: human-face detection equipment connects a binocular camera, the binocular camera shooting
Head includes a visible image capturing head and an infrared camera, obtains the visible light that synchronization visible image capturing head takes
Whether the infrared frame that frame and infrared camera take, detecting in visible light frame and infrared frame includes facial image;When detecting
When in visible light frame and infrared frame including facial image, judge facial image in visible light frame whether with preset face figure
As matching;If the facial image in visible light frame is matched with preset facial image, it will be seen that light frame and the overlapping of infrared frame;?
After visible light frame is Chong Die with infrared frame, the facial image in facial image and infrared frame in visible light is calculated using preset algorithm
Degree of overlapping;Judge whether the degree of overlapping being calculated is greater than or equal to preset threshold, if so, determining that Face datection passes through.
In existing human face detection tech, facial image is acquired generally by visible image capturing head, to carry out people
Face detection, however since visible image capturing head cannot be distinguished photo and true face, unwarranted stranger can be with
Identifying system is cheated by photo, so as to cause security risk.
Method for detecting human face proposed by the present invention acquires visible light frame and infrared frame by binocular camera, and if only if
Include facial image in visible light frame and infrared frame, and facial image in visible light frame and the matching of preset facial image and
When being greater than or equal to preset threshold with the facial image degree of overlapping in infrared frame, just determine that Face datection passes through, compared to existing
For single pass visible image capturing head acquisition facial image to carry out recognition of face, the present invention can be improved Face datection in technology
Safety and reliability.
As shown in Figure 1, Fig. 1 is the device structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to.
Human-face detection equipment of the embodiment of the present invention can be PC machine or server, the human-face detection equipment and a binocular camera shooting
Head connection, the binocular camera include a visible image capturing head and an infrared camera, and wherein visible image capturing head is used for
Visible light frame is acquired, infrared camera is for acquiring infrared frame.
As shown in Figure 1, the equipment may include: processor 1001, such as CPU, network interface 1004, user interface
1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components.
User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface
1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include that the wired of standard connects
Mouth, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory
(non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor
1001 storage device.
It will be understood by those skilled in the art that device structure shown in Fig. 1 does not constitute the restriction to equipment, can wrap
It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium
Believe module, Subscriber Interface Module SIM and Face datection program.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, carries out with background server
Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor
1001 can be used for calling the Face datection program stored in memory 1005, and execute following operation:
What the visible light frame and the infrared camera that visible image capturing head described in acquisition synchronization takes took
Whether infrared frame detects in the visible light frame and the infrared frame comprising facial image;
When detecting in the visible light frame and the infrared frame includes facial image, judge in the visible light frame
Facial image whether matched with preset facial image;
If the facial image in the visible light frame is matched with preset facial image, by the visible light frame and described
Infrared frame overlapping;
After the visible light frame is Chong Die with the infrared frame, the face in the visible light frame is calculated using preset algorithm
The degree of overlapping of facial image in image and the infrared frame;
Judge whether the degree of overlapping being calculated is greater than or equal to preset threshold, if so, determining that Face datection is logical
It crosses.
Further, processor 1001 can call the Face datection program stored in memory 1005, also execute following
Operation:
The setting instruction of degree of overlapping threshold value is received, setting degree of overlapping threshold value is instructed according to the setting.
Further, processor 1001 can call the Face datection program stored in memory 1005, also execute following
Operation:
After the visible light frame is Chong Die with the infrared frame, known in the visible light frame using the first facial image collimation mark
Facial image position, the position of facial image in the infrared frame is known using the second facial image collimation mark;
Calculate the overlapping area of the first facial image frame and the second facial image frame;
The facial image in facial image and the infrared frame in the visible light frame is calculated according to the overlapping area
Degree of overlapping.
Further, processor 1001 can call the Face datection program stored in memory 1005, also execute following
Operation:
Establish plane right-angle coordinate;
Obtain the original in the first facial image frame and the second facial image frame with the plane right-angle coordinate
Coordinate of the point apart from nearest vertex, is denoted as (x respectively1,y1) and (x2,y2), meanwhile, obtain the first facial image frame and
The second facial image frame is denoted as w in the width of x-axis direction respectively1And w2And the first facial image frame and described
Two facial image frames are denoted as h in the height in y-axis direction respectively1And h2;
Pass through formula: overlapping area=(xR-xL)×(yR-yL), calculate the first facial image frame and second people
The overlapping area of face image frame, wherein
xL=max { x1,x2, yL=max { y1,y2, xR=min { x1+w1, x2+w2, yR=min { y1+h1, y2+h2}。
Further, processor 1001 can call the Face datection program stored in memory 1005, also execute following
Operation:
Calculate the area of the first facial image frame and the larger area in the second facial image frame;
Facial image in the visible light frame according to the areal calculation of the overlapping area and the larger area with
The degree of overlapping of facial image in the infrared frame.
Further, processor 1001 can call the Face datection program stored in memory 1005, also execute following
Operation:
Pass through formula: the area of larger area=max { w1×h1,w2×h2, calculate the first facial image frame and
The area of larger area in the second facial image frame;
Work as xR<xLOr yR<yLWhen, take degree of overlapping δ=0;
Work as xR≥xLAnd yR≥yLWhen, take degree of overlapping δ=(xR-xL)×(yR-yL)/max{w1×h1,w2×h2}。
Further, processor 1001 can call the Face datection program stored in memory 1005, also execute following
Operation:
If detecting comprising facial image in the visible light frame and not including facial image in the infrared frame, determine
Face datection does not pass through.
Further, processor 1001 can call the Face datection program stored in memory 1005, also execute following
Operation:
If the degree of overlapping is less than preset threshold, determine that Face datection does not pass through.
The basic phase of each specific embodiment of the specific embodiment of human-face detection equipment of the present invention and following method for detecting human face
Together, therefore not to repeat here.
Based on above-mentioned hardware configuration, the present inventor's face detecting method embodiment is proposed.
It is the flow diagram of the present inventor's face detecting method first embodiment referring to Fig. 2, Fig. 2, which comprises
Step S10 obtains visible light frame and the infrared camera that visible image capturing head described in synchronization takes
Whether the infrared frame taken detects in the visible light frame and the infrared frame comprising facial image;
The present embodiment method for detecting human face is applied to human-face detection equipment, and the human-face detection equipment and a binocular camera connect
It connects, which includes a visible image capturing head and an infrared camera, and wherein visible image capturing head is for acquiring
Visible light frame, infrared camera is for acquiring infrared frame.When it is implemented, binocular camera may be mounted at gate inhibition or banister
It is shot with the facial image to user.
When carrying out Face datection, human-face detection equipment obtain first synchronization visible image capturing head take it is visible
The infrared frame that light frame and infrared camera take, and whether detect in visible light frame and infrared frame comprising facial image, wherein
It whether include that facial image is referred to Face datection algorithm in the prior art in detection visible light frame and infrared frame, herein not
It repeats.
When detecting in the visible light frame and the infrared frame includes facial image, step S20 is executed, judges institute
State whether the facial image in visible light frame matches with preset facial image;
According to the characteristic of visible image capturing head, photo and true face cannot be distinguished, therefore unwarranted strange
People can cheat identifying system by photo;And according to the characteristic of infrared camera, it is only capable of taking the photo of real human face,
Therefore In vivo detection can be carried out by infrared camera, can be avoided photo deception.However, working as unwarranted strange manpower
When holding a human face photo with right of access, it is possible to which can out-trick visible image capturing head and infrared camera simultaneously: visible
Light algorithm can determine that the face on photo has right of access, and infrared algorithm can determine that current face for true man, eventually leads to not
Authorized stranger's P Passable.
In view of the above-mentioned problems, illustrating current scene when detecting in visible light frame and infrared frame includes facial image
There are true man, need further to judge whether the true man have right of access at this time.Due to that may include multiple in visible light frame
Facial image (such as true man hold photo), at this point it is possible to which an optional facial image is sentenced as object is judged from visible light frame
Breaking, whether it matches with preset facial image, wherein preset facial image is the preset white list with right of access
In facial image, judge whether the facial image in visible light frame can join with the matched detailed process of preset facial image
According to face matching technique in the prior art, do not repeat herein.
If the facial image in the visible light frame is matched with preset facial image, S30 is thened follow the steps, it can by described in
Light-exposed frame and the infrared frame overlapping;
If the facial image in the visible light frame is matched with preset facial image, which may
For true facial image, it is also possible to be photo, to distinguish the two, in the step, further it will be seen that light frame and upper
The infrared frame got is stated to be overlapped, have herein one it is assumed that i.e. visible light camera and infrared camera imaging size
It is the same namely visible light frame is identical with the overall dimensions size of infrared frame.
Step S40 calculates the visible light frame using preset algorithm after the visible light frame is Chong Die with the infrared frame
In facial image and the infrared frame in facial image degree of overlapping;
In the step, after visible light frame and the overlapping of infrared frame, the face figure in visible light frame is calculated using preset algorithm
As and the facial image in the infrared frame degree of overlapping, the degree of overlapping indicate visible light frame in facial image with it is described infrared
The coincidence degree of facial image in frame, degree of overlapping is bigger, indicates in the facial image and the infrared frame in visible light frame
Facial image is more overlapped.
Specifically, the degree of overlapping for calculating the facial image in the facial image and the infrared frame in the visible light frame can
With are as follows: then the overlapping area of the facial image in facial image and the infrared frame first in calculating visible light frame calculates
The ratio of facial image area in the overlapping area and visible light frame, using the ratio as the degree of overlapping of two facial images,
Alternatively, calculate the ratio of the facial image area in the overlapping area and infrared frame, using the ratio as two facial images
Registration.
Step S50, judges whether the degree of overlapping being calculated is greater than or equal to preset threshold, if so, determining people
Face detection passes through.
In the step, judge whether the above-mentioned degree of overlapping being calculated is greater than or equal to preset threshold, if so, determining people
Face detection passes through.The judgement foundation be: due in binocular camera visible image capturing head and infrared camera have one
Fixed interval, thus the position of the facial image in visible light frame and the facial image in infrared frame and wide height be it is discrepant, two
Person tends not to be completely coincident;As a result, when the degree of overlapping that the two is calculated is greater than or equal to preset threshold, illustrate visible light
The facial image in facial image and infrared frame in frame is particularly likely that the facial image of the same true man, determines people at this time
Face detection passes through.In this way, unwarranted strange human hand held one can be excluded and open the face photograph with right of access
Piece and the case where lead to P Passable, to improve the safety and reliability of Face datection.
Further, it can also include: to receive the setting instruction of degree of overlapping threshold value before above-mentioned steps S10, be set according to described
Set instruction setting degree of overlapping threshold value.
In the present embodiment, degree of overlapping threshold value can carry out based on experience value flexible setting by user, it can be appreciated that equal conditions
Under, degree of overlapping threshold value is arranged excessively high, will lead to and also filters out certain normal conditions, and degree of overlapping threshold value is arranged too low, then
Will lead to cannot recognize abnormal conditions, it is therefore desirable to rationally setting degree of overlapping threshold value, to guarantee the accuracy of Face datection.
Such as the binocular camera of professional standard (optical center distance is 17mm), 0.3 can be set by degree of overlapping threshold value, if
The subsequent degree of overlapping being calculated is greater than or equal to 0.3, then determines that Face datection passes through.
It should be noted that degree of overlapping threshold value can also can according to the centre distance of two camera lenses of binocular camera, face
The factors such as the focal length of identification distance and camera are adjusted, for example focal length is bigger, then bigger with the imaging of equidistant face,
Normal face registration will be higher in two cameras, and registration threshold value can suitably be turned up at this time;Recognizable distance is bigger, i.e. people
Remoter with a distance from camera, face is smaller in picture, and normal face registration will be lower in two cameras, at this time can be appropriate
Turn down threshold value, etc..
The method for detecting human face that the present embodiment proposes acquires visible light frame and infrared frame by binocular camera, when and only
When including facial image in visible light frame and infrared frame, and facial image in visible light frame and the matching of preset facial image
And when being greater than or equal to preset threshold with the facial image degree of overlapping in infrared frame, just determine that Face datection passes through, compared to existing
There is single pass visible image capturing head in technology to acquire facial image to carry out Face datection, the present embodiment can be improved face
The safety and reliability of detection.
Further, it is based on above-mentioned first embodiment, proposes the present inventor's face detecting method second embodiment.Reference Fig. 3,
Fig. 3 is the refinement flow diagram of step S40 in the present inventor's face detecting method second embodiment.Based on above-mentioned shown in Fig. 2
Embodiment, step S40 may include:
Step S41, after the visible light frame is Chong Die with the infrared frame, using the first facial image collimation mark know described in can
The position of facial image in light-exposed frame knows the position of facial image in the infrared frame using the second facial image collimation mark;
Step S42 calculates the overlapping area of the first facial image frame and the second facial image frame;
Step S43 is calculated in facial image and the infrared frame in the visible light frame according to the overlapping area
The degree of overlapping of facial image.
It is the overlapping schematic diagram of visible light frame and facial image in infrared frame in the embodiment of the present invention referring to Fig. 4, Fig. 4.?
In the present embodiment, the position of the facial image in visible light frame can be known using the first facial image collimation mark first, using second
Facial image collimation mark knows the position of facial image in infrared frame, wherein the first facial image frame and the second facial image frame are square
Shape frame;Then, the overlapping area for calculating the first facial image frame and the second facial image frame, later further according to the overlapping area
Calculate the degree of overlapping of the facial image in the facial image and infrared frame in visible light frame.
Specifically, as an implementation, it can be established first using a certain vertex of picture frame after being overlapped as origin flat
Face rectangular coordinate system might as well establish plane right-angle coordinate as origin using the left upper apex of picture frame in Fig. 4 here, if the first
The coordinate of the point P1 nearest from origin is (x in face image frame1,y1), the seat of the point P2 nearest from origin in the second facial image frame
It is designated as (x2,y2), the width of the first facial image frame is w1, it is highly h1, the width of the second facial image frame is w2, highly it is
h2, then the overlapping area of the first facial image frame and the second facial image frame can pass through formula: overlapping area=(xR-
xL)×(yR-yL) be calculated, wherein xL=max { x1,x2, yL=max { y1,y2, xR=min { x1+w1, x2+w2, yR=
min{y1+h1, y2+h2}。
Further, it is calculated in facial image and the infrared frame in the visible light frame according to the overlapping area
The step of degree of overlapping of facial image may include: to calculate in the first facial image frame and the second facial image frame
The area of larger area;People in the visible light frame according to the areal calculation of the overlapping area and the larger area
The degree of overlapping of facial image in face image and the infrared frame.
Wherein it is possible to pass through formula: the area of larger area=max { w1×h1,w2×h2, it calculates described the first
The area of face image frame and the larger area in the second facial image frame;And the calculation of degree of overlapping are as follows: work as xR≥xL
And yR≥yLWhen, degree of overlapping δ=(xR-xL)×(yR-yL)/max{w1×h1,w2×h2, particularly, work as xR<xLOr yR<yLWhen, two
A facial image is non-overlapping, takes degree of overlapping δ=0 at this time;
The comparative analysis in feature, above-mentioned Overlapping Calculation mode letter are carried out compared to infrared face and visible light face
Single and high-efficient, in actual test, the time spent is much smaller than 1 millisecond.
Certainly, when calculating degree of overlapping, the area in the first facial image frame and the second facial image frame can also be calculated
The area of smaller, then using the ratio of above-mentioned overlapping area and the area of area smaller as the face in visible light frame
The degree of overlapping of facial image in image and infrared frame, when specific implementation, can flexible settings.
Further, the above embodiments are based on, propose the present inventor's face detecting method 3rd embodiment.
It is in place of the difference of the present embodiment and above-described embodiment, after step slo, if can also include: to detect
Do not include facial image in the infrared frame comprising facial image in the visible light frame, then determines that Face datection does not pass through.
When detect in visible light frame comprising facial image and in infrared frame do not include facial image when, illustrate visible light frame
In facial image be photo rather than true man, determine that Face datection does not pass through at this time.
Further, after step S20, if can also include: that the degree of overlapping is less than preset threshold, determine face
Detection does not pass through.
When the degree of overlapping being calculated is less than preset threshold, corresponding scene is very likely unwarranted strange
Human hand held one opens the human face photo with right of access and carries out Face datection, because of the photo face under the scene in visible light frame
Have the characteristics that not to be overlapped with the real human face in infrared frame or degree of overlapping is lesser, determines that Face datection does not pass through at this time.
The present embodiment is according to practical security protection scene feature, it is contemplated that the unacceptable situation of Face datection improves people into one
The safety and reliability of face detection.
The present invention also provides a kind of computer readable storage mediums.
Face datection program is stored on computer readable storage medium of the present invention, the Face datection program is by processor
The step of method for detecting human face as described above is realized when execution.
Wherein, the Face datection program run on the processor, which is performed realized method, can refer to the present invention
The each embodiment of method for detecting human face, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone,
Computer, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of method for detecting human face is applied to human-face detection equipment, which is characterized in that the human-face detection equipment and a binocular
Camera connection, the binocular camera include a visible image capturing head and an infrared camera, the Face datection side
Method includes the following steps:
The visible light frame and the infrared camera that visible image capturing head described in acquisition synchronization takes take infrared
Whether frame detects in the visible light frame and the infrared frame comprising facial image;
When detecting in the visible light frame and the infrared frame includes facial image, the people in the visible light frame is judged
Whether face image matches with preset facial image;
If the facial image in the visible light frame is matched with preset facial image, by the visible light frame and described infrared
Frame overlapping;
After the visible light frame is Chong Die with the infrared frame, the facial image in the visible light frame is calculated using preset algorithm
With the degree of overlapping of the facial image in the infrared frame;
Judge whether the degree of overlapping being calculated is greater than or equal to preset threshold, if so, determining that Face datection passes through.
2. method for detecting human face as described in claim 1, which is characterized in that visible image capturing described in the acquisition synchronization
The infrared frame that the visible light frame and the infrared camera that head takes take, detects the visible light frame and the infrared frame
In before the step of whether including facial image, further includes:
The setting instruction of degree of overlapping threshold value is received, setting degree of overlapping threshold value is instructed according to the setting.
3. method for detecting human face as described in claim 1, which is characterized in that described in the visible light frame and the infrared frame
After overlapping, it is overlapping with the facial image in the infrared frame that the facial image in the visible light frame is calculated using preset algorithm
The step of spending include:
After the visible light frame is Chong Die with the infrared frame, the people in the visible light frame is known using the first facial image collimation mark
The position of face image knows the position of facial image in the infrared frame using the second facial image collimation mark;
Calculate the overlapping area of the first facial image frame and the second facial image frame;
The weight of the facial image in facial image and the infrared frame in the visible light frame is calculated according to the overlapping area
Folded degree.
4. method for detecting human face as claimed in claim 3, which is characterized in that described to calculate the first facial image frame and institute
The step of stating the overlapping area of the second facial image frame include:
Establish plane right-angle coordinate;
Obtain in the first facial image frame and the second facial image frame with the origin of the plane right-angle coordinate away from
Coordinate from nearest vertex, is denoted as (x respectively1,y1) and (x2,y2), meanwhile, obtain the first facial image frame and described
Second facial image frame is denoted as w in the width of x-axis direction respectively1And w2And the first facial image frame and second people
Face image frame is denoted as h in the height in y-axis direction respectively1And h2;
Pass through formula: overlapping area=(xR-xL)×(yR-yL), calculate the first facial image frame and the second face figure
The overlapping area of frame, wherein
xL=max { x1,x2, yL=max { y1,y2, xR=min { x1+w1, x2+w2, yR=min { y1+h1, y2+h2}。
5. method for detecting human face as claimed in claim 4, which is characterized in that it is described according to the overlapping area calculate described in can
The step of degree of overlapping of facial image and the facial image in the infrared frame in light-exposed frame includes:
Calculate the area of the first facial image frame and the larger area in the second facial image frame;
Facial image in the visible light frame according to the areal calculation of the overlapping area and the larger area with it is described
The degree of overlapping of facial image in infrared frame.
6. method for detecting human face as claimed in claim 5, which is characterized in that described to calculate the first facial image frame and institute
The step of stating the area of the larger area in the second facial image frame include:
Pass through formula: the area of larger area=max { w1×h1,w2×h2, calculate the first facial image frame and described
The area of larger area in second facial image frame;
Facial image in the visible light frame according to the areal calculation of the overlapping area and the larger area with
The step of degree of overlapping of facial image in the infrared frame includes:
Work as xR<xLOr yR<yLWhen, take degree of overlapping δ=0;
Work as xR≥xLAnd yR≥yLWhen, take degree of overlapping δ=(xR-xL)×(yR-yL)/max{w1×h1,w2×h2}。
7. such as method for detecting human face described in any one of claims 1 to 6, which is characterized in that the detection visible light
After the step of whether including facial image in frame and the infrared frame, further includes:
If detecting comprising facial image in the visible light frame and not including facial image in the infrared frame, face is determined
Detection does not pass through.
8. method for detecting human face as claimed in claim 7, which is characterized in that described to judge that the degree of overlapping being calculated is
After no the step of being greater than or equal to preset threshold, further includes:
If the degree of overlapping is less than preset threshold, determine that Face datection does not pass through.
9. a kind of human-face detection equipment, which is characterized in that the human-face detection equipment is connect with a binocular camera, the binocular
Camera includes a visible image capturing head and an infrared camera, and the human-face detection equipment includes: memory, processor
And it is stored in the Face datection program that can be run on the memory and on the processor, the Face datection program is by institute
It states when processor executes and realizes such as the step of method for detecting human face described in any item of the claim 1 to 8.
10. a kind of computer readable storage medium, which is characterized in that be stored with face inspection on the computer readable storage medium
Ranging sequence realizes such as Face datection described in any item of the claim 1 to 8 when the Face datection program is executed by processor
The step of method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810741579.5A CN109002786B (en) | 2018-07-06 | 2018-07-06 | Face detection method, face detection equipment and computer-readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810741579.5A CN109002786B (en) | 2018-07-06 | 2018-07-06 | Face detection method, face detection equipment and computer-readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109002786A true CN109002786A (en) | 2018-12-14 |
CN109002786B CN109002786B (en) | 2022-02-18 |
Family
ID=64599271
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810741579.5A Active CN109002786B (en) | 2018-07-06 | 2018-07-06 | Face detection method, face detection equipment and computer-readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109002786B (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110186167A (en) * | 2019-05-31 | 2019-08-30 | 广东美的制冷设备有限公司 | Control method, device, air conditioner and the storage medium of air conditioner |
CN110532957A (en) * | 2019-08-30 | 2019-12-03 | 北京市商汤科技开发有限公司 | Face identification method and device, electronic equipment and storage medium |
CN110705530A (en) * | 2019-12-13 | 2020-01-17 | 珠海亿智电子科技有限公司 | Same face frame confirmation method, device, equipment and medium based on living body recognition |
CN110740315A (en) * | 2019-11-07 | 2020-01-31 | 杭州宇泛智能科技有限公司 | Camera correction method and device, electronic equipment and storage medium |
CN111027541A (en) * | 2019-11-15 | 2020-04-17 | 国网安徽省电力有限公司检修分公司 | Flame detection method and system based on visible light and thermal imaging and storage medium |
CN111597988A (en) * | 2020-05-15 | 2020-08-28 | 深圳市中联讯科技有限公司 | Method and terminal for counting people by infrared thermometer |
CN111920391A (en) * | 2020-06-23 | 2020-11-13 | 联想(北京)有限公司 | Temperature measuring method and equipment |
CN112488018A (en) * | 2020-12-09 | 2021-03-12 | 巽腾(广东)科技有限公司 | Binocular in-vivo detection method, device, equipment and storage medium |
CN112907680A (en) * | 2021-02-22 | 2021-06-04 | 上海数川数据科技有限公司 | Automatic calibration method for rotation matrix of visible light and infrared double-light camera |
TWI778652B (en) * | 2021-04-12 | 2022-09-21 | 新加坡商鴻運科股份有限公司 | Method for calculating overlap, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090237521A1 (en) * | 2008-03-19 | 2009-09-24 | Fujifilm Corporation | Image capturing apparatus and method for controlling image capturing |
CN101964056A (en) * | 2010-10-26 | 2011-02-02 | 徐勇 | Bimodal face authentication method with living body detection function and system |
CN103400108A (en) * | 2013-07-10 | 2013-11-20 | 北京小米科技有限责任公司 | Face identification method and device as well as mobile terminal |
CN106372601A (en) * | 2016-08-31 | 2017-02-01 | 上海依图网络科技有限公司 | In vivo detection method based on infrared visible binocular image and device |
CN107967677A (en) * | 2017-12-15 | 2018-04-27 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and computer equipment |
-
2018
- 2018-07-06 CN CN201810741579.5A patent/CN109002786B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090237521A1 (en) * | 2008-03-19 | 2009-09-24 | Fujifilm Corporation | Image capturing apparatus and method for controlling image capturing |
CN101964056A (en) * | 2010-10-26 | 2011-02-02 | 徐勇 | Bimodal face authentication method with living body detection function and system |
CN103400108A (en) * | 2013-07-10 | 2013-11-20 | 北京小米科技有限责任公司 | Face identification method and device as well as mobile terminal |
CN106372601A (en) * | 2016-08-31 | 2017-02-01 | 上海依图网络科技有限公司 | In vivo detection method based on infrared visible binocular image and device |
CN107967677A (en) * | 2017-12-15 | 2018-04-27 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and computer equipment |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110186167A (en) * | 2019-05-31 | 2019-08-30 | 广东美的制冷设备有限公司 | Control method, device, air conditioner and the storage medium of air conditioner |
CN110532957A (en) * | 2019-08-30 | 2019-12-03 | 北京市商汤科技开发有限公司 | Face identification method and device, electronic equipment and storage medium |
CN110532957B (en) * | 2019-08-30 | 2021-05-07 | 北京市商汤科技开发有限公司 | Face recognition method and device, electronic equipment and storage medium |
CN110740315B (en) * | 2019-11-07 | 2021-07-16 | 杭州宇泛智能科技有限公司 | Camera correction method and device, electronic equipment and storage medium |
CN110740315A (en) * | 2019-11-07 | 2020-01-31 | 杭州宇泛智能科技有限公司 | Camera correction method and device, electronic equipment and storage medium |
CN111027541A (en) * | 2019-11-15 | 2020-04-17 | 国网安徽省电力有限公司检修分公司 | Flame detection method and system based on visible light and thermal imaging and storage medium |
CN110705530A (en) * | 2019-12-13 | 2020-01-17 | 珠海亿智电子科技有限公司 | Same face frame confirmation method, device, equipment and medium based on living body recognition |
CN111597988A (en) * | 2020-05-15 | 2020-08-28 | 深圳市中联讯科技有限公司 | Method and terminal for counting people by infrared thermometer |
CN111597988B (en) * | 2020-05-15 | 2024-04-19 | 深圳市中联讯科技有限公司 | Method and terminal for counting number of people by infrared thermometer |
CN111920391A (en) * | 2020-06-23 | 2020-11-13 | 联想(北京)有限公司 | Temperature measuring method and equipment |
WO2022121895A1 (en) * | 2020-12-09 | 2022-06-16 | 巽腾(广东)科技有限公司 | Binocular living body detection method, apparatus, and device, and storage medium |
CN112488018A (en) * | 2020-12-09 | 2021-03-12 | 巽腾(广东)科技有限公司 | Binocular in-vivo detection method, device, equipment and storage medium |
CN112907680A (en) * | 2021-02-22 | 2021-06-04 | 上海数川数据科技有限公司 | Automatic calibration method for rotation matrix of visible light and infrared double-light camera |
TWI778652B (en) * | 2021-04-12 | 2022-09-21 | 新加坡商鴻運科股份有限公司 | Method for calculating overlap, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109002786B (en) | 2022-02-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109002786A (en) | Method for detecting human face, equipment and computer readable storage medium | |
US20230206685A1 (en) | Decreasing lighting-induced false facial recognition | |
CN110443016B (en) | Information leakage prevention method, electronic device and storage medium | |
JP7159509B1 (en) | Systems and methods using multiple focal stacks for image-based spoofing detection | |
JP6052399B2 (en) | Image processing program, image processing method, and information terminal | |
US20220237951A1 (en) | Spoofing detection apparatus, spoofing detection method, and computer-readable recording medium | |
US11756336B2 (en) | Iris authentication device, iris authentication method, and recording medium | |
CN112434546A (en) | Face living body detection method and device, equipment and storage medium | |
CN108446654A (en) | A kind of face recognition method based on image | |
JP2009015518A (en) | Eye image photographing device and authentication device | |
US9667946B2 (en) | Method for authenticating an image capture of a three-dimensional entity | |
CN110837901A (en) | Cloud test drive appointment auditing method and device, storage medium and cloud server | |
CN109196517B (en) | Comparison device and comparison method | |
JP2020052788A (en) | Image processing system and method therefor, and program | |
CN112052706B (en) | Electronic device and face recognition method | |
TWI727337B (en) | Electronic device and face recognition method | |
JP2017162010A (en) | Person collation system and person collation method | |
CN114038025A (en) | Data processing method, service providing method, device, equipment and storage medium | |
TWI729679B (en) | Authentication system, authentication device, and authentication method | |
WO2023105635A1 (en) | Determination device, determination method, and determination program | |
CN113177426A (en) | Two-dimensional code detection method and device |
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 | ||
CP01 | Change in the name or title of a patent holder |
Address after: 518055 floor 1-5, building 6, jiuxiangling Industrial Zone, Xili street, Nanshan District, Shenzhen City, Guangdong Province Patentee after: Shenzhen Fuji Intelligent Co.,Ltd. Address before: 518055 floor 1-5, building 6, jiuxiangling Industrial Zone, Xili street, Nanshan District, Shenzhen City, Guangdong Province Patentee before: SHENZHEN FUJICA INTELLIGENTIZED SYSTEM CO.,LTD. |
|
CP01 | Change in the name or title of a patent holder |