1. A method for detecting loitering behavior of objects depicted in a scene captured by a video camera, the method comprising: receiving a trajectory for an object in the scene, wherein the object has been in the scene for a time period, and wherein the trajectory tracks a two-dimensional (2D) path of the object relative to a series of video frames in which the object is depicted; and upon determining that the time period that the object has been in the scene is greater than a threshold time period and determining that the trajectory corresponds to a random walk, generating a loitering alert, wherein determining whether the trajectory corresponds to a random walk comprises: calculating a global loitering score, wherein the global loitering score is based on a distance between a final point in the trajectory and a starting point in the trajectory, calculating at least one local loitering score, wherein each local loitering score is based on a distance between the final point and a respective intermediate point in the trajectory, calculating an estimated loitering score as an average of the global loitering score and the at least one local loitering score, and comparing the estimated loitering score with a threshold loitering score, wherein the trajectory corresponds to a random walk if the estimated loitering score is greater than the threshold loitering score.