## 6 Real-Time Embedded Platform Implementation
We tested the final implementation using different video resolutions and frame rates and with respect to a porting of AdViSED both on the Broadcom SoC with Raspbian OS and on an x86-based 64b general purpose processor (GPP) using Windows10 OS, as shown in Table 5.  
The PC runs at 3.70 GHz, thanks to the Intel Core i3-4170 and 8 GB of RAM. To acquire video frames, we used a simple GitUp Git2 action camera connected via USB on the PC. The performance was compared for both platforms in terms of average frames per second (fps), elaborated for the whole test video set introduced in Section 4. In real-time, we obtain 19 fps for the x86 64b GPP, while the RPI reaches 10.3 fps for the lowest resolution (\(320\times 480\)). For \(320\times 240\) frame size, the maximum frame rate processed in real-time is about 36 fps for the x86 64b GPP and about 19 fps for the RPI platform. The data presented in Table 5 are related to the worst case in which each frame is displayed during the processing on a screen connected to the GPP and on the RPI LCD display. Visualizing the output images requires a lot of computation time; therefore, the application can be sp  
Figure 9: Raspberry Pi 3 model B final implementation at runtime. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Platform**} & \multicolumn{5}{c}{**Frame Size**} \\ \cline{2-6}  & \(\mathbf{320\times 480}\) & \(\mathbf{640\times 480}\) & \(\mathbf{1280\times 720}\) & \(\mathbf{1920\times 1080}\) & \(\mathbf{1920\times 1440}\) \\ \hline X86 64b PC & 19.1 fps & 9.32 fps & 4.23 fps & N/A & 1.54 fps \\ RPi 3 model B & 10.3 fps & 2.33 fps & 0.64 fps & 0.27 fps & N/A \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Real-time processing and output visualization in fps for different platforms. visualization windows. That is why we made other tests, running the application without showing the processed frames and therefore reducing the total overhead. In any case, it was always possible to retrieve information of alarm, overlap index, and processing time on the terminal window. The results in real-time fps without output image visualization are shown in Table 6.  
Table 6 shows an increasing of the performance in both platforms for all the resolutions. In real-time, we obtain about 30 fps for the x86 64b GPP, while the RPI reaches 13.4 fps for low resolution (\(320\times 480\)). For \(320\times 240\) frame size the maximum frame rate processed in real-time is about 47 fps for the x86 64b GPP and about 25 fps for the RPI platform. The latter value is eight times faster than the result achieved in the state-of-art technique by [27], where an implementation on a Raspberry platform of a video-based smoke measuring system was limited at maximum 3 fps for the same input video resolution. In Table 6, the implementation on the x86-based 64b GPP ensures, of course, the best performance in terms of maximum frame rate processed in real-time, but the advantage of the RPI over a desktop computer is still the lower cost--30 USD instead of hundreds of USD--lower power consumption, and portability, considering also its relatively good performance. Figure 10 shows power consumption measurements of the Raspberry Pi platform using different configurations and frame sizes. During the tests, a 5V power supply bench is used and measurements are made tracking the current absorption in mA. The board was disconnected from any peripherals, such as keyboard and mouse, except for the camera. In Figure 10 with the term \"display\", we refer to the configuration test made using a 5-inch display attached to the RPI board (that of Table 5). The other one refers to the version that sends on console data about smoke alarms (that of Table 6).