Beispiel #1
0
        /// <summary>
        /// get score. score of 0 is perfect
        /// </summary>
        /// <param name="b">The b.</param>
        /// <param name="l">The l.</param>
        /// <returns></returns>
        private int GetOffScore(Bitmap b, HistogramLetter l)
        {
            var bba   = BitmapBoolArray.GetBitmapBoolArray(b);
            var h     = HistogramLetter.GetHistogram(bba, b);
            var score = l.GetHistogramOffsetScore(h.Item1, h.Item2);

            return(score);
        }
Beispiel #2
0
            /// <summary>
            /// Initializes a new instance of the <see cref="HistogramLetter"/> class.
            /// </summary>
            /// <param name="b">The b.</param>
            /// <param name="letter">The letter.</param>
            public HistogramLetter(Bitmap b, char letter)
            {
                var bba = BitmapBoolArray.GetBitmapBoolArray(b);

                Letter = letter;
                var val = GetHistogram(bba, b);

                XValues = val.Item1;
                YValues = val.Item2;
            }