Beispiel #1
0
 /// <summary>
 /// Release the unmanaged memory associated with this object
 /// </summary>
 protected override void DisposeObject()
 {
     if (_sharedPtr != IntPtr.Zero)
     {
         RapidInvoke.cveRapidRelease(ref _sharedPtr);
         _ptr          = IntPtr.Zero;
         _algorithmPtr = IntPtr.Zero;
         _trackerPtr   = IntPtr.Zero;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Create a new instance of OLS tracker
 /// </summary>
 /// <param name="pts3d">The 3D points of the mesh</param>
 /// <param name="tris">Triangle face connectivity</param>
 /// <param name="histBins">Number of histogram bins</param>
 /// <param name="sobelThresh">Sobel threshold</param>
 public OLSTracker(IInputArray pts3d, IInputArray tris, int histBins = 8, Byte sobelThresh = (byte)10)
 {
     using (InputArray iaPts3d = pts3d.GetInputArray())
         using (InputArray iaTris = tris.GetInputArray())
             _ptr = RapidInvoke.cveOLSTrackerCreate(iaPts3d, iaTris, histBins, sobelThresh, ref _trackerPtr, ref _algorithmPtr, ref _sharedPtr);
 }
Beispiel #3
0
 /// <summary>
 /// Create a new instance of Rapid tracker
 /// </summary>
 /// <param name="pts3d">The 3D points of the mesh</param>
 /// <param name="tris">Triangle face connectivity</param>
 public Rapid(IInputArray pts3d, IInputArray tris)
 {
     using (InputArray iaPts3d = pts3d.GetInputArray())
         using (InputArray iaTris = tris.GetInputArray())
             _ptr = RapidInvoke.cveRapidCreate(iaPts3d, iaTris, ref _trackerPtr, ref _algorithmPtr, ref _sharedPtr);
 }