Example #1
0
        private void CleanAHM()
        {
            lock (mutex)
            {
                if (_AHMBackFeature != null)
                {
                    CvImageWrapper.ReleaseImage(_AHMBackFeature);
                    _AHMBackFeature = null;
                }

                if (_AHMCurFeature != null)
                {
                    CvImageWrapper.ReleaseImage(_AHMCurFeature);
                    _AHMCurFeature = null;
                }

                if (_AHMRealtimeObs != null)
                {
                    CvImageWrapper.ReleaseImage(_AHMRealtimeObs);
                    _AHMRealtimeObs = null;
                }

                if (cameraMouseAssists != null)
                {
                    for (int i = 0; i < NumberOfTrackingPoints; i++)
                    {
                        if (cameraMouseAssists[i] != null)
                        {
                            cameraMouseAssists[i].Dispose();
                            cameraMouseAssists[i] = null;
                        }
                    }
                }

                if (ahmSetup != null)
                {
                    ahmSetup.Clean();
                    ahmSetup = null;
                }
            }
        }