1. A method for automatically segmenting foreground and background objects in images, comprising: encoding and decoding a first image at a first time reference; extracting macroblocks from a second image at a second time reference; mapping the macroblocks with corresponding arrays in the decoded first image according to a macroblock local vector; deriving frame residuals between the macroblocks and the corresponding arrays; mapping macroblocks to the first image according to a global motion model; deriving global residuals between the macroblocks and the corresponding global motion compensated array in the first image; tagging the macroblocks as a frame prediction type based on one local motion vector; and classifying the macroblocks as foreground or background by comparing the global residuals with the derived frame residuals.