MapperGradShift.cs 4.1 KB

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