GeneralizedHoughBallard.cs 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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.ImgprocModule {
  8. // C++: class GeneralizedHoughBallard
  9. //javadoc: GeneralizedHoughBallard
  10. public class GeneralizedHoughBallard : GeneralizedHough {
  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. imgproc_GeneralizedHoughBallard_delete(nativeObj);
  19. nativeObj = IntPtr.Zero;
  20. }
  21. } finally {
  22. base.Dispose(disposing);
  23. }
  24. #else
  25. return;
  26. #endif
  27. }
  28. protected internal GeneralizedHoughBallard(IntPtr addr) : base(addr) { }
  29. // internal usage only
  30. public static new GeneralizedHoughBallard __fromPtr__(IntPtr addr) { return new GeneralizedHoughBallard(addr); }
  31. //
  32. // C++: int cv::GeneralizedHoughBallard::getLevels()
  33. //
  34. //javadoc: GeneralizedHoughBallard::getLevels()
  35. public int getLevels() {
  36. ThrowIfDisposed();
  37. #if (UNITY_ANDROID && !UNITY_EDITOR)
  38. int retVal = imgproc_GeneralizedHoughBallard_getLevels_10(nativeObj);
  39. return retVal;
  40. #else
  41. return -1;
  42. #endif
  43. }
  44. //
  45. // C++: int cv::GeneralizedHoughBallard::getVotesThreshold()
  46. //
  47. //javadoc: GeneralizedHoughBallard::getVotesThreshold()
  48. public int getVotesThreshold() {
  49. ThrowIfDisposed();
  50. #if (UNITY_ANDROID && !UNITY_EDITOR)
  51. int retVal = imgproc_GeneralizedHoughBallard_getVotesThreshold_10(nativeObj);
  52. return retVal;
  53. #else
  54. return -1;
  55. #endif
  56. }
  57. //
  58. // C++: void cv::GeneralizedHoughBallard::setLevels(int levels)
  59. //
  60. //javadoc: GeneralizedHoughBallard::setLevels(levels)
  61. public void setLevels(int levels) {
  62. ThrowIfDisposed();
  63. #if (UNITY_ANDROID && !UNITY_EDITOR)
  64. imgproc_GeneralizedHoughBallard_setLevels_10(nativeObj, levels);
  65. return;
  66. #else
  67. return;
  68. #endif
  69. }
  70. //
  71. // C++: void cv::GeneralizedHoughBallard::setVotesThreshold(int votesThreshold)
  72. //
  73. //javadoc: GeneralizedHoughBallard::setVotesThreshold(votesThreshold)
  74. public void setVotesThreshold(int votesThreshold) {
  75. ThrowIfDisposed();
  76. #if (UNITY_ANDROID && !UNITY_EDITOR)
  77. imgproc_GeneralizedHoughBallard_setVotesThreshold_10(nativeObj, votesThreshold);
  78. return;
  79. #else
  80. return;
  81. #endif
  82. }
  83. #if (UNITY_ANDROID && !UNITY_EDITOR)
  84. const string LIBNAME = "opencvforunity";
  85. // C++: int cv::GeneralizedHoughBallard::getLevels()
  86. [DllImport(LIBNAME)]
  87. private static extern int imgproc_GeneralizedHoughBallard_getLevels_10(IntPtr nativeObj);
  88. // C++: int cv::GeneralizedHoughBallard::getVotesThreshold()
  89. [DllImport(LIBNAME)]
  90. private static extern int imgproc_GeneralizedHoughBallard_getVotesThreshold_10(IntPtr nativeObj);
  91. // C++: void cv::GeneralizedHoughBallard::setLevels(int levels)
  92. [DllImport(LIBNAME)]
  93. private static extern void imgproc_GeneralizedHoughBallard_setLevels_10(IntPtr nativeObj, int levels);
  94. // C++: void cv::GeneralizedHoughBallard::setVotesThreshold(int votesThreshold)
  95. [DllImport(LIBNAME)]
  96. private static extern void imgproc_GeneralizedHoughBallard_setVotesThreshold_10(IntPtr nativeObj, int votesThreshold);
  97. // native support for java finalize()
  98. [DllImport(LIBNAME)]
  99. private static extern void imgproc_GeneralizedHoughBallard_delete(IntPtr nativeObj);
  100. #endif
  101. }
  102. }