예제 #1
0
        private void pictureBox1_Paint(object sender, PaintEventArgs e)
        {
            var mag = DigitImage.MakeBitmap(DigitImage.FromBitmap(new Bitmap(GetInputImage()), 1), 10);

            pictureBox2.Image = mag;


            pictureBox2.Invalidate();
        }
예제 #2
0
        public int DetectNumberInImage(Bitmap inputImage)
        {
            var di = DigitImage.FromBitmap(inputImage, 1);

            var response = network.Query(di.pixels.SelectMany(su => su.Select(DigitImage.ConvertGrayScaleByteToDouble)).ToArray());

            var max = response.Max(x => x);
            var f   = response.ToList().IndexOf(max);

            return(f);
        }