Have you watched the YouTube tutorials about background detection by "PetitProfessor3D" ?