1. A method for generating a portrait of a subject for an identification document, the method comprising: receiving, at a mobile device, a photo image of the subject, the photo image including a foreground and a background, wherein the foreground includes the subject's face and the background does not include the subject's face; estimating the foreground and the background of the photo image by an image matting process that includes determining a probability of each pixel being a boundary pixel between the foreground and the background, wherein the estimation is without calibrating a portion from the photo image against a portion from an additional photo image that includes either the subject or the background; masking the estimated background from the photo image; and subsequently generating the portrait of the subject based on the photo image with the background masked.