openCV -python is a python library use for solving computer vision problem.
Here we created a motion detector which will detect the objects came front of the camera and add a rectangular box around it.
its simple. Step1: First it take the first frame and save it .
Step2: Calculate the absolute difference between the first frame and next other frames(If difference is found means that their is a object).
Step3: Set a threshold value so that less than 30 pixel value will black and greater than 30 pixels will be white.
Step4: Create rectangular boxs where the object is detected.
Thats all.
If you wanna go farther then you should check out Edureka OpenCV tutorial. Thank You.