decomposition of background detector on bdteacher and bgdetector