add cam idx and change default io

master
logchan 2020-02-20 10:13:30 +09:00
parent 8f2bbb656f
commit 4a8a4829fb
2 changed files with 3 additions and 2 deletions

View File

@ -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;

View File

@ -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);