示例#1
0
        /// <summary>
        /// returns disc top left end. Eats up any exception thrown during calculation
        /// </summary>
        /// <returns></returns>
        public Point?GetDiscTopLeftEnd()
        {
            try
            {
                var distanceProcessor = new LeftDistanceProcessor(_inputParams.BackgroundColor, _image, _inputParams.MinPixelsForBaseDisc);
                var y = GetDiscTopEndY(distanceProcessor);
                if (y.HasValue)
                {
                    var x = LeftEdgePtsProcessor.GetFirstValidPixelOnLeft(y.Value, _image, _inputParams.BackgroundColor);
                    return(new Point(x, y.Value));
                }
            }
            catch {}

            return(null);
        }
 public LeftDistanceProcessor(Color backgroundColor, Bitmap image, int pixelsToFeed)
 {
     EdgeProcessor = new LeftEdgePtsProcessor(image, backgroundColor);
     ConfigureEdgeLine(pixelsToFeed);
 }