Emgu.CV.PointCollection.MinAreaRect C# (CSharp) Метод

MinAreaRect() публичный статический Метод

Find the bounding rectangle for the specific array of points
public static MinAreaRect ( PointF points ) : MCvBox2D
points System.Drawing.PointF The collection of points
Результат MCvBox2D
        public static MCvBox2D MinAreaRect(PointF[] points)
        {
            IntPtr seq = Marshal.AllocHGlobal(StructSize.MCvContour);
             IntPtr block = Marshal.AllocHGlobal(StructSize.MCvSeqBlock);
             GCHandle handle = GCHandle.Alloc(points, GCHandleType.Pinned);
             CvInvoke.cvMakeSeqHeaderForArray(
            CvInvoke.CV_MAKETYPE((int)CvEnum.MAT_DEPTH.CV_32F, 2),
            StructSize.MCvSeq,
            StructSize.PointF,
            handle.AddrOfPinnedObject(),
            points.Length,
            seq,
            block);
             MCvBox2D rect = CvInvoke.cvMinAreaRect2(seq, IntPtr.Zero);
             handle.Free();
             Marshal.FreeHGlobal(seq);
             Marshal.FreeHGlobal(block);
             return rect;
        }