1. A method comprising: receiving an indication of a brush stroke made on an image displayed in a user interface; identifying an area of the image as a foreground region based on a location of the brush stroke on the image; generating a boundary area on a border of the foreground region, the boundary area containing an unknown region; and solving, by a processor, the unknown region to provide an alpha matte that distinguishes a foreground portion from a background portion in the unknown region; and displaying the alpha matte for the unknown region in real time in response to receiving the indication of the brush stroke.