## 4 Methodologies and Results Analysis
### Primary Phase  
The eye and face detection module was programmed with the modified feature-based Haar cascade face detection classifier algorithm [13; 22; 26; 28; 31; 32]. The modified Haar cascade face detection classifier algorithm detects an edge, line, and center-surround features of an intruder object. The variety of Haar cascade classifiers is shown in Figure 6. As shown in Figures 6 and 7, the rectangle features can be captured and computed based on the intermediate representation of the captured intruder's image. The results of the face detection rate analysis of Haar Cascade classifier with existing methodologies is represented in Table 2, which shows that the accurate face detection rate of the modified Haar cascade classifier was very high when compared to previous methodologies for approximately 5000 face samples in ordinary scenarios where intruders have not obscured their faces. This is the primary reason why the modified Haar cascade classifier was used in the present research experiments. The detected image of an intruder at a location a, b contains the sum of the pixels above and to the left of a, b, as described in the following equation. \[ii(a,b)=\sum_{a^{\prime}\leq a,b\leq b^{\prime}}i(a^{\prime},b^{\prime}) \tag{1}\]  
where \(ii(a,b)\) is the detected image of an intruder, \(i(a^{\prime},b^{\prime})\) is the original image, \((a,b)\) represents \(x\) and \(y\) coordinates of the detected image, \((a^{\prime},b^{\prime})\) represents \(x\) and \(y\) coordinates of the original image, and S represents sum of the pixels. The initial condition for \(S\) is set to zero when the proposed system is in the idle state or has not captured the trespasser in the smart home using the following pair of recurrences. \[S(a,b) =S(a,b-1)+i(a,b) \tag{2}\] \[ii(a,b) =ii(a,b-1)+S(a,b) \tag{3}\]  
Figure 6: Haar cascade classifiers, (**a**) edges features; (**b**) lines features; (**c**) four rectangle features; (**d**) center-surround features; and (**e**) face classifiers. A cascade classifier calculates the centroid of the detected intruder's face, and a radius is calculated based on a scale value. According to the geometrical face model [27], with the cropped mouth region as the Region of Interest (ROI), we defined the top left coordinates as (\(x\), \(y\)), the centroid point as (\(cx\), \(cy\)), and the radius as \(r\). The mouth region could then be roughly obtained as follows  
\[x=\left(cx-\left(\frac{2r}{5}\right)\right)\text{ and }y=\left(cy+\left(\frac{r}{3} \right)\right) \tag{4}\]  
\(Wm=r\) and \(Hm=r/2\) where mouth height is \(Hm\) and mouth width is \(Wm\). The main reason of the usage of cascade classification represented in Equation (4) in the conducted experiments is to allow the proposed system to detect multiple faces, which includes detection of overlapping face patterns by distinguishing strong and weak classifiers as shown in Figures 8 and 9. Here, the feature value is defined as the total difference between sum of the pixels S in the white rectangle and black rectangle as shown in Figure 6. The algorithm defines weak classifiers by thresholding captured feature values. The modified Haar Cascade classification algorithm trains strong classifiers to achieve very low false acceptance and false recognition rates. As shown in Figure 8, a positive result from the first classifier triggers the assessment of a second classifier which in turn triggers a third classifier, and so on. If during the whole process, a negative result is prompted, then it results in the termination of the subwindow. In this phase, numerous classifier stages are built using the modified Haar cascade to minimize false negatives. In comparison to the existing methodologies, this framework was 15 times faster than the other recognition frameworks [31]. As per the face location framework portrayed by [PERSON] et al., a Multiclassifier-based Near-Real-Time Face Detection System is the fastest algorithm in detecting human faces as compared to existing methodologies.