コード例 #1
0
        /// <summary>
        /// returns disc top left end. Eats up any exception thrown during calculation
        /// </summary>
        /// <returns></returns>
        public Point?GetDiscTopRightEnd()
        {
            try
            {
                var distanceProcessor = new RightDistanceProcessor(_inputParams.BackgroundColor, _image, _inputParams.MinPixelsForBaseDisc);
                var y = GetDiscTopEndY(distanceProcessor);
                if (y.HasValue)
                {
                    var x = RightEdgePtsProcessor.GetFirstValidPixelOnRight(y.Value, _image, _inputParams.BackgroundColor);
                    return(new Point(x, y.Value));
                }
            }
            catch {}

            return(null);
        }
コード例 #2
0
 public RightDistanceProcessor(Color backgroundColor, Bitmap image, int pixelsToFeed)
 {
     EdgeProcessor = new RightEdgePtsProcessor(image, backgroundColor);
     ConfigureEdgeLine(pixelsToFeed);
 }