Bàibáonàyđề xuất mộtphươngpháppháthiện khuôn mặttrực tiếp và nhận dạngngười thực hiện trên máy tính nhúngRasperbery Pi. Các ảnhđầuvàođược thu thập từ camera vàđưa vào thuật toán phát hiện khuôn mặt trực tiếp và nhậndạng khuôn mặt. Phần phát hiện khuôn mặt sử dụng Haarcascadesđể trích xuất ra cácđặctrưngcủa khuôn mặt. Tiếpđến,để kiểm tra xem khuôn mặtđưavàocameracóthật sựlà khuôn mặtngười thực tế đangchụp hay là khuôn mặt giảtừ ảnh in hoặc video đưa vào, một phương pháp xác địnhkhuôn mặt trực tiếp dựa trên sự thayđổicườngđộ sáng trênkhuôn mặt nhờ thayđổi nhịp tim ở các thờiđiểm khác nhautrênkhunghình.Saukhiđãxácđịnhđượcđúngkhuônmặtthật, hình ảnhđượcđưavàonhận diện thông qua thuật toánphân tích thành phần chính dựa trên khuôn mặt riêng eigenfaces nhờ so sánh vớicơsở dữ liệuđãcó.Nếuđúngkhuônmặt nằm trong dữ liệu thuộcđốitượng cho phép truy nhập,bộ điều khiển sẽ thực hiện thao tác mở cửa. Thuậttoán đãđược thực hiệntrêncơsở dữ liệu gồm25người với 400 ảnhchụp huấn luyện, cho độ chính xác 80%, và thực thi trênmáy tính vớicamera và cơ cấu chấp hành có giá thành hạnhưngvẫnđápứng thời gian thực.This paper proposes an approach for live face recognition on Rasperbery Pi, and used for face recognition based door lockingsystem. The face images are acquired by an camera and fed to live face detection and face recognition system. The face detection is based on Haar cascades to extract face features. Then the face is analyzed to check whether it is a live face or a fakeface image fed from a printed picture or video containing face image sequences. In this study, we consider the informationfrom the changes of pixel intensity in a series of acquired face images that reflect the chages of heart rate during the rhythmiccontraction and relaxion of the heart. Once verified as a live face, the face image is fed to the face recognition process usingeigenfaces and principal component analyis. The input image is compared with the database to check whether it belongs to aperson in the database or not. If yes, the door is controlled to allow an entrance. The live face detection and recognition wasvalidated on a database including 25 people with 400 training images. The average accuracy obtained approximately 80%.The hardware including camera and actuactors are with low expense but meet real time performance.