固定阈值法二值化模块.docVIP

  • 1
  • 0
  • 约5.32千字
  • 约 4页
  • 2019-09-08 发布于天津
  • 举报
固定阈值法二值化模块 ??????? public Bitmap Threshoding(Bitmap b, byte threshold) ??????? { ??????????? int width = b.Width; ??????????? int height = b.Height; ??????????? BitmapData data = b.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWrite, PixelFormat.Format32bppArgb); ??????????? unsafe ??????????? { ??????????????? byte* p = (byte*)data.Scan0; ??????????????? int offset = data.Stride - width * 4; ??????????????? byte R, G, B, gray; ??????????????? for (int y = 0; y height; y++) ??????????????? { ??????????????????? for (int x = 0; x width; x++) ??????????????????? { ???????????

文档评论(0)

1亿VIP精品文档

相关文档