make BackgroundSubtraction to use a pointer to member function for speed.