Skip to content

Motion detection by frames substraction and k-means clustering with OpenCV

Notifications You must be signed in to change notification settings

korzck/motion-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frames substraction motion detection

This project uses OpenCV video capture (from standard video input stream) and frame filtering to detect ant difference in the picture. Refreshing (comparing) rate is at each second frame. Difference is calculated in this formula: difference = (current frame) - (previous frame).

Each frame is processed to set every pixel to white if sum of its RGB values is more than some value and to black if not. Additionally a few methods of noise reduction are applied to the substracted image. In this filtered image a k-means clustering is applied and drawn on the input image.

Output video:

Filtered substracted image with k-means:

TODO:

  • Apply Gaussian Mixture Models to cluster detections (somehow)

About

Motion detection by frames substraction and k-means clustering with OpenCV

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published