1. A non-transitory computer-readable medium comprising software for video surveillance, which when executed by a computer system, causes the computer system to perform operations comprising: receiving video from a video camera; detecting features in the video; accumulating feature strength for each pixel in a window, wherein the feature strength is proportional to a number of times a feature is present over time; classifying those pixels whose accumulated feature strength over time is larger than a threshold as background features; comparing the background features to extracted features to determine foreground features, the foreground features corresponding to those features not classified as the background features; estimating object count based on the foreground features detected; computing a current object density based on the object count; determining a current range of object densities by adjusting a maximum object density and a minimum object density, wherein adjusting the maximum object density and the minimum object density comprises: subtracting a recovery density from the maximum object density if the maximum object density is greater than a first normal value; and adding the recovery density to the minimum object density if the minimum object density is less than a second normal value; replacing the minimum object density with the current object density if the current object density is less than the minimum object density; replacing the maximum object density with the current object density if the current object density is greater than the maximum object density; dynamically adjusting one or more object density thresholds based on the determined current range of object densities; dividing the determined current range of object densities into a plurality of classes based on the one or more object density thresholds; classifying the current object density based on the one or more dynamically adjusted object density thresholds; and generating an alert based on determining that a classification of the current object density is associated with the alert.