Exemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();

            AppDomain.CurrentDomain.DomainUnload += CurrentDomain_DomainUnload;

            Directory.CreateDirectory("Calculation/CO_Data");
            Directory.CreateDirectory("Calculation/Experimental_Data");
            Directory.CreateDirectory("Calculation/Background/Images");

            Directory.CreateDirectory("Calculation/CO_Data/XML_Files");
            Directory.CreateDirectory("Calculation/Experimental_Data/XML_Files");

            Directory.CreateDirectory("Calculation/CO_Data/Images");
            Directory.CreateDirectory("Calculation/Experimental_Data/Images");

            m_commonVM = this.Resources["CommonViewModel"] as Common_ViewModel;
            var hdriVM   = this.Resources["HDRIViewModel"] as HDRI_ViewModel;
            var strobeVm = this.Resources["StrobViewModel"] as Stroboscope_ViewModel;
            var calcVM   = this.Resources["CalculationViewModel"] as Calculation_ViewModel;

            m_calcVM = calcVM;

            VideoStreamProcessor processor = new VideoStreamProcessor(m_commonVM, calcVM, strobeVm, hdriVM);
        }
Exemplo n.º 2
0
        private static VideoStreamProcessor BuildProcessor()
        {
            var processor = new VideoStreamProcessor {
                FrameSkipValue = 2
            };

            processor.PreProcessingStages.Add(new CloneStage());
            processor.PreProcessingStages.Add(new SplitChannelsStage
            {
                Channel         = 1,
                ColorConversion = ColorConversion.BgrToHsv_Full
            });
            processor.PreProcessingStages.Add(MaskStage.BuildDefaultMask());
            processor.PreProcessingStages.Add(new ContrastStage());
            processor.PreProcessingStages.Add(new PosterizationStage());
            processor.PreProcessingStages.Add(new CannyStage());

            processor.PostProcessingStages.Add(new DetectionStage());

            return(processor);
        }
Exemplo n.º 3
0
 public TestRunner(IServiceProvider serviceProvider)
 {
     _serviceScope         = serviceProvider.CreateScope();
     _videoStreamProcessor = _serviceScope.ServiceProvider.GetRequiredService <VideoStreamProcessor>();
 }