309 in one embodiment the threshold levels may be adaptive and dynamic based on additional statistics of the reconstruction error such as its variance or statistical quantities to enable characterizations of the macroblocks a collection of numerical quantities are maintained for each macroblock the value mm is the mean vector associated with the mth macroblock urn is a d u00d7 k orthogonal matrix that represents a k dimensional subspace that encompasses the variation of macroblock in due to small lighting changes and repetitive motion e g running water or swaying leaves the number of basis vectors k lt lt d is chosen as a fixed parameter the scene model computes for each macroblock y m is the vector difference between the current macroblock x m and the mean location m m r m is the projection of this vector difference on to the subspace u m e m is the reconstruction error it captures the extent to which the current macroblock is well represented by the scene model with smaller reconstruction errors indicating better accordance with the model the average reconstruction error is tracked with um the scene model then locally classifies the current macroblock 39 s appearance as either background consistent with typical background variation or lighting change or as an anomaly background is indicated by b m 1 and anomaly by b m 0 local classification is done according to a hysteresis threshold rule the system also allows the definition of regions of macroblocks as background blocks or anomaly blocks improving the robustness of the system there can be situations where a region is undergoing.