Introduction - If you have any usage issues, please Google them yourself
On a video motion detection, based on the two adjacent interframe difference. The gray-scale difference between the two adjacent frames (may be a multi-frame) calculating a pixel-by-pixel, and is determined by setting the threshold value to the pixels corresponding to the moving foreground, and then get the moving foreground region.