Face recognition systems are widely used to implement personal security systems. Readers can refer to the article The system of face detection based on OpenCV at http://ieeexplore.ieee.org/document/6242980/.
See also Study of Face Detection Algorithm for Real-time Face Detection System at http://ieeexplore.ieee.org/document/5209668.