Real time bg subtraction