Detection of Unwanted Things

Hi all,
I have a project on :
Objectives:
Detect unwanted objects/rubbish in common areas such as in estate or building
Algorithim:
1) Save a reference image of a clear background
2) Stream images from the sample video
3) Compare the images with reference image by motion detection/subtraction of 2 colors
i want to ask that how do the 3 points ? Thank you.
Best regards
ironhulkman
I have a project on :
Objectives:
Detect unwanted objects/rubbish in common areas such as in estate or building
Algorithim:
1) Save a reference image of a clear background
2) Stream images from the sample video
3) Compare the images with reference image by motion detection/subtraction of 2 colors
i want to ask that how do the 3 points ? Thank you.

Best regards
ironhulkman