Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     float[,] kernel = new float[dataGridView1.RowCount, dataGridView1.ColumnCount];
     for (int i = 0; i < dataGridView1.RowCount; i++)
     {
         for (int j = 0; j < dataGridView1.ColumnCount; j++)
         {
             if (dataGridView1.Rows[i].Cells[j].Style.BackColor == Color.Black)
             {
                 kernel[i, j] = 1;
             }
             else
             {
                 kernel[i, j] = 0;
             }
         }
     }
     MathMorfology.createMathMorfKernel(kernel);
     Close();
 }
Exemplo n.º 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     MathMorfology.createMathMorfKernel();
 }