Курсовая работа: Програма обробки зображень
this.Close();
}
private void butOK_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
this.Close();
}
}
}
Filter.cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.ComponentModel;
namespace Kursach
{
static class Filter
{
public static Bitmap Filtering(Bitmap img, int[,] kernel, BackgroundWorker bw)
{
int[,] Mk = (int[,])kernel.Clone();
int[] H = new int[kernel.Length];
int counter = 0;
for (int i = 0; i <= kernel.GetUpperBound(0); i++)
for (int j = 0; j <= kernel.GetUpperBound(1); j++)
H[counter++] = kernel[i, j];
Bitmap ret = new Bitmap(img);
int norma = Max(Sum(H), 1);