SUNY Geneseo Department of Mathematics
Wednesday, October 8
Math 230 01
Fall 2014
Prof. Doug Baldwin
C = chromakey( S, B, r )
% Build logical matrix, M, with 1 wherever pixel in S has color in background range
M = S == r % M = 1 for bkgnd in S
% Substitute pixels from B into S where M = 1
C = S.*(1-M) + B.*M