The modern world is full of data of all kinds; however, the vast amount of video and image data available provides the data set needed for facial recognition. Facial recognition is crucial in safety and surveillance systems that analyze visual data and millions of images. Using facial recognition software, a person's identity can be verified through a variety of media images. For facial recognition, there is a variety of algorithms available. The article presents an approach to a face recognition framework using Haar Cascade, a biometric technology in safety and surveillance systems. It investigates combining standard machine learning techniques for face detection and identification with Raspberry Pi face detection, a cost-effective and easy-to-use embedded system. The system detects faces from indirect and direct images, achieving high speed using the latest Raspberry Pi 4 and Python libraries. The work demonstrates a machine-learning-based design method and a complete embedded system. The face detection accuracy is 92%, and the average time is 0.35 compared to the local binary model (LBP). Many facial recognition algorithms on the web and in literature reviews are vulnerable to image attacks. These methods are very effective in identifying faces in webcams, video streams, images, and videos. This system's use of the Raspberry Pi 4 and advanced Python libraries results in fast and accurate real-time face detection. This paper extends the work first presented at the 12th Iranian/Second International Conference on Machine Vision and Image Processing (MVIP).