public override IntPtr Get() { return(NativeMethods.features2d_Ptr_KAZE_get(ptr)); }
/// <summary> /// /// </summary> /// <param name="state"></param> public RNG(ulong state) { State = NativeMethods.core_RNG_new(state); }
/// <summary> /// Releases unmanaged resources /// </summary> protected override void DisposeUnmanaged() { NativeMethods.HandleException( NativeMethods.imgproc_LineIterator_delete(ptr)); base.DisposeUnmanaged(); }
/// <summary> /// returns uniformly distributed floating-point random number from [a,b) range /// </summary> /// <param name="a"></param> /// <param name="b"></param> /// <returns></returns> public float Uniform(float a, float b) { return(NativeMethods.core_RNG_uniform(State, a, b)); }
/// <summary> /// /// </summary> public RNG() { State = NativeMethods.core_RNG_new(); }
/// <summary> /// Releases unmanaged resources /// </summary> protected override void DisposeUnmanaged() { NativeMethods.vector_DMatch_delete(ptr); base.DisposeUnmanaged(); }
/// <summary> /// /// </summary> /// <returns></returns> public uint Run() { return(NativeMethods.core_RNG_operatorThis(State)); }
/// <summary> /// /// </summary> /// <param name="pt"></param> /// <param name="edge"></param> /// <param name="vertex"></param> /// <returns></returns> public int Locate(Point2f pt, out int edge, out int vertex) { if (disposed) throw new ObjectDisposedException("Subdiv2D", ""); return NativeMethods.imgproc_Subdiv2D_locate(ptr, pt, out edge, out vertex); }
/// <summary> /// /// </summary> /// <param name="pt"></param> /// <param name="nearestPt"></param> /// <returns></returns> public int FindNearest(Point2f pt, out Point2f nearestPt) { if (disposed) throw new ObjectDisposedException("Subdiv2D", ""); return NativeMethods.imgproc_Subdiv2D_findNearest(ptr, pt, out nearestPt); }
/// <summary> /// /// </summary> /// <param name="rect"></param> public void InitDelaunay(Rect rect) { if(disposed) throw new ObjectDisposedException("Subdiv2D", ""); NativeMethods.imgproc_Subdiv2D_initDelaunay(ptr, rect); }
/// <summary> /// /// </summary> /// <param name="pt"></param> /// <returns></returns> public int Insert(Point2f pt) { if(disposed) throw new ObjectDisposedException("Subdiv2D", ""); return NativeMethods.imgproc_Subdiv2D_insert(ptr, pt); }
/// <summary> /// 空の疎行列として初期化 /// </summary> #else /// <summary> /// Creates empty SparseMat /// </summary> #endif public SparseMat() { NativeMethods.HandleException( NativeMethods.core_SparseMat_new1(out ptr)); }
/// <summary> /// Releases unmanaged resources /// </summary> protected override void DisposeUnmanaged() { NativeMethods.HandleException( NativeMethods.core_SparseMat_delete(ptr)); base.DisposeUnmanaged(); }
protected override void DisposeUnmanaged() { NativeMethods.features2d_Ptr_KAZE_delete(ptr); base.DisposeUnmanaged(); }
/// <summary> /// /// </summary> /// <param name="deviceId"></param> /// <returns></returns> public static FrameSource CreateFrameSource_Camera(int deviceId) { IntPtr ptr = NativeMethods.superres_createFrameSource_Camera(deviceId); return FrameSourceImpl.FromPtr(ptr); }
/// <summary> /// /// </summary> /// <param name="vertex"></param> /// <param name="firstEdge"></param> /// <returns></returns> public Point2f GetVertex(int vertex, out int firstEdge) { if (disposed) throw new ObjectDisposedException("Subdiv2D", ""); return NativeMethods.imgproc_Subdiv2D_getVertex(ptr, vertex, out firstEdge); }
/// <summary> /// /// </summary> public VectorOfDMatch() { ptr = NativeMethods.vector_DMatch_new1(); }
/// <summary> /// /// </summary> /// <param name="edge"></param> /// <param name="nextEdgeType"></param> /// <returns></returns> public int GetEdge(int edge, int nextEdgeType) { if (disposed) throw new ObjectDisposedException("Subdiv2D", ""); return NativeMethods.imgproc_Subdiv2D_getEdge(ptr, edge, nextEdgeType); }
/// <summary> /// updates the state and returns the next 32-bit unsigned integer random number /// </summary> /// <returns></returns> public uint Next() { return(NativeMethods.core_RNG_next(State)); }
/// <summary> /// /// </summary> /// <param name="edge"></param> /// <param name="rotate"></param> /// <returns></returns> public int RotateEdge(int edge, int rotate) { if (disposed) throw new ObjectDisposedException("Subdiv2D", ""); return NativeMethods.imgproc_Subdiv2D_rotateEdge(ptr, edge, rotate); }
/// <summary> /// returns uniformly distributed integer random number from [a,b) range /// </summary> /// <param name="a"></param> /// <param name="b"></param> /// <returns></returns> public int Uniform(int a, int b) { return(NativeMethods.core_RNG_uniform(State, a, b)); }
/// <summary> /// /// </summary> /// <param name="edge"></param> /// <returns></returns> public int SymEdge(int edge) { if (disposed) throw new ObjectDisposedException("Subdiv2D", ""); return NativeMethods.imgproc_Subdiv2D_symEdge(ptr, edge); }
/// <summary> /// returns uniformly distributed double-precision floating-point random number from [a,b) range /// </summary> /// <param name="a"></param> /// <param name="b"></param> /// <returns></returns> public double Uniform(double a, double b) { return(NativeMethods.core_RNG_uniform(State, a, b)); }
/// <summary> /// /// </summary> /// <param name="edge"></param> /// <param name="dstpt"></param> /// <returns></returns> public int EdgeDst(int edge, out Point2f dstpt) { if (disposed) throw new ObjectDisposedException("Subdiv2D", ""); return NativeMethods.imgproc_Subdiv2D_edgeDst(ptr, edge, out dstpt); }
/// <summary> /// returns Gaussian random variate with mean zero. /// </summary> /// <param name="sigma"></param> /// <returns></returns> public double Gaussian(double sigma) { return(NativeMethods.core_RNG_gaussian(State, sigma)); }
/// <summary> /// Subdiv2D コンストラクタ /// </summary> /// <param name="rect"></param> #else /// <summary> /// Subdiv2D Constructor /// </summary> /// <param name="rect"></param> #endif public Subdiv2D(Rect rect) { ptr = NativeMethods.imgproc_Subdiv2D_new(rect); if (ptr == IntPtr.Zero) throw new OpenCvSharpException(); }
/// <summary> /// /// </summary> public VectorOfRect() { ptr = NativeMethods.vector_Rect_new1(); }
/// <summary> /// /// </summary> /// <returns></returns> public static FrameSource CreateFrameSource_Empty() { IntPtr ptr = NativeMethods.superres_createFrameSource_Empty(); return FrameSourceImpl.FromPtr(ptr); }
protected override void DisposeUnmanaged() { NativeMethods.HandleException( NativeMethods.features2d_Ptr_AKAZE_delete(ptr)); base.DisposeUnmanaged(); }
/// <summary> /// Adds elements to the bottom of the matrix. (Mat::push_back) /// </summary> /// <param name="value">Added element(s)</param> public override void Add(double value) { ThrowIfDisposed(); NativeMethods.core_Mat_push_back_double(ptr, value); }