Пример #1
0
 public override IntPtr Get()
 {
     return(NativeMethods.features2d_Ptr_KAZE_get(ptr));
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="state"></param>
 public RNG(ulong state)
 {
     State = NativeMethods.core_RNG_new(state);
 }
Пример #3
0
 /// <summary>
 /// Releases unmanaged resources
 /// </summary>
 protected override void DisposeUnmanaged()
 {
     NativeMethods.HandleException(
         NativeMethods.imgproc_LineIterator_delete(ptr));
     base.DisposeUnmanaged();
 }
Пример #4
0
 /// <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));
 }
Пример #5
0
 /// <summary>
 ///
 /// </summary>
 public RNG()
 {
     State = NativeMethods.core_RNG_new();
 }
Пример #6
0
 /// <summary>
 /// Releases unmanaged resources
 /// </summary>
 protected override void DisposeUnmanaged()
 {
     NativeMethods.vector_DMatch_delete(ptr);
     base.DisposeUnmanaged();
 }
Пример #7
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public uint Run()
 {
     return(NativeMethods.core_RNG_operatorThis(State));
 }
Пример #8
0
 /// <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);
 }
Пример #9
0
 /// <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);
 }
Пример #10
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="rect"></param>
 public void InitDelaunay(Rect rect)
 {
     if(disposed)
         throw new ObjectDisposedException("Subdiv2D", "");
     NativeMethods.imgproc_Subdiv2D_initDelaunay(ptr, rect);
 }
Пример #11
0
 /// <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);
 }
Пример #12
0
        /// <summary>
        /// 空の疎行列として初期化
        /// </summary>
#else
        /// <summary>
        /// Creates empty SparseMat
        /// </summary>
#endif
        public SparseMat()
        {
            NativeMethods.HandleException(
                NativeMethods.core_SparseMat_new1(out ptr));
        }
Пример #13
0
 /// <summary>
 /// Releases unmanaged resources
 /// </summary>
 protected override void DisposeUnmanaged()
 {
     NativeMethods.HandleException(
         NativeMethods.core_SparseMat_delete(ptr));
     base.DisposeUnmanaged();
 }
Пример #14
0
 protected override void DisposeUnmanaged()
 {
     NativeMethods.features2d_Ptr_KAZE_delete(ptr);
     base.DisposeUnmanaged();
 }
Пример #15
0
 /// <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);
 }
Пример #16
0
 /// <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);
 }
Пример #17
0
 /// <summary>
 ///
 /// </summary>
 public VectorOfDMatch()
 {
     ptr = NativeMethods.vector_DMatch_new1();
 }
Пример #18
0
 /// <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);
 }
Пример #19
0
 /// <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));
 }
Пример #20
0
 /// <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);
 }
Пример #21
0
 /// <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));
 }
Пример #22
0
 /// <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);
 }
Пример #23
0
 /// <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));
 }
Пример #24
0
 /// <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);
 }
Пример #25
0
 /// <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));
 }
Пример #26
0
        /// <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();
        }
Пример #27
0
 /// <summary>
 ///
 /// </summary>
 public VectorOfRect()
 {
     ptr = NativeMethods.vector_Rect_new1();
 }
Пример #28
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public static FrameSource CreateFrameSource_Empty()
 {
     IntPtr ptr = NativeMethods.superres_createFrameSource_Empty();
     return FrameSourceImpl.FromPtr(ptr);
 }
Пример #29
0
 protected override void DisposeUnmanaged()
 {
     NativeMethods.HandleException(
         NativeMethods.features2d_Ptr_AKAZE_delete(ptr));
     base.DisposeUnmanaged();
 }
Пример #30
0
 /// <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);
 }