Ejemplo n.º 1
0
        /// <summary>
        /// Calculates a score for the given input data. The higher the score, the more
        /// likely that the input image represents the value of <c>Symbol</c>.
        /// </summary>
        public int Score(WrappedBitmap inputData)
        {
            int score = 0;

            foreach (var point in _pixelsToSample)
            {
                if (inputData.IsPixelSet(point.X, point.Y))
                {
                    score += _tuningParams.PositiveScoreOffset;
                }
                else
                {
                    score -= _tuningParams.NegativeScoreOffset;
                }
            }

            return(score);
        }