1. A method for determining an alpha value for a candidate pixel of an image in an alpha matting process, the method comprising: selecting two or more pairs of foreground pixels and background pixels; for each pair of foreground pixel and background pixel, calculating an associated alpha value based on a color of the foreground pixel and a color of the background pixel; for each pair of foreground pixel and background pixel, calculating a probability function based on the associated alpha value, wherein the probability function is modeled by assuming two or more characteristics of the pixels as statistically independent; determining the pair of foreground pixel and background pixel with the highest value of the probability function; and setting the alpha value for the candidate pixel to the associated alpha value of the determined pair of foreground pixel and background pixel.