changed background detection to use a set image