CLNUIDeviceTest.CLNUIDevice.GetCameraDepthFrameRGB32 C# (CSharp) Method

GetCameraDepthFrameRGB32() private method

private GetCameraDepthFrameRGB32 ( IntPtr camera, IntPtr data, int timeout ) : bool
camera System.IntPtr
data System.IntPtr
timeout int
return bool
        public static extern bool GetCameraDepthFrameRGB32(IntPtr camera, IntPtr data, int timeout);

Usage Example

Beispiel #1
0
 void comboBox1_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (running == true)
     {
         running = false;
         captureThread.Join();
         if (camera != IntPtr.Zero)
         {
             CLNUIDevice.StopCamera(camera);
             CLNUIDevice.DestroyCamera(camera);
         }
         camera = CLNUIDevice.CreateCamera(devSerial);
     }
     if (comboFEED.SelectedIndex == 0)
     {
         colorImage    = new NUIImage(640, 480);
         feed.Source   = colorImage.BitmapSource;
         running       = true;
         captureThread = new Thread(delegate()
         {
             CLNUIDevice.StartCamera(camera);
             while (running)
             {
                 CLNUIDevice.GetCameraColorFrameRGB32(camera, colorImage.ImageData, 500);
                 Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action) delegate()
                 {
                     colorImage.Invalidate();
                 });
             }
             CLNUIDevice.StopCamera(camera);
         });
         captureThread.IsBackground = true;
         captureThread.Start();
     }
     else
     {
         colorImage    = new NUIImage(640, 480);
         feed.Source   = colorImage.BitmapSource;
         running       = true;
         captureThread = new Thread(delegate()
         {
             CLNUIDevice.StartCamera(camera);
             while (running)
             {
                 CLNUIDevice.GetCameraDepthFrameRGB32(camera, colorImage.ImageData, 500);
                 Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action) delegate()
                 {
                     colorImage.Invalidate();
                 });
             }
             CLNUIDevice.StopCamera(camera);
         });
         captureThread.IsBackground = true;
         captureThread.Start();
     }
 }
All Usage Examples Of CLNUIDeviceTest.CLNUIDevice::GetCameraDepthFrameRGB32