public void Reset() { _backgroundSubstractor = new BackgroundSubstractor(); _feautePointMotionDetector = new FeaturePointMotionDetector(); _sceneChangeDetector = new SceneChangeDetector(); _blockMatchingDetector = new BlockMatchingDetector(); }
public EffectsForm(Frame[] frames) { InitializeComponent(); _frames = frames; _imageProcessor = new ImageProcessor(); //trackBarGammaCorrection.Setup(checkBoxGammaCorrection, "Gamma Correction (gamma = {0:f})", // value => _gammaCorrectionValue = value, // value => value / 10f); //trackBarLogCorrection.Setup(checkBoxLogCorrection, "Log Correction (k = {0:f})", // value => _logCorrectionValue = (int)value); trackBarFrameNumber.Setup(labelFrameNumber, "Frame number = {0}", value => _frameNumber = (int)value); trackBarLinearAverageRadius.Setup(labelLinearAverageRadius, "Радиус = {0}", value => _linearAverageRadiusValue = (int)value); trackBar2DCleanerRadius.Setup(label2DCleanerRadius, "Радиус = {0}", value => _2DCLeanerRadiusValue = (int)value); trackBar2DCleanerThreshold.Setup(label2DCleanerThreshold, "Порог = {0}", value => _2DCLeanerThresholdValue = (int)value); trackBarMedianFilterRadius.Setup(labelMedianFilterRadius, "Радиус = {0}", value => _medianFilterRadius = (int)value); trackBarBackgroundSubstractorThreshold.Setup(labelBackroundSubstractorThreshold, "Порог = {0}", value => _backgroundSubstractorThreshold = (int)value); trackBarSceneChangeDetectorThreshold.Setup(labelSceneChangeDetectorThreshold, "Порог = {0}", value => _sceneChangeDetectorThreshold = (int)value); trackBarBlockThreshold.Setup(labelBlockThreshold, "Порог = {0}", value => _blockThreshold = (int)value); trackBarBlockSize.Setup(labelBlockSize, "Размер блока = {0}", value => _blockSize = (int)value); trackBarVocrControurThreshold.Setup(labelVocrControurThreshold, "Порог = {0}", value => _vocrContourThreshold = (int)value); trackBarVocrControurGain.Setup(labelVocrControurGain, "Усилене = {0}", value => _vocrContourGain = value, i => i / 100f); trackBarVocrControurBrightnessThreshold.Setup(labelVocrControurBrightnessThreshold, "Порог яркости = {0}", value => _vocrContourBrightnessThreshold = (int)value); checkBoxVocrContourShow.Setup(value => _vocrContourShow = value); radioButtonProcessTypeParallelepiped.CheckedChanged += ProcessTypeRadioButtonHandler; radioButtonProcessTypePyramid.CheckedChanged += ProcessTypeRadioButtonHandler; radioButtonProcessTypeCone.CheckedChanged += ProcessTypeRadioButtonHandler; radioButtonColorModelRgb.CheckedChanged += ColorModelRadioButtonHandler; radioButtonColorModelYuv.CheckedChanged += ColorModelRadioButtonHandler; _backgroundSubstractor = new BackgroundSubstractor(); _feautePointMotionDetector = new FeaturePointMotionDetector(); _sceneChangeDetector = new SceneChangeDetector(); _blockMatchingDetector = new BlockMatchingDetector(); chartMotionDetector.SetCheckBoxes(checkBoxObjectCountColumn, checkBoxMinAreaColumn, checkBoxMaxAreaColumn); chartFeaturePoints.SetCheckBoxes(new [] { checkBoxFeaturePointColumn, checkBoxSimilarPointColumn }); }