123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
-
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.XimgprocModule
- {
-
-
- public class StructuredEdgeDetection : Algorithm
- {
- protected override void Dispose (bool disposing)
- {
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
- try {
- if (disposing) {
- }
- if (IsEnabledDispose) {
- if (nativeObj != IntPtr.Zero)
- ximgproc_StructuredEdgeDetection_delete(nativeObj);
- nativeObj = IntPtr.Zero;
- }
- } finally {
- base.Dispose (disposing);
- }
- #else
- return;
- #endif
- }
- protected internal StructuredEdgeDetection (IntPtr addr) : base (addr) { }
-
- public static new StructuredEdgeDetection __fromPtr__ (IntPtr addr) { return new StructuredEdgeDetection (addr); }
-
-
-
-
- public void computeOrientation (Mat _src, Mat _dst)
- {
- ThrowIfDisposed ();
- if (_src != null) _src.ThrowIfDisposed ();
- if (_dst != null) _dst.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ximgproc_StructuredEdgeDetection_computeOrientation_10(nativeObj, _src.nativeObj, _dst.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
-
-
-
-
- public void detectEdges (Mat _src, Mat _dst)
- {
- ThrowIfDisposed ();
- if (_src != null) _src.ThrowIfDisposed ();
- if (_dst != null) _dst.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ximgproc_StructuredEdgeDetection_detectEdges_10(nativeObj, _src.nativeObj, _dst.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
-
-
-
-
- public void edgesNms (Mat edge_image, Mat orientation_image, Mat _dst, int r, int s, float m, bool isParallel)
- {
- ThrowIfDisposed ();
- if (edge_image != null) edge_image.ThrowIfDisposed ();
- if (orientation_image != null) orientation_image.ThrowIfDisposed ();
- if (_dst != null) _dst.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ximgproc_StructuredEdgeDetection_edgesNms_10(nativeObj, edge_image.nativeObj, orientation_image.nativeObj, _dst.nativeObj, r, s, m, isParallel);
-
- return;
- #else
- return;
- #endif
- }
-
- public void edgesNms (Mat edge_image, Mat orientation_image, Mat _dst, int r, int s, float m)
- {
- ThrowIfDisposed ();
- if (edge_image != null) edge_image.ThrowIfDisposed ();
- if (orientation_image != null) orientation_image.ThrowIfDisposed ();
- if (_dst != null) _dst.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ximgproc_StructuredEdgeDetection_edgesNms_11(nativeObj, edge_image.nativeObj, orientation_image.nativeObj, _dst.nativeObj, r, s, m);
-
- return;
- #else
- return;
- #endif
- }
-
- public void edgesNms (Mat edge_image, Mat orientation_image, Mat _dst, int r, int s)
- {
- ThrowIfDisposed ();
- if (edge_image != null) edge_image.ThrowIfDisposed ();
- if (orientation_image != null) orientation_image.ThrowIfDisposed ();
- if (_dst != null) _dst.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ximgproc_StructuredEdgeDetection_edgesNms_12(nativeObj, edge_image.nativeObj, orientation_image.nativeObj, _dst.nativeObj, r, s);
-
- return;
- #else
- return;
- #endif
- }
-
- public void edgesNms (Mat edge_image, Mat orientation_image, Mat _dst, int r)
- {
- ThrowIfDisposed ();
- if (edge_image != null) edge_image.ThrowIfDisposed ();
- if (orientation_image != null) orientation_image.ThrowIfDisposed ();
- if (_dst != null) _dst.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ximgproc_StructuredEdgeDetection_edgesNms_13(nativeObj, edge_image.nativeObj, orientation_image.nativeObj, _dst.nativeObj, r);
-
- return;
- #else
- return;
- #endif
- }
-
- public void edgesNms (Mat edge_image, Mat orientation_image, Mat _dst)
- {
- ThrowIfDisposed ();
- if (edge_image != null) edge_image.ThrowIfDisposed ();
- if (orientation_image != null) orientation_image.ThrowIfDisposed ();
- if (_dst != null) _dst.ThrowIfDisposed ();
- #if ((UNITY_ANDROID || UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR) || UNITY_5 || UNITY_5_3_OR_NEWER
-
- ximgproc_StructuredEdgeDetection_edgesNms_14(nativeObj, edge_image.nativeObj, orientation_image.nativeObj, _dst.nativeObj);
-
- return;
- #else
- return;
- #endif
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
-
- [DllImport (LIBNAME)]
- private static extern void ximgproc_StructuredEdgeDetection_computeOrientation_10 (IntPtr nativeObj, IntPtr _src_nativeObj, IntPtr _dst_nativeObj);
-
- [DllImport (LIBNAME)]
- private static extern void ximgproc_StructuredEdgeDetection_detectEdges_10 (IntPtr nativeObj, IntPtr _src_nativeObj, IntPtr _dst_nativeObj);
-
- [DllImport (LIBNAME)]
- private static extern void ximgproc_StructuredEdgeDetection_edgesNms_10 (IntPtr nativeObj, IntPtr edge_image_nativeObj, IntPtr orientation_image_nativeObj, IntPtr _dst_nativeObj, int r, int s, float m, bool isParallel);
- [DllImport (LIBNAME)]
- private static extern void ximgproc_StructuredEdgeDetection_edgesNms_11 (IntPtr nativeObj, IntPtr edge_image_nativeObj, IntPtr orientation_image_nativeObj, IntPtr _dst_nativeObj, int r, int s, float m);
- [DllImport (LIBNAME)]
- private static extern void ximgproc_StructuredEdgeDetection_edgesNms_12 (IntPtr nativeObj, IntPtr edge_image_nativeObj, IntPtr orientation_image_nativeObj, IntPtr _dst_nativeObj, int r, int s);
- [DllImport (LIBNAME)]
- private static extern void ximgproc_StructuredEdgeDetection_edgesNms_13 (IntPtr nativeObj, IntPtr edge_image_nativeObj, IntPtr orientation_image_nativeObj, IntPtr _dst_nativeObj, int r);
- [DllImport (LIBNAME)]
- private static extern void ximgproc_StructuredEdgeDetection_edgesNms_14 (IntPtr nativeObj, IntPtr edge_image_nativeObj, IntPtr orientation_image_nativeObj, IntPtr _dst_nativeObj);
-
- [DllImport (LIBNAME)]
- private static extern void ximgproc_StructuredEdgeDetection_delete (IntPtr nativeObj);
- }
- }
|