## Materials and Methods
### Implemented Technique  
For the development of the application, it was necessary to declare the permissions and the corresponding validations to make use of the camera of the phone. These permissions must be executed at the beginning of the application. The first step is to obtain a video of 30 frames per second (FPS) with a resolution of 640 pixels \(\times\) 480 pixels with a Red, Green, and Blue Channels (RGB) color model for the formation of real color images. We positioned an image acquisition box in the central part of the forehead, because this is a region of the human body that has a wide and uniform area, from where the necessary information to process can be acquired. The methodology involved in the estimation of the heart rate, through our application, is displayed in Figure 1.  
For accurate identification of the section of the face from which the information was acquired, it was necessary to use the Haar cascade classifier according to the following equation:  
\[H(\mathrm{x})=sign\sum_{i=1}^{\tau}a_{i}h_{i}(x). \tag{1}\]  
Once the signal is obtained, the normalized images are applied by the variance process, according to the following expression:  
\[I_{G}{}^{\prime}(x,y)=\frac{I_{G}(x,y)-\mu(I)}{\sigma(I)}. \tag{2}\]  
Then, it is necessary to apply normalization preprocessing based on Haar features to the video, which includes a set of images according to the following equation:  
\[F_{Haur}=\frac{\sum(x,y)_{\in N}I(x,y)-\sum(x,y)_{\in B}I(x,y)}{\sigma(I)}. \tag{3}\]  
The flowchart of the process implemented in this application is shown in the Figure 2.  
Figure 1: Methodology of the estimated health rate solution. For each frame that is obtained during video processing, a tracing of a region of the face is performed using a Haar cascade classifier based on the location of reference points, such as eyes, nose, mouth, and face contour. The cascade classifier used in the face tracking step has shown great performance and stability in object detection when a correct configuration is made [10]. Once the box on the top part of the forehead is obtained, as shown in Figure 3 (left side), the average intensity of the pixels analyzed in the green channel of the RGB model over the specific region or area is obtained, as shown in Figure 3 (right side). Figure 2: Flowchart of the process implemented in the application. This theory describes the red channel to be the most suitable for detecting the blood supply, but based on our experimentation, we determined that the green channel provides more accurate information with less susceptibility to the outdoor environment; green light has a higher frequency compared to the red channel because it is more easily refracted, thereby generating better acquisition results. The previous process is repeated continuously until it samples 256 frames in approximately 8.5 s, which allows an analysis of the information signal from the selected frame to be performed during the time chosen for processing. This signal has a low SNR because the acquisition of information is not by direct contact; rather, it is done from a distance. However, the values obtained have an accurate magnitude, and it is possible to differentiate between the signal and the noise. The important information of the signal includes the harmonics obtained from the images, specifically the base or predominant harmonics of the frames, through which the PPM will be obtained by mathematical processing. Once the values associated with the intensity are acquired, they are stored in an information vector for further processing. The next step is to apply a 5 th order bandpass Butterworth filter with a frequency range of 0.5 Hz to 3.1 Hz to eliminate any other unwanted signal that could affect the correct interpretation of the information associated with the cardiac pulse. Figure 4 describes the relationship between the obtained signal (a) and the filtered signal (b).