Tracking.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using OpenCVForUnity.VideoModule;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Runtime.InteropServices;
  7. namespace OpenCVForUnity.TrackingModule
  8. {
  9. // C++: class Tracking
  10. public class Tracking
  11. {
  12. // C++: enum <unnamed>
  13. public const int TrackerContribSamplerCSC_MODE_INIT_POS = 1;
  14. public const int TrackerContribSamplerCSC_MODE_INIT_NEG = 2;
  15. public const int TrackerContribSamplerCSC_MODE_TRACK_POS = 3;
  16. public const int TrackerContribSamplerCSC_MODE_TRACK_NEG = 4;
  17. public const int TrackerContribSamplerCSC_MODE_DETECT = 5;
  18. public const int TrackerSamplerCS_MODE_POSITIVE = 1;
  19. public const int TrackerSamplerCS_MODE_NEGATIVE = 2;
  20. public const int TrackerSamplerCS_MODE_CLASSIFY = 3;
  21. // C++: enum cv.detail.CvFeatureParams.FeatureType
  22. public const int CvFeatureParams_HAAR = 0;
  23. public const int CvFeatureParams_LBP = 1;
  24. public const int CvFeatureParams_HOG = 2;
  25. //
  26. // C++: Ptr_Tracker cv::legacy::upgradeTrackingAPI(Ptr_legacy_Tracker legacy_tracker)
  27. //
  28. public static Tracker legacy_upgradeTrackingAPI(legacy_Tracker legacy_tracker)
  29. {
  30. if (legacy_tracker != null) legacy_tracker.ThrowIfDisposed();
  31. return Tracker.__fromPtr__(DisposableObject.ThrowIfNullIntPtr(tracking_Tracking_legacy_1upgradeTrackingAPI_10(legacy_tracker.getNativeObjAddr())));
  32. }
  33. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  34. const string LIBNAME = "__Internal";
  35. #else
  36. const string LIBNAME = "opencvforunity";
  37. #endif
  38. // C++: Ptr_Tracker cv::legacy::upgradeTrackingAPI(Ptr_legacy_Tracker legacy_tracker)
  39. [DllImport(LIBNAME)]
  40. private static extern IntPtr tracking_Tracking_legacy_1upgradeTrackingAPI_10(IntPtr legacy_tracker_nativeObj);
  41. }
  42. }