1. A method comprising: receiving a trimap of an image that specifies a foreground region, a background region and an unknown region for the image; segmenting the trimap into a plurality of segments, each segment including a portion of the unknown region and at least one of a portion of the foreground region or a portion of the background region; and solving, by a processor, the portion of the unknown region in each segment to provide an alpha matte that distinguishes a foreground region from a background region in the portion of the unknown region, the solving the portion of the unknown region for each segment comprising employing a relatively larger kernel size when a size of the portion of the unknown region in the segment is relatively wide and employing a relatively smaller kernel size when the size of the portion of the unknown region in the segment is relatively narrow.