基于C#的典型图像处理算法 第二章: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; //using System.Drawing.Drawing2D; namespace gray { public partial
主要是对Bitmap类进行了封装,封装后的ProjectImage类提供了直接以矩阵的方式访问RGB3个颜色维灰度值的属性,避免了原类使用public Color GetPixel(int x, int y)读,用public void SetPixel(int x, int y, Color color)写的高消耗访问方式。直接从文件路径或者Bitmap影像或者矩阵都可以进行构造,使用public byte[,] R、public byte[,] G、public byte[,] B属性进行