QRCodeDetectorAruco.cs 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. using OpenCVForUnity.CoreModule;
  2. using OpenCVForUnity.UtilsModule;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Runtime.InteropServices;
  6. namespace OpenCVForUnity.ObjdetectModule
  7. {
  8. // C++: class QRCodeDetectorAruco
  9. public class QRCodeDetectorAruco : GraphicalCodeDetector
  10. {
  11. protected override void Dispose(bool disposing)
  12. {
  13. try
  14. {
  15. if (disposing)
  16. {
  17. }
  18. if (IsEnabledDispose)
  19. {
  20. if (nativeObj != IntPtr.Zero)
  21. objdetect_QRCodeDetectorAruco_delete(nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. }
  25. finally
  26. {
  27. base.Dispose(disposing);
  28. }
  29. }
  30. protected internal QRCodeDetectorAruco(IntPtr addr) : base(addr) { }
  31. // internal usage only
  32. public static new QRCodeDetectorAruco __fromPtr__(IntPtr addr) { return new QRCodeDetectorAruco(addr); }
  33. //
  34. // C++: cv::QRCodeDetectorAruco::QRCodeDetectorAruco()
  35. //
  36. public QRCodeDetectorAruco() :
  37. base(DisposableObject.ThrowIfNullIntPtr(objdetect_QRCodeDetectorAruco_QRCodeDetectorAruco_10()))
  38. {
  39. }
  40. //
  41. // C++: cv::QRCodeDetectorAruco::QRCodeDetectorAruco(QRCodeDetectorAruco_Params _params)
  42. //
  43. /**
  44. * QR code detector constructor for Aruco-based algorithm. See cv::QRCodeDetectorAruco::Params
  45. * param _params automatically generated
  46. */
  47. public QRCodeDetectorAruco(QRCodeDetectorAruco_Params _params) :
  48. base(DisposableObject.ThrowIfNullIntPtr(objdetect_QRCodeDetectorAruco_QRCodeDetectorAruco_11(_params.nativeObj)))
  49. {
  50. }
  51. //
  52. // C++: QRCodeDetectorAruco_Params cv::QRCodeDetectorAruco::getDetectorParameters()
  53. //
  54. /**
  55. * Detector parameters getter. See cv::QRCodeDetectorAruco::Params
  56. * return automatically generated
  57. */
  58. public QRCodeDetectorAruco_Params getDetectorParameters()
  59. {
  60. ThrowIfDisposed();
  61. return new QRCodeDetectorAruco_Params(DisposableObject.ThrowIfNullIntPtr(objdetect_QRCodeDetectorAruco_getDetectorParameters_10(nativeObj)));
  62. }
  63. //
  64. // C++: QRCodeDetectorAruco cv::QRCodeDetectorAruco::setDetectorParameters(QRCodeDetectorAruco_Params _params)
  65. //
  66. /**
  67. * Detector parameters setter. See cv::QRCodeDetectorAruco::Params
  68. * param _params automatically generated
  69. * return automatically generated
  70. */
  71. public QRCodeDetectorAruco setDetectorParameters(QRCodeDetectorAruco_Params _params)
  72. {
  73. ThrowIfDisposed();
  74. if (_params != null) _params.ThrowIfDisposed();
  75. return new QRCodeDetectorAruco(DisposableObject.ThrowIfNullIntPtr(objdetect_QRCodeDetectorAruco_setDetectorParameters_10(nativeObj, _params.nativeObj)));
  76. }
  77. //
  78. // C++: aruco_DetectorParameters cv::QRCodeDetectorAruco::getArucoParameters()
  79. //
  80. // Return type 'aruco_DetectorParameters' is not supported, skipping the function
  81. //
  82. // C++: void cv::QRCodeDetectorAruco::setArucoParameters(aruco_DetectorParameters _params)
  83. //
  84. // Unknown type 'aruco_DetectorParameters' (I), skipping the function
  85. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  86. const string LIBNAME = "__Internal";
  87. #else
  88. const string LIBNAME = "opencvforunity";
  89. #endif
  90. // C++: cv::QRCodeDetectorAruco::QRCodeDetectorAruco()
  91. [DllImport(LIBNAME)]
  92. private static extern IntPtr objdetect_QRCodeDetectorAruco_QRCodeDetectorAruco_10();
  93. // C++: cv::QRCodeDetectorAruco::QRCodeDetectorAruco(QRCodeDetectorAruco_Params _params)
  94. [DllImport(LIBNAME)]
  95. private static extern IntPtr objdetect_QRCodeDetectorAruco_QRCodeDetectorAruco_11(IntPtr _params_nativeObj);
  96. // C++: QRCodeDetectorAruco_Params cv::QRCodeDetectorAruco::getDetectorParameters()
  97. [DllImport(LIBNAME)]
  98. private static extern IntPtr objdetect_QRCodeDetectorAruco_getDetectorParameters_10(IntPtr nativeObj);
  99. // C++: QRCodeDetectorAruco cv::QRCodeDetectorAruco::setDetectorParameters(QRCodeDetectorAruco_Params _params)
  100. [DllImport(LIBNAME)]
  101. private static extern IntPtr objdetect_QRCodeDetectorAruco_setDetectorParameters_10(IntPtr nativeObj, IntPtr _params_nativeObj);
  102. // native support for java finalize()
  103. [DllImport(LIBNAME)]
  104. private static extern void objdetect_QRCodeDetectorAruco_delete(IntPtr nativeObj);
  105. }
  106. }