The invention provides methods and apparatus, including computer program products,
implementing and using techniques for masking and extracting a foreground portion
from a background portion of a digital image. In the method, a first input defining
a first border region is received, which includes at least a part of the foreground
portion and at least a part of the background portion in a first digital image.
A second input defining a second border region is received, which includes at least
a part of the foreground portion and at least a part of the background portion
in a second digital image. An intermediary border region is interpolated for an
image intermediary in time to the first and second digital images and the first,
second, and intermediary border regions are used for masking the foreground portion
from the background portion in the digital video.