public static IntPtr cvCreateSubdivDelaunay2D(Rectangle rect, IntPtr storage) { IntPtr subdiv = cvCreateSubdiv2D((int)CvEnum.SEQ_KIND.CV_SEQ_KIND_SUBDIV2D, Marshal.SizeOf(typeof(MCvSubdiv2D)), Marshal.SizeOf(typeof(MCvSubdiv2DPoint)), Marshal.SizeOf(typeof(MCvQuadEdge2D)), storage); cvInitSubdivDelaunay2D(subdiv, rect); return subdiv; }
/// <summary> /// Create a planar subdivision from the given points. The ROI is computed as the minimun bounding Rectangle for the input points /// </summary> /// <param name="silent">If true, any exception during insert will be ignored</param> /// <param name="points">The points to be inserted to this planar subdivision</param> public PlanarSubdivision(PointF[] points, bool silent) { #region Find the region of interest _roi = PointCollection.BoundingRectangle(points); #endregion _storage = new MemStorage(); _ptr = CvInvoke.cvCreateSubdivDelaunay2D(_roi, _storage); Insert(points, silent); }