示例#1
0
        /// <summary>
        /// Reset motion detector to initial state.
        /// </summary>
        ///
        /// <remarks><para>The method resets motion detection and motion processing algotithms by calling
        /// their <see cref="IMotionDetector.Reset"/> and <see cref="IMotionProcessing.Reset"/> methods.</para>
        /// </remarks>
        ///
        public void Reset( )
        {
            // lock ( _sync )
            {
                _detector?.Reset( );
                _processor?.Reset( );

                _videoWidth  = 0;
                _videoHeight = 0;

                if (_zonesFrame != null)
                {
                    _zonesFrame.Dispose( );
                    _zonesFrame = null;
                }
            }
        }
示例#2
0
        /// <summary>
        /// Reset motion detector to initial state.
        /// </summary>
        ///
        /// <remarks><para>The method resets motion detection and motion processing algotithms by calling
        /// their <see cref="IMotionDetector.Reset"/> and <see cref="IMotionProcessing.Reset"/> methods.</para>
        /// </remarks>
        ///
        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;
                }
            }
        }