示例#1
0
 /// <summary>
 /// Creates a new instance of <see cref="FrameDiffAnalyser"/>.
 /// </summary>
 /// <param name="config">The motion configuration object.</param>
 /// <param name="onDetect">A callback when changes are detected.</param>
 /// <param name="imageContext">The image metadata.</param>
 public FrameDiffAnalyser(MotionConfig config, Action onDetect, IImageContext imageContext)
     : base(imageContext)
 {
     this.TestFrame    = new List <byte>();
     this.MotionConfig = config;
     this.OnDetect     = onDetect;
 }
        /// <summary>
        /// Creates a new instance of <see cref="FrameDiffDriver"/>.
        /// </summary>
        /// <param name="config">The motion configuration object.</param>
        /// <param name="onDetect">A callback when changes are detected.</param>
        public FrameDiffDriver(MotionConfig config, Action onDetect)
        {
            _motionConfig = config;

            _onDetect            = onDetect;
            this.OnDetectEnabled = _onDetect != null;

            _testFrameAge           = new Stopwatch();
            this.LastDetectionEvent = new Stopwatch();
        }
 /// <summary>
 /// Creates a new instance of <see cref="FrameDiffAnalyser"/>.
 /// </summary>
 /// <param name="config">The motion configuration object.</param>
 /// <param name="onDetect">A callback when changes are detected.</param>
 public FrameDiffAnalyser(MotionConfig config, Action onDetect)
 {
     this.TestFrame    = new List <byte>();
     this.MotionConfig = config;
     this.OnDetect     = onDetect;
 }