Abstract:The face recognition technology is widely used for its low cost, user-friendly and high efficiency. At the same time, identity forgery attack has also been the corresponding occurrence. The face recognition system attacks include photo face attacks, video face attacks and three-dimensional face model attacks, etc. For these attacks, prevention methods are carried out around the midpoint of in liveness detection based on human face. This paper focuses on the blink detection and background analysis algorithm, and carries out eye location with regional growth algorithm. The morphological operation is used to judge the human eye state, and the Hash algorithm is used to compose the background difference. These methods construct a Liveness Detection Systems. Based on the blink detection and background analysis algorithm, this paper designs a liveness detection system including blink detection module and background analysis module; uses the MFC architecture and OpenCV2.4.9 to build a liveness detection system which can resist photo attack and video attack; makes the experiment and evaluation of the system. In comparison with other similar types of systems, the system performance of this paper is excellent.