private void pictureBox1_Paint(object sender, PaintEventArgs e) { var mag = DigitImage.MakeBitmap(DigitImage.FromBitmap(new Bitmap(GetInputImage()), 1), 10); pictureBox2.Image = mag; pictureBox2.Invalidate(); }
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); }