//边缘检测
public Bitmap cn(Bitmap x)
{
Color c1 = new Color();
Color c2 = new Color();
Color c3 = new Color();
Color c4 = new Color();
int i, j;
int rr, gg, bb;//
int r1, r2, r3, r4, fxr, fyr;//
int g1, g2, g3, g4, fxg, fyg;//
int b1, b2, b3, b4, fxb, fyb;//
//把图片中的图片传给一个BITMAP类型
Bitmap box1 = new Bitmap(x);
for (i = 0; i <= x.Width - 2; i++)
{
for (j = 0; j <= x.Height - 2; j++)
{
c1 = box1.GetPixel(i, j);
c2 = box1.GetPixel(i + 1, j + 1);
c3 = box1.GetPixel(i + 1, j);
c4 = box1.GetPixel(i, j + 1);
r1 &
c#图像处理-边缘检测
最新推荐文章于 2025-03-10 14:12:10 发布