Research Article

Stopping Accidents before They Happen: Perceiving Lane-Level Moving Vehicle Danger Regions to Warn Surrounding Drivers and Pedestrians

Algorithm 3

getDynamicDangerRegion( ).
Input: , , ,
Output:
   (1) // Initialize , is the edge cell set of these edges that goes by during
   (2)
   (3) // Compute moving region during
   (4)
   (5) // Compute
   (6) FOR IN DO
   (7) IF
   (8) // Get   ‘s  
   (9)
   (10)  FOR IN DO
   (11)   IF
   (12)  Insert into
   (13)  END IF
   (14)  END FOR
   (15)  END IF
   (16)  END FOR
   (17)  
   (18)  FOR IN DO
   (19)  
   (20)  FOR IN DO
   (21)   IF
   (22)  
   (23)  Insert into
   (24)  END IF
   (25)  END FOR
   (26)  END FOR
(27) RETURN