/// <summary> /// Initializes a new instance of the <see cref="ObstacleDetector"/> class. /// </summary> /// <param name="vision"> /// The IDepthSteram vision stream /// </param> /// <param name="autoStart"> /// Whether or not the detector should start automatically /// </param> public ObstacleDetector(IImageStream vision, bool autoStart = true) { this.vision = vision; this.watchThread = new Thread(this.Watch); CStream = CustomStream.GetEdgeViewInstance(); if (autoStart) { Start(); } }
public Settings() { //initialize default values Data._GazeDelay = 2000; //initialize IImageStreams //initialize streams Data._streams = new List <IImageStream>(5); Data._streams.Add(VideoStream.Instance); Data._streams.Add(DepthStream.Instance); Data._streams.Add(InfraredStream.Instance); Data._streams.Add(CustomStream.GetEdgeViewInstance()); Data._streams.Add(CustomStream.GetHoughLineInstance()); //set initial background stream Data._BackgroundStream = Data.streams[0]; InitializeComponent(); GazeDelaySlider.Value = Data.GazeDelay / 1000; GazeDelayValue.Content = Data.GazeDelay / 1000; if (!Data.XboxConnected) { controller.IsEnabled = false; } if (!Data.EyeTribeConnected) { eyenav.IsEnabled = false; } for (int i = Data.streams.Count - 1; i >= 0; i--) { stringNames.Insert(0, Data.streams[i].GetName()); } //configure delay slider GazeDelaySlider.Minimum = 0.1; GazeDelaySlider.Maximum = 5; }