First time here? Check out the FAQ!
answered 2019-11-01 01:38:42 -0600
though it might be possible to port that line by line, i'd suggest, that you ditch it all, and have a look at more sophisticated background subtraction methods