| Algorithm 1: Edge-Level Evaluation of a PIDS |
| 1 Initialize variables n, and . |
| 2 Calculate IN for all s of the video. |
| 3 If two or more INs intersect, merge them into a single expanded IN. |
| 4 Calculate intrusion beginning neighbourhood IBN for each . |
| 5 Obtain alarms from the PIDS. |
| 6 Calculate TP, FN and FP. |
| 7 Calculate precision, recall and other metrics. |