Implement background subtraction