The class implements motion detection algorithm, which is based on difference of current video frame with predefined background frame. The
Unlike TwoFramesDifferenceDetector motion detection algorithm, this algorithm allows to identify quite clearly all objects, which are not part of the background (scene) - most likely moving objects.
Sample usage:
// create motion detector MotionDetector detector = new MotionDetector( new CustomFrameDifferenceDetector( ), new MotionAreaHighlighting( ) ); // continuously feed video frames to motion detector while ( ... ) { // process new video frame and check motion level if ( detector.ProcessFrame( videoFrame ) > 0.02 ) { // ring alarm or do somethng else } }