FacemarkAAM.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. 
  2. using OpenCVForUnity.CoreModule;
  3. using OpenCVForUnity.UtilsModule;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Runtime.InteropServices;
  7. namespace OpenCVForUnity.FaceModule {
  8. // C++: class FacemarkAAM
  9. //javadoc: FacemarkAAM
  10. public class FacemarkAAM : FacemarkTrain {
  11. protected override void Dispose(bool disposing) {
  12. #if (UNITY_ANDROID && !UNITY_EDITOR)
  13. try {
  14. if (disposing) {
  15. }
  16. if (IsEnabledDispose) {
  17. if (nativeObj != IntPtr.Zero)
  18. face_FacemarkAAM_delete(nativeObj);
  19. nativeObj = IntPtr.Zero;
  20. }
  21. } finally {
  22. base.Dispose(disposing);
  23. }
  24. #else
  25. return;
  26. #endif
  27. }
  28. protected internal FacemarkAAM(IntPtr addr) : base(addr) { }
  29. // internal usage only
  30. public static new FacemarkAAM __fromPtr__(IntPtr addr) { return new FacemarkAAM(addr); }
  31. #if (UNITY_ANDROID && !UNITY_EDITOR)
  32. const string LIBNAME = "opencvforunity";
  33. // native support for java finalize()
  34. [DllImport(LIBNAME)]
  35. private static extern void face_FacemarkAAM_delete(IntPtr nativeObj);
  36. #endif
  37. }
  38. }