/// <summary> /// 區域二值化 /// </summary> /// <param name="Brightness"></param> /// <param name="BinImageFileName"></param> public void SetAreaBin(double Brightness, string BinImageFileName) { CaptureImageTo.Image = Binarize.ToGray((Bitmap)CaptureImageTo.Image);//不作灰階 Bitmap tempBmp = new Bitmap(CaptureImageTo.Image); CaptureImageTo.Image = Binarize.BitmapTo1Bpp(tempBmp, Brightness, BinImageFileName);//use this 不作二值化 CaptureImageTo.Refresh(); }
private void mTriToolStripMenuItem_Click(object sender, EventArgs e) { binarize = new TriangleMethod(); }
private void standartToolStripMenuItem_Click(object sender, EventArgs e) { binarize = new SimpleBinarization(); }