The class implements the simplest motion detection algorithm, which is based on difference of two continues frames. The
Although the class may be used on its own to perform motion detection, it is preferred to use it in conjunction with MotionDetector class, which provides additional features and allows to use moton post processing algorithms.
Sample usage:
// create motion detector MotionDetector detector = new MotionDetector( new TwoFramesDifferenceDetector( ), 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 } }