1. A method of classifying elements in blocks within a frame of a set of frames, said method comprising the steps of: creating a background model for a block based on a statistical function applied to features of elements for the block in the set of frames, the background model being represented as a plurality of Discrete Cosine Transform (DCT) coefficients for the block; receiving a mapping of features to labels indicating whether data for the block in a set of frames corresponds to foreground or background; calculating a difference measure comprising a plurality of DCT coefficient difference values based on features of an element for the block within the frame and features of the background model, the frame being represented as DCT coefficients; classifying the element for the block within the frame into foreground or background based upon the difference measure and the mapping; and updating the background model using the frame represented as DCT coefficients.