SampleApp.MainForm.SetMotionDetectionAlgorithm C# (CSharp) Method

SetMotionDetectionAlgorithm() private method

private SetMotionDetectionAlgorithm ( IMotionDetector detectionAlgorithm ) : void
detectionAlgorithm IMotionDetector
return void
        private void SetMotionDetectionAlgorithm(IMotionDetector detectionAlgorithm)
        {
            lock (this)
            {
                detector.MotionDetectionAlgorithm = detectionAlgorithm;
                motionHistory.Clear();

                if (detectionAlgorithm is TwoFramesDifferenceDetector)
                {
                    if (
                        (detector.MotionProcessingAlgorithm is MotionBorderHighlighting) ||
                        (detector.MotionProcessingAlgorithm is BlobCountingObjectsProcessing))
                    {
                        motionProcessingType = 1;
                        SetMotionProcessingAlgorithm(new MotionAreaHighlighting());
                    }
                }
            }
        }
MainForm