protected override void OnMainFormClosed(object sender, EventArgs e) { base.OnMainFormClosed(sender, e); thread.Abort(); thread.Join(); manager.Close(); manager.Dispose(); session.Dispose(); }
/// <summary> 終了処理 </summary> private void Uninitialize() { if (senseManager != null) { senseManager.Dispose(); senseManager = null; } if (projection != null) { projection.Dispose(); projection = null; } if (handData != null) { handData.Dispose(); handData = null; } if (handAnalyzer != null) { handAnalyzer.Dispose(); handAnalyzer = null; } if (config != null) { config.UnsubscribeGesture(OnFiredGesture); config.Dispose(); } }
private void Uninitialize() { if (senseManager != null) { senseManager.Dispose(); senseManager = null; } if (projection != null) { projection.Dispose(); projection = null; } if (handData != null) { handData.Dispose(); handData = null; } if (handAnalyzer != null) { handAnalyzer.Dispose(); handAnalyzer = null; } }
//Close any ongoing Session void OnDisable() { if (smoother3D != null) { for (int i = 0; i < MaxHands; i++) { if (smoother3D[i] != null) { for (int j = 0; j < MaxJoints; j++) { smoother3D[i][j].Dispose(); smoother3D[i][j] = null; } } } smoother3D = null; } if (smoother != null) { smoother.Dispose(); smoother = null; } if (sm != null) { sm.Close(); sm.Dispose(); sm = null; } }
private void StopRealSense() { Console.WriteLine("Disposing SenseManager and Touchless Controller"); ptc.Dispose(); psm.Close(); psm.Dispose(); }
private void Uninitialize() { if (senseManager != null) { senseManager.Dispose(); senseManager = null; } if (handConfig != null) { handConfig.Dispose(); handConfig = null; } if (handData != null) { handData.Dispose(); handData = null; } if (handAnalyzer != null) { handAnalyzer.Dispose(); handAnalyzer = null; } }
private void Uninitialize() { if (senseManager != null) { senseManager.Dispose(); senseManager = null; } }
void OnDisable() { if (psm == null) { return; } psm.Dispose(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { update.Abort(); personData.Dispose(); personModule.Dispose(); faceData.Dispose(); blobData.Dispose(); sm.Dispose(); }
public void Dispose() { if (!_useDSAPI) { _senseManager.Close(); _senseManager.Dispose(); _senseManager = null; } }
/// <summary> /// Unity function that is called when the behaviour becomes disabled () or inactive. /// Used for clean-up in the end /// </summary> void OnDisable() { faceAnalyzer.Dispose(); if (psm == null) { return; } psm.Dispose(); }
private void ReleaseResources() { // Stop the worker thread processingThread.Abort(); // Release resources faceData.Dispose(); senseManager.Dispose(); }
/** * Exit Application */ private void Quit(object sender, FormClosedEventArgs e) { updaterThread.Abort(); Console.WriteLine("Cleaning"); session.Dispose(); senseManager.Dispose(); Console.WriteLine("Closing"); Application.Exit(); }
private void Window_Closed(object sender, EventArgs e) { if (TaskCancellationTokenSource != null) { TaskCancellationTokenSource.Cancel(); } SenseManager.Close(); SenseManager.Dispose(); }
/// <summary> /// Stops to stop the camera. /// </summary> public void Stop() { if (_sm != null) { _sm.Close(); _sm.Dispose(); _sm = null; } }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { processingThread.Abort(); if (handData != null) { handData.Dispose(); } handConfig.Dispose(); senseManager.Dispose(); }
private void ShutDown() { // Stop the Update thread update.Abort(); // Dispose RealSense objects faceData.Dispose(); senseManager.Dispose(); session.Dispose(); }
private void DestroyRealSense() { processingThread.Abort(); if (faceData != null) { faceData.Dispose(); } faceConfig.Dispose(); senseManager.Dispose(); }
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Behaviour.run = false; update.Abort(); personData.Dispose(); personModule.Dispose(); faceData.Dispose(); sm.Dispose(); IRobotCreate.SetDrive(0, 0); //To Stop iRobot }
void DisableRealSense() { Debug.Log("Disabling RealSense"); if (senseManager != null) { senseManager.Close(); senseManager.Dispose(); senseManager = null; } }
void OnDisable() { //Disposses all modules Initialized = false; if (SenseManager == null) { return; } if (FaceModuleOutput != null) { FaceModuleOutput.Dispose(); FaceModuleOutput = null; } if (HandDataOutput != null) { SenseManager.PauseHand(true); HandDataOutput.Dispose(); HandDataOutput = null; } if (ImageRgbOutput != null) { ImageRgbOutput.Dispose(); ImageRgbOutput = null; } if (ImageDepthOutput != null) { ImageDepthOutput.Dispose(); ImageDepthOutput = null; } if (ImageIROutput != null) { ImageIROutput.Dispose(); ImageIROutput = null; } if (_projection != null) { _projection.Dispose(); _projection = null; } UvMap = null; PointCloud = null; SenseManager.Dispose(); SenseManager = null; }
private void ReleaseResources() { speechRecognition.StopRec(); speechRecognition.Dispose(); audioSource.Dispose(); session.Dispose(); // Stop the worker thread processingThread.Abort(); // Release resources faceData.Dispose(); senseManager.Dispose(); }
private void Uninitialize() { if (senseManager != null) { senseManager.Dispose(); senseManager = null; } if (segmentation != null) { segmentation.Dispose(); segmentation = null; } }
private void OnDisable() { if (m_ShutDown != null) { m_ShutDown(); } if (m_senseManager != null) { m_senseManager.Close(); m_senseManager.Dispose(); m_senseManager = null; } }
private void Uninitialize() { if (senseManager != null) { senseManager.Dispose(); senseManager = null; } if (synthesis != null) { synthesis.Dispose(); synthesis = null; } }
protected override void OnClosed(EventArgs e) { base.OnClosed(e); if (_cancellationTokenSource != null) { _cancellationTokenSource.Cancel(); } if (_task != null) { _task.Wait(); } _handConfig.Dispose(); _senseManager.Dispose(); }
void OnDisable() { if (handConfig != null) { handConfig.Dispose(); } if (handData != null) { handData.Dispose(); } if (psm != null) { psm.Dispose(); } }
private void WriteSummary() { string filename = output_folder + "\\summary2.csv"; string header = "Record" + ";" + "Video Index" + ";" + "Total Frames" + "\n"; string summary = null; int nframes = 0; //PXCMSizeI32 sizeColor; // Recording mode: true, Playback mode: false // Settings for playback mode (read rssdk files and extract frames) File.WriteAllText(filename, header); foreach (var dir in dirs) { if (Directory.EnumerateFileSystemEntries(dir).Any()) { List <string> fileList = new List <string>(Directory.GetFiles(dir, "*.rssdk")); //fileList.OrderBy(item => int.Parse(item)); Dispatcher.BeginInvoke(new Action(() => { summaryLabel.Content = "Generating Summary..."; textBox3.Text = dir.Split('\\').Last(); })); foreach (var input_file in fileList) { sm = PXCMSenseManager.CreateInstance(); sm.captureManager.SetFileName(input_file, false); //sm.captureManager.SetRealtime(false); nframes = sm.captureManager.QueryNumberOfFrames(); //sizeColor = sm.captureManager.QueryImageSize(PXCMCapture.StreamType.STREAM_TYPE_COLOR); summary += dir + ";" + input_file + ";" + nframes + '\n'; sm.Dispose(); } using (System.IO.StreamWriter fs = File.AppendText(filename)) { fs.Write(summary); summary = null; } } } Dispatcher.BeginInvoke(new Action(() => { summaryLabel.Content = "Summary Generated"; })); }
private void Uninitialize() { if (senseManager != null) { senseManager.Dispose(); senseManager = null; } if (blobModule != null) { blobModule.Dispose(); blobModule = null; } if (blobData != null) { blobData.Dispose(); blobData = null; } }
/// <summary> /// OnDisable - Make sure to release all SDK instances and alocated memory to avoid read access error /// </summary> void OnDisable() { if (m_blob != null) { m_blob.Dispose(); m_blob = null; } if (m_contour != null) { m_contour.Dispose(); m_contour = null; } if (sm != null) { sm.Close(); sm.Dispose(); sm = null; } }
// system check private void JSButton_Click(object sender, RoutedEventArgs e) { bool passSysCheck = false; //check internet connection if (IsConnectedToInternet()) { passSysCheck = true; } else { Popwind_ShowInfo("Check Internet Connection"); return; } if (passSysCheck) { // init the sense manager _senseManager = PXCMSenseManager.CreateInstance(); _senseManager.EnableTouchlessController(); // init the pipeline if (_senseManager.Init() < pxcmStatus.PXCM_STATUS_NO_ERROR) { passSysCheck = false; } if (_senseManager != null) { _senseManager.Dispose(); } } if (passSysCheck) { STButton.IsEnabled = true; Popwind_ShowInfo("Everything is good"); } else { Popwind_ShowInfo("Check the RealSense Camera"); } }