Algorithmix.Forensics.EdgeDetector.EdgePoints C# (CSharp) Method

EdgePoints() public static method

public static EdgePoints ( Bitmap shred, Direction direction, double percentageIgnored = 0.15 ) : int[]
shred System.Drawing.Bitmap
direction Direction
percentageIgnored double
return int[]
        public static int[] EdgePoints(Bitmap shred, Direction direction, double percentageIgnored = 0.15)
        {
            if (percentageIgnored > 0.5 || percentageIgnored < 0)
            {
                throw new ArgumentException("Must have a percentage ignored that is between 0 and 0.5");
            }

            if (direction == Direction.FromLeft)
            {
                return ScanFromLeft(shred, direction, percentageIgnored);
            }
            if (direction == Direction.FromRight)
            {
                return ScanFromRight(shred, direction, percentageIgnored);
            }

            throw new ArgumentException("Non Left-Right directions not supported for this method");
        }