diff --git a/chuni-hands/Config.cs b/chuni-hands/Config.cs index 1bd1fcc..8e45d49 100644 --- a/chuni-hands/Config.cs +++ b/chuni-hands/Config.cs @@ -13,12 +13,13 @@ namespace chuni_hands { public double Threshold { get; set; } = 10; public int Distance { get; set; } = 40; + public int CameraId { get; set; } = 0; public int BootstrapSeconds { get; set; } = 2; public int CaptureWidth { get; set; } = 640; public int CaptureHeight { get; set; } = 480; public int Fps { get; set; } = 60; public bool LogDiff { get; set; } - public string SendKeyMode { get; set; } = "be"; + public string SendKeyMode { get; set; } = "chuni_io"; public string EndPoint { get; set; } = "http://10.233.3.22:4420/update_air"; public bool ShowVideo { get; set; } = true; diff --git a/chuni-hands/MainWindow.xaml.cs b/chuni-hands/MainWindow.xaml.cs index 7b7e45d..a52994a 100644 --- a/chuni-hands/MainWindow.xaml.cs +++ b/chuni-hands/MainWindow.xaml.cs @@ -97,7 +97,7 @@ namespace chuni_hands { } private void Window_Loaded(object sender, RoutedEventArgs e) { - var cap = new VideoCapture(); + var cap = new VideoCapture(_config.CameraId); cap.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.FrameWidth, _config.CaptureWidth); cap.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.FrameHeight, _config.CaptureHeight); cap.SetCaptureProperty(Emgu.CV.CvEnum.CapProp.Autofocus, 0);