public void Bat(int w, int h) { mywebcam.TimeToCapture_milliseconds = FrameNumber; mywebcam.Start(0); mywebcam.CaptureWidth = w; mywebcam.CaptureHeight = h; }
public void Start() { webcam.TimeToCapture_milliseconds = FrameNumber; webcam.Start(0); webcam.Start(2); }
public void Start() { webcam.TimeToCapture_milliseconds = FrameNumber; webcam.Start(0); MainWindowView view = MainWindowView.GetInstrance(); view.CameraStartStopButtonText = "Stop"; WebCamOpen = true; }
public void Start() { try { webcam.TimeToCapture_milliseconds = FrameNumber; webcam.Start(0); } catch (Exception) { throw; } }
private void BeginCaptureVideo() { m_webCam = new WebCamCapture(m_captureImageWidth, m_captureImageHeight); m_webCam.FrameNumber = 0; m_webCam.CaptureInterval = 1000 / this.CaptureFrameRate; m_webCam.ImageCaptured += new EventHandler <WebcamEventArgs>(OnWebCam_ImageCaptured); m_webCam.Start(0); }
private void Keyboard_KeyUp(object sender, KeyEventArgs e) { if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == System.Windows.Input.Key.P) { if (ME_test.Visibility != Visibility.Visible) { ME_test.Visibility = Visibility.Visible; webcam.Stop(); ME_test.Play(); } else { ME_test.Stop(); ME_test.Visibility = Visibility.Collapsed; webcam.Start(0); } } }
private void MainWin_Loaded(object sender, RoutedEventArgs e) { BitmapImage myBitmapImage = new BitmapImage();//создание битмапа для хранения изображения //установка цветов некоторым элементам Label_0.Background = System.Windows.Media.Brushes.Lavender; Label_1.Background = System.Windows.Media.Brushes.Lavender; Label_2.Background = System.Windows.Media.Brushes.Lavender; Label_3.Background = System.Windows.Media.Brushes.Lavender; Label_4.Background = System.Windows.Media.Brushes.Lavender; Label_5.Background = System.Windows.Media.Brushes.Lavender; Label_6.Background = System.Windows.Media.Brushes.Lavender; Label_7.Background = System.Windows.Media.Brushes.Lavender; Label_8.Background = System.Windows.Media.Brushes.Lavender; Label_9.Background = System.Windows.Media.Brushes.Lavender; Label_10.Background = System.Windows.Media.Brushes.Lavender; Label_11.Background = System.Windows.Media.Brushes.Lavender; Label_12.Background = System.Windows.Media.Brushes.Lavender; Label_13.Background = System.Windows.Media.Brushes.Lavender; Label_FD.Background = System.Windows.Media.Brushes.Lavender; GroupBox_FD.BorderBrush = System.Windows.Media.Brushes.SteelBlue; GroupBox_TP.BorderBrush = System.Windows.Media.Brushes.SteelBlue; GroupBox_Ruler.BorderBrush = System.Windows.Media.Brushes.SteelBlue; ButtonR.Background = System.Windows.Media.Brushes.SkyBlue; Button2.Background = System.Windows.Media.Brushes.SkyBlue; Button_FD.Background = System.Windows.Media.Brushes.SkyBlue; Form1.Background = System.Windows.Media.Brushes.LightSteelBlue; ComboBox_StartP.Background = System.Windows.Media.Brushes.Azure; ME_test.Visibility = Visibility.Collapsed; //инициализация камеры и очистка текстбоксов webcam = new WebCamCapture(); TextBox_Diametr.Clear(); TextBox_N.Clear(); TextBox_V.Clear(); TextBox_p.Clear(); TextBoxCp.Clear(); webcam.FrameNumber = ((ulong)(0ul)); webcam.TimeToCapture_milliseconds = 30; webcam.ImageCaptured += new WebCamCapture.WebCamEventHandler(webcam_ImageCaptured); _FrameImage = ImageWebcam1; //инициализация линий myLine = new Line(); myLine.StrokeThickness = 1; myGrid.Children.Add(myLine); my2Line = new Line(); my2Line.StrokeThickness = 1; myLine.Stroke = System.Windows.Media.Brushes.Blue; my2Line.Stroke = System.Windows.Media.Brushes.Red; myGrid.Children.Add(my2Line); webcam.Start(0);//запуск потока видео }
public void Continue() { webcam = new WebCamCapture(); webcam.FrameNumber = ((ulong)(0ul)); webcam.TimeToCapture_milliseconds = FrameNumber; webcam.ImageCaptured += new WebCamCapture.WebCamEventHandler(webcam_ImageCaptured); // change the capture time frame //webcam.TimeToCapture_milliseconds = FrameNumber; // resume the video capture from the stop webcam.Start(0); }
private void MainWin_Loaded(object sender, RoutedEventArgs e) { vMain = this; //M TimeOut1.Stream = Properties.Resources.time; //V> sp.Stream = Properties.Resources.NoSignalSound; sp.Load(); TimeOut1.Load(); GroupBox_SensorData.BorderBrush = System.Windows.Media.Brushes.Navy; GroupBox_Timer.BorderBrush = System.Windows.Media.Brushes.Navy; TextBox1.Visibility = Visibility.Collapsed; ctext.Visibility = Visibility.Collapsed; Image_lantern.Visibility = Visibility.Collapsed; Label_ByteData.Visibility = Visibility.Collapsed; //Label_DephMeter.Visibility = Visibility.Collapsed; Label_SendingBytes.Visibility = Visibility.Collapsed; //V< webcam = new WebCamCapture(); //C> // webcam.CaptureHeight = 100; // webcam.CaptureWidth = 100; webcam.FrameNumber = ((ulong)(0ul)); webcam.TimeToCapture_milliseconds = 30; webcam.ImageCaptured += new WebCamCapture.WebCamEventHandler(webcam_ImageCaptured); _FrameImage = ImageWebcam1; webcam.Start(0); dtm = DateTime.Now; dtm = dtm.AddMinutes(15.0); //включено в класс Controller Maincontroller.InitializeJoystick(this); MainUDP.Receiver(); timer.Tick += new EventHandler(timerTick); timer.Interval = new TimeSpan(0, 0, 1); timer2.Tick += new EventHandler(timer2Tick); timer2.Interval = new TimeSpan(0, 0, 1); timer3.Tick += new EventHandler(timer3Tick); timer3.Interval = new TimeSpan(0, 0, 3); ClockTimer.Interval = new TimeSpan(0, 0, 1); ClockTimer.Tick += new EventHandler(ClockTimerTick); ClockTimer.Start(); Thread thread1 = new Thread(Joystickthread); thread1.Priority = ThreadPriority.Highest; thread1.Start(); //setter.ReadCoefficients("Coefficents.txt"); timercontroller.StartTimer(15); }
public void InitializeWebCam(ref System.Windows.Forms.PictureBox ImageControl) { webcam1 = new WebCamCapture(); webcam1.FrameNumber = ((ulong)(0ul)); webcam1.TimeToCapture_milliseconds = FrameNumber; webcam1.ImageCaptured += webcam1_ImageCaptured; //webcam1.ImageCaptured += new WebCamCapture.WebCamEventHandler(webcam_ImageCaptured); _FrameImage = ImageControl; webcam1.TimeToCapture_milliseconds = FrameNumber; webcam1.Start(0); bCapture = true; }
public CameraCapture() { try { WebCam_Capture.WebCamCapture WebCam = new WebCamCapture(); WebCam.Start(0); //ScanComplete += new EventHandler(ScanningComplete); WebCam.Height = 0; WebCam.Width = 0; WebCam.ImageCaptured += new WebCamCapture.WebCamEventHandler(ImageCaptured); } catch { } }
private void Keyboard_KeyUp(object sender, KeyEventArgs e)//V { if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == System.Windows.Input.Key.D1) { if (TextBox1.Visibility == Visibility.Visible) { TextBox1.Visibility = Visibility.Collapsed; } else { TextBox1.Visibility = Visibility.Visible; } } if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == System.Windows.Input.Key.D2) { if (ctext.Visibility == Visibility.Visible) { ctext.Visibility = Visibility.Collapsed; } else { ctext.Visibility = Visibility.Visible; } } if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == System.Windows.Input.Key.R)//C { webcam.Stop(); webcam.Start(0); } if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == System.Windows.Input.Key.P)//V { if (ME_Test.Visibility != Visibility.Visible) { ME_Test.Visibility = Visibility.Visible; webcam.Stop(); ME_Test.Play(); } else { ME_Test.Stop(); ME_Test.Visibility = Visibility.Collapsed; webcam.Start(0); } } if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == System.Windows.Input.Key.F3)//V { Image_IsSound.Visibility = Visibility.Visible; if (NoSoundEffects == 0) { NoSoundEffects = 1; Image_IsSound.Source = new BitmapImage(new Uri("Images/NoSound.png", UriKind.Relative)); timer3.Start(); } else { NoSoundEffects = 0; Image_IsSound.Source = new BitmapImage(new Uri("Images/SoundIcon.png", UriKind.Relative)); timer3.Start(); } } if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == System.Windows.Input.Key.D3)//V { if (Label_ByteData.Visibility == Visibility.Visible) { Label_ByteData.Visibility = Visibility.Collapsed; } else { Label_ByteData.Visibility = Visibility.Visible; } } if (e.KeyboardDevice.Modifiers == ModifierKeys.Shift && e.Key == System.Windows.Input.Key.D4)//V { if (Label_SendingBytes.Visibility == Visibility.Visible) { Label_SendingBytes.Visibility = Visibility.Collapsed; } else { Label_SendingBytes.Visibility = Visibility.Visible; } } if (e.Key == System.Windows.Input.Key.T) //V { vmodel.FirstDepth = Model.vSM.depth; //+погрешность } }
private void bntStart_Click(object sender, RoutedEventArgs e) { webcam.TimeToCapture_milliseconds = FrameNumber; webcam.Start(0); }
public void Start() { webcam.Start(0); }
private void camStart(object obj) { webCam.TimeToCapture_milliseconds = frameNumber; webCam.Start(0); }
public void Start() { camera.TimeToCapture_milliseconds = frames; camera.Start(0); }
public void Start() { webcam.TimeToCapture_milliseconds = 30; webcam.Start(0); }
private void Start() { m_webCamCapture.TimeToCapture_milliseconds = FrameNumber; m_webCamCapture.Start(0); }