Improved Sampling-based Alpha Matting in Images and Video