1. A foreground image separation method for separating dynamic foreground and static background in continuously inputted images with automatic white balance adjustment and brightness variation, comprising: providing a reference image as a basis for color gain compensation; receiving an input image from the camera; performing a color gain compensation step to the input image according to the reference image to generate a compensated image with color and brightness which are approximately similar to that of at least part of regions of the reference image corresponding to the compensated image; and performing a background subtraction algorithm to generate a background separation result.