图像处理
wtuyzh
这个作者很懒,什么都没留下…
展开
-
图像的打开和保存
//打开图像模块 picBox.Refresh(); openFileDialog1.InitialDirectory = "."; if (openFileDialog1.ShowDialog() == DialogResult.OK) { string srcFileNam原创 2006-07-05 19:47:00 · 950 阅读 · 2 评论 -
图像的灰度化模块
public Bitmap Gray(Bitmap b) { int width = b.Width; int height = b.Height; BitmapData data = b.LockBits(new Rectangle(0, 0, width, height), ImageLockMode.ReadWr原创 2006-07-05 19:49:00 · 1592 阅读 · 0 评论 -
图像的二值化模块(固定阈值法和Otsu阈值法)
#region 固定阈值法二值化模块 public Bitmap Threshoding(Bitmap b, byte threshold) { int width = b.Width; int height = b.Height; BitmapData data = b.LockBits(原创 2006-07-05 19:52:00 · 3751 阅读 · 1 评论 -
平滑处理模块
#region 平滑处理模块 public Bitmap Smooth(Bitmap b) { Matrix3x3 m = new Matrix3x3(); m.Init(1); m.Scale = 9; return m.Convolute(b); }原创 2006-07-05 19:55:00 · 917 阅读 · 0 评论 -
高斯模糊模块
#region 高斯模糊模块 public Bitmap GaussBlur(Bitmap b) { Matrix3x3 m = new Matrix3x3(); m.Init(1); m.Scale = 16; m.TopMid = m.MidLeft = m.MidRigh原创 2006-07-05 19:56:00 · 1727 阅读 · 0 评论 -
锐化模块
#region 锐化模块 public Bitmap Sharpen(Bitmap b) { Matrix3x3 m = new Matrix3x3(); m.Init(0); m.Scale = 1; m.TopMid = m.MidLeft = m.MidRight = m原创 2006-07-05 19:58:00 · 896 阅读 · 0 评论 -
前面几个模块用到的公共类Matrix3x3
public class Matrix3x3 { int topLeft = 0, topMid = 0, topRight = 0; int midLeft = 0, center = 1, midRight = 0; int bottomLeft = 0, bottomMid = 0, bottomRight = 0; in转载 2006-07-05 20:00:00 · 1760 阅读 · 1 评论 -
边缘检测类(包括Roberts, Sobel, Prewitt, Kirsch等算子的边缘检测算法)
public class EdgeDetect : ImageInfo { /************************************************************ * * Roberts, Sobel, Prewitt, Kirsch, GaussLaplacian * 水平检测、垂直检测、原创 2006-07-05 20:04:00 · 10535 阅读 · 5 评论 -
前面几个类的基类ImageInfo
public class ImageInfo { /// /// 每像素字节数 BytesPerPixel /// public const int BPP = 4; }原创 2006-07-05 20:07:00 · 1373 阅读 · 0 评论