CURELab.SignLanguage.HandDetector.PointHelper.GetBoundingRectangle C# (CSharp) Method

GetBoundingRectangle() public static method

public static GetBoundingRectangle ( this ps ) : Rectangle
ps this
return System.Drawing.Rectangle
        public static Rectangle GetBoundingRectangle(this Point[] ps)
        {
            int x = ps.Min(a => a.X);
            int y = ps.Min(a => a.Y);
            int width = ps.Max(a => a.X) - x;
            int height = ps.Max(a => a.Y) - y;
            return new Rectangle(x, y, width, height);
        }