CN107229927B - Face detection anti-cheating method - Google Patents
Face detection anti-cheating method Download PDFInfo
- Publication number
- CN107229927B CN107229927B CN201710656108.XA CN201710656108A CN107229927B CN 107229927 B CN107229927 B CN 107229927B CN 201710656108 A CN201710656108 A CN 201710656108A CN 107229927 B CN107229927 B CN 107229927B
- Authority
- CN
- China
- Prior art keywords
- face
- region
- background
- characteristic
- variable
- 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.)
- Expired - Fee Related
Links
Images
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/172—Classification, e.g. identification
Abstract
The invention provides a face detection anti-cheating method, comprising the steps that a camera device obtains a shot image; the second part judges whether the image contains a face figure, if so, the face figure is stored as a first variable; if not, storing as a second variable; a third unit that extracts a feature region and a background region excluding the feature region in the first variable, respectively; comparing the background area in the previous step with an area corresponding to the second variable, and if the difference exceeds a preset value, judging that the face is a photo; and if the difference does not exceed the preset value, judging the face to be a real face. The face detection anti-cheating method does not need auxiliary relevant equipment such as irises and fingerprints and a binocular camera, so that the relevant cost can be saved; and the user is not required to perform matching action, so that the user experience is better, and the other party can be prevented from passing through the face detection in a video recording mode. The running speed of the program is high, and the method is suitable for an embedded environment.
Description
Technical Field
The invention belongs to the field of face recognition, and particularly relates to a face detection anti-cheating method.
Background
At present, the face recognition technology is widely applied to an entrance guard security system. Compared with physical characteristics such as irises and fingerprints, the face is more visual, and the face can be used in cooperation with a city monitoring network, so that later-stage investigation of an inquirer is facilitated. However, there is a problem in the current face recognition, that is, the face and the photo cannot be distinguished. Moreover, at present, social networks are developed, and people can cheat a face recognition system by downloading photos of others to unlock the lock. Rendering the identified function less effective; the current method generally utilizes the modes of infrared, various biological characteristic identification combination and the like to avoid the similar problems of photo deception and the like, but has higher cost and is not beneficial to the popularization of the face recognition technology; or the distinguishing of the real person and the picture is realized by letting a person do some cooperative actions, but the method cannot distinguish the video from the face. And the user needs to cooperate with people, so that the user experience is not good.
Disclosure of Invention
In view of this, the present invention is directed to a method for preventing spoofing in face detection, so as to achieve the authenticity identification of face detection through a single camera.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a face detection anti-cheating method comprises the following steps:
(1) the camera device obtains a shot image;
(2) detecting whether the image contains a face graph rectangular frame or not through a Haar classifier, and if so, storing the face graph rectangular frame as a first variable; if not, storing as a second variable;
(3) respectively extracting a feature region and a background region excluding the feature region in a first variable;
(4) comparing the background area in the step (3) with an area corresponding to a second variable, and if the difference degree exceeds a preset value, judging that the face is recognized as a photo; and if the difference does not exceed the preset value, judging the face to be a true face.
Further, the background area is the whole background or a part of the background.
Further, the characteristic region is a rectangular frame.
Further, the characteristic region is a face region detected by skin color.
Further, the face graph in the step (2) is from a real face or a photo.
Further, in the step (1), the image is obtained by using one of opencv, emgucv and aforge open source library functions.
Further, in the step (3), feature points in the face graph are extracted by using an ASM algorithm or an AAM algorithm.
Compared with the prior art, the face detection anti-cheating method has the following advantages that:
the face detection anti-cheating method does not need auxiliary relevant equipment such as irises and fingerprints and a binocular camera, so that the relevant cost can be saved; and the user is not required to perform matching action, so that the user experience is better, and the other party can be prevented from passing through the face detection in a video recording mode. The running speed of the program is high, and the method is suitable for an embedded environment.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate an embodiment of the invention and, together with the description, serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic flow chart of a face detection anti-spoofing method according to an embodiment of the present invention.
Detailed Description
It should be noted that + +, and the embodiments and features of the embodiments may be combined with each other without conflict.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first", "second", etc. 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," "second," etc. may explicitly or implicitly include one or more of that feature. In the description of the invention, the meaning of "a plurality" is two or more unless otherwise specified.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art through specific situations.
The present invention will be described in detail below with reference to the embodiments with reference to the attached drawings.
A face detection anti-cheating method comprises the following steps:
the first step is as follows: the camera device acquires a shot image by using one of opencv, emgucv and aferge open source library functions;
the second step is that: detecting whether the image contains a face graph rectangular frame or not through a Haar classifier, and if so, storing the face graph rectangular frame as a first variable; if not, storing as a second variable, wherein the face graph is from a real face or a photo;
the third step: respectively extracting a feature region and a background region (not limited to ASM and AAM algorithms) for removing the feature region from a first variable by using an ASM algorithm or an AAM algorithm, wherein the feature region is a region surrounded by feature points or a face region detected by skin color, or a part of the face region (but not limited to the method of skin color detection), and the background region is a whole background or a part of the background;
the fourth step: and (4) comparing the background area in the step (3) with the area corresponding to the second variable, wherein the difference degree comprises but is not limited to frame difference, and if the third step is to extract the feature points, making the feature points O of the face contour as the vertical lines of the x axis and the y axis. Crossing the rectangular frame in the second step with the points E and F; and a rectangle formed by the O, E and F and one vertex of the rectangular frame is taken as a characteristic background area. If the third step is skin color detection to obtain a specific area of the face, the characteristic background is the part of the rectangular frame ABCD subtracted by the specific area of the face in the second step. And obtaining the coordinates of the background characteristic region. If the difference degree exceeds a preset value, judging that the face is recognized as a photo; and if the difference does not exceed the preset value, judging the face to be a real face.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
Claims (6)
1. A face detection anti-cheating method is characterized by comprising the following steps:
(1) the camera device obtains a shot image;
(2) judging whether the image contains a face graph rectangular frame or not through a Haar classifier, and if so, storing the image as a first variable; if not, storing as a second variable; the face graph in the step (2) is from a real face or a photo;
(3) respectively extracting a feature region and a background region excluding the feature region in a first variable; the characteristic region is a region surrounded by characteristic points or a face region detected by skin color or a part of the face region, and the background region is a whole background or a part of the background;
(4) comparing the background area in the step (3) with the area corresponding to the second variable, and if the characteristic point is extracted in the step (3), making a perpendicular line of an x axis and a y axis through the face contour characteristic point O; the rectangular frame in the step (2) is crossed at E, F two points; o, E, F and a rectangle formed by one vertex of the rectangle frame is a characteristic background area; if the specific area of the face is obtained by skin color detection in the step (3), the characteristic background is that the coordinates of the characteristic background area are obtained by deducting the specific area of the face from the rectangular frame ABCD in the step (2), and if the difference exceeds a preset value, the face is judged to be a photo; and if the difference does not exceed the preset value, judging the face to be a real face.
2. The face detection anti-spoofing method of claim 1, wherein: the background area is the whole background or part of the background.
3. The face detection anti-spoofing method of claim 1, wherein: the characteristic region is a rectangular frame.
4. The face detection anti-spoofing method of claim 1, wherein: the characteristic region is a face region detected through skin color.
5. The face detection anti-spoofing method of claim 1, wherein: in the step (1), an image is obtained by using one of opencv, emgucv and aforge open source library functions.
6. The face detection anti-spoofing method of claim 1, wherein: and (4) extracting the characteristic points in the face graph by using an ASM algorithm or an AAM algorithm in the step (3).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710656108.XA CN107229927B (en) | 2017-08-03 | 2017-08-03 | Face detection anti-cheating method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710656108.XA CN107229927B (en) | 2017-08-03 | 2017-08-03 | Face detection anti-cheating method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107229927A CN107229927A (en) | 2017-10-03 |
CN107229927B true CN107229927B (en) | 2020-04-03 |
Family
ID=59958064
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710656108.XA Expired - Fee Related CN107229927B (en) | 2017-08-03 | 2017-08-03 | Face detection anti-cheating method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107229927B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108694765A (en) | 2018-05-11 | 2018-10-23 | 京东方科技集团股份有限公司 | A kind of visitor's recognition methods and device, access control system |
CN109325413A (en) * | 2018-08-17 | 2019-02-12 | 深圳市中电数通智慧安全科技股份有限公司 | A kind of face identification method, device and terminal |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101702198A (en) * | 2009-11-19 | 2010-05-05 | 浙江大学 | Identification method for video and living body faces based on background comparison |
CN106295522A (en) * | 2016-07-29 | 2017-01-04 | 武汉理工大学 | A kind of two-stage anti-fraud detection method based on multi-orientation Face and environmental information |
CN106446772A (en) * | 2016-08-11 | 2017-02-22 | 天津大学 | Cheating-prevention method in face recognition system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9025830B2 (en) * | 2012-01-20 | 2015-05-05 | Cyberlink Corp. | Liveness detection system based on face behavior |
-
2017
- 2017-08-03 CN CN201710656108.XA patent/CN107229927B/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101702198A (en) * | 2009-11-19 | 2010-05-05 | 浙江大学 | Identification method for video and living body faces based on background comparison |
CN106295522A (en) * | 2016-07-29 | 2017-01-04 | 武汉理工大学 | A kind of two-stage anti-fraud detection method based on multi-orientation Face and environmental information |
CN106446772A (en) * | 2016-08-11 | 2017-02-22 | 天津大学 | Cheating-prevention method in face recognition system |
Also Published As
Publication number | Publication date |
---|---|
CN107229927A (en) | 2017-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8600121B2 (en) | Face recognition system and method | |
Stein et al. | Fingerphoto recognition with smartphone cameras | |
CN110059644A (en) | A kind of biopsy method based on facial image, system and associated component | |
TW201627917A (en) | Method and device for face in-vivo detection | |
US20090268951A1 (en) | Method and system for personal identification using 3d palmprint imaging | |
KR101436290B1 (en) | Detection of fraud for access control system of biometric type | |
CN111144277B (en) | Face verification method and system with living body detection function | |
JP2007135149A (en) | Mobile portable terminal | |
KR100824757B1 (en) | Gait recognition method | |
CN106339676A (en) | Face authentication and face recognition method | |
KR101724971B1 (en) | System for recognizing face using wide angle camera and method for recognizing face thereof | |
CN107609515B (en) | Double-verification face comparison system and method based on Feiteng platform | |
CN103324911A (en) | Anti-cheating system based on face recognition | |
CN107818316A (en) | A kind of batch face identification system | |
CN111666835A (en) | Face living body detection method and device | |
CN109492509A (en) | Personal identification method, device, computer-readable medium and system | |
CN107229927B (en) | Face detection anti-cheating method | |
JP7318833B2 (en) | Image processing device, image processing method, and program | |
CN106650632A (en) | Identity identification method and device, and electronic equipment | |
CN109522782A (en) | Household member's identifying system | |
KR20150069799A (en) | Method for certifying face and apparatus thereof | |
CN113011544B (en) | Face biological information identification method, system, terminal and medium based on two-dimensional code | |
Ives et al. | Iris recognition using the ridge energy direction (RED) algorithm | |
JP5730000B2 (en) | Face matching system, face matching device, and face matching method | |
CN103207990A (en) | People recognition system based on mobile terminal and for police |
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 | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20200403 Termination date: 20200803 |