MapperGradProj.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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.RegModule
  8. {
  9. // C++: class MapperGradProj
  10. //javadoc: MapperGradProj
  11. public class MapperGradProj : Mapper
  12. {
  13. protected override void Dispose (bool disposing)
  14. {
  15. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  16. try {
  17. if (disposing) {
  18. }
  19. if (IsEnabledDispose) {
  20. if (nativeObj != IntPtr.Zero)
  21. reg_MapperGradProj_delete (nativeObj);
  22. nativeObj = IntPtr.Zero;
  23. }
  24. } finally {
  25. base.Dispose (disposing);
  26. }
  27. #else
  28. return;
  29. #endif
  30. }
  31. protected internal MapperGradProj (IntPtr addr)
  32. : base (addr)
  33. {
  34. }
  35. // internal usage only
  36. public static new MapperGradProj __fromPtr__ (IntPtr addr)
  37. {
  38. return new MapperGradProj (addr);
  39. }
  40. //
  41. // C++: cv::reg::MapperGradProj::MapperGradProj()
  42. //
  43. //javadoc: MapperGradProj::MapperGradProj()
  44. public MapperGradProj () :
  45. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  46. base (reg_MapperGradProj_MapperGradProj_10 ())
  47. #else
  48. base (IntPtr.Zero)
  49. #endif
  50. {
  51. return;
  52. }
  53. //
  54. // C++: Ptr_Map cv::reg::MapperGradProj::calculate(Mat img1, Mat img2, Ptr_Map init = cv::Ptr<Map>())
  55. //
  56. //javadoc: MapperGradProj::calculate(img1, img2, init)
  57. public override Map calculate (Mat img1, Mat img2, Map init)
  58. {
  59. ThrowIfDisposed ();
  60. if (img1 != null)
  61. img1.ThrowIfDisposed ();
  62. if (img2 != null)
  63. img2.ThrowIfDisposed ();
  64. if (init != null)
  65. init.ThrowIfDisposed ();
  66. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  67. Map retVal = Map.__fromPtr__ (reg_MapperGradProj_calculate_10 (nativeObj, img1.nativeObj, img2.nativeObj, init.getNativeObjAddr ()));
  68. return retVal;
  69. #else
  70. return null;
  71. #endif
  72. }
  73. //javadoc: MapperGradProj::calculate(img1, img2)
  74. public override Map calculate (Mat img1, Mat img2)
  75. {
  76. ThrowIfDisposed ();
  77. if (img1 != null)
  78. img1.ThrowIfDisposed ();
  79. if (img2 != null)
  80. img2.ThrowIfDisposed ();
  81. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  82. Map retVal = Map.__fromPtr__ (reg_MapperGradProj_calculate_11 (nativeObj, img1.nativeObj, img2.nativeObj));
  83. return retVal;
  84. #else
  85. return null;
  86. #endif
  87. }
  88. //
  89. // C++: Ptr_Map cv::reg::MapperGradProj::getMap()
  90. //
  91. //javadoc: MapperGradProj::getMap()
  92. public override Map getMap ()
  93. {
  94. ThrowIfDisposed ();
  95. #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
  96. Map retVal = Map.__fromPtr__ (reg_MapperGradProj_getMap_10 (nativeObj));
  97. return retVal;
  98. #else
  99. return null;
  100. #endif
  101. }
  102. #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
  103. const string LIBNAME = "__Internal";
  104. #else
  105. const string LIBNAME = "opencvforunity";
  106. #endif
  107. // C++: cv::reg::MapperGradProj::MapperGradProj()
  108. [DllImport (LIBNAME)]
  109. private static extern IntPtr reg_MapperGradProj_MapperGradProj_10 ();
  110. // C++: Ptr_Map cv::reg::MapperGradProj::calculate(Mat img1, Mat img2, Ptr_Map init = cv::Ptr<Map>())
  111. [DllImport (LIBNAME)]
  112. private static extern IntPtr reg_MapperGradProj_calculate_10 (IntPtr nativeObj, IntPtr img1_nativeObj, IntPtr img2_nativeObj, IntPtr init_nativeObj);
  113. [DllImport (LIBNAME)]
  114. private static extern IntPtr reg_MapperGradProj_calculate_11 (IntPtr nativeObj, IntPtr img1_nativeObj, IntPtr img2_nativeObj);
  115. // C++: Ptr_Map cv::reg::MapperGradProj::getMap()
  116. [DllImport (LIBNAME)]
  117. private static extern IntPtr reg_MapperGradProj_getMap_10 (IntPtr nativeObj);
  118. // native support for java finalize()
  119. [DllImport (LIBNAME)]
  120. private static extern void reg_MapperGradProj_delete (IntPtr nativeObj);
  121. }
  122. }