January 2018
Intermediate to advanced
268 pages
6h 20m
English
This is, possibly, the simplest technique we can use to see what parts of the video are moving. When we consider a live video stream, the difference between successive frames gives us a lot of information. The concept is fairly straightforward! We just take the difference between successive frames and display the differences.
If we move rapidly from left to right, we will see something like this:

As you can see from the previous image, only the moving parts in the video get highlighted. This gives us a good starting point to see what areas are moving in the video. Here is the code to do this:
import cv2 # Compute the frame ...
Read now
Unlock full access