Accord.Vision.Motion.MotionDetector.Reset C# (CSharp) Method

Reset() public method

Reset motion detector to initial state.

The method resets motion detection and motion processing algotithms by calling their IMotionDetector.Reset and IMotionProcessing.Reset methods.

public Reset ( ) : void
return void
        public void Reset( )
        {
            lock ( sync )
            {
                if ( detector != null )
                {
                    detector.Reset( );
                }
                if ( processor != null )
                {
                    processor.Reset( );
                }

                videoWidth  = 0;
                videoHeight = 0;

                if ( zonesFrame != null )
                {
                    zonesFrame.Dispose( );
                    zonesFrame = null;
                }
            }
        }