A chrome-keying algorithm