1. A method for separating a foreground image, the method comprising: obtaining an input image, and color information and depth information of the input image; roughly dividing, based on the depth information of the input image, the input image to obtain an initial three-color image, the initial three-color image including a foreground image, a background image, and an unknown region; reducing or expanding, based on the color information of the input image, the unknown region in the initial three-color image to obtain an optimized three-color image, the reducing or expanding including moving a boundary of the unknown region towards or away from a boundary of the foreground image; separating the foreground image from the optimized three-color image; and wherein the reducing or expanding the unknown region in the initial three-color image based on the color information of the input image further includes, dividing the unknown region of the initial three-color image into a plurality of local regions, and for each local region, determining whether color distribution in the local region satisfies a desired condition, and reducing or expanding the local region until the color distribution of the local region satisfies the desired condition when the desired condition is not satisfied, wherein the desired condition is a condition in which there are two kinds of color in the local region.