Exemplo n.º 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (Form1.blackCroppedImages.Count+Form1.whiteCroppedImages.Count != 1)
     {
         if (ind1 < 0 || ind2 < 0)
         {
             //TwoPieceMatchAnalysis tpma = new TwoPieceMatchAnalysis { map1 = Form1.blackContourMaps[0], map2 = Form1.contourMaps[1] };
             //tpma.Show();
             MessageBox.Show("Please provide two input images for matching");
         }
         else
         {
             if (!blackOWhite)
             {
                 TwoPieceMatchAnalysis tpma = new TwoPieceMatchAnalysis { map1 = Form1.blackContourMaps[ind1], map2 = Form1.blackContourMaps[ind2],
                 pic1=Form1.blackCroppedImages[ind1],pic2=Form1.blackCroppedImages[ind2]};
                 tpma.blackOrWhite = blackOWhite;
                 tpma.Show();
             }
             else
             {
                 TwoPieceMatchAnalysis tpma = new TwoPieceMatchAnalysis { map1 = Form1.whiteContourMaps[ind1], map2 = Form1.whiteContourMaps[ind2],
                     pic1 = Form1.whiteCroppedImages[ind1].Clone(),
                     pic2 = Form1.whiteCroppedImages[ind2].Clone()
                 };
                 tpma.blackOrWhite = blackOWhite;
                 tpma.Show();
             }
         }
     }
 }
Exemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (Form1.blackCroppedImages.Count + Form1.whiteCroppedImages.Count != 1)
     {
         if (ind1 < 0 || ind2 < 0)
         {
             //TwoPieceMatchAnalysis tpma = new TwoPieceMatchAnalysis { map1 = Form1.blackContourMaps[0], map2 = Form1.contourMaps[1] };
             //tpma.Show();
             MessageBox.Show("Please provide two input images for matching");
         }
         else
         {
             if (!blackOWhite)
             {
                 TwoPieceMatchAnalysis tpma = new TwoPieceMatchAnalysis {
                     map1 = Form1.blackContourMaps[ind1], map2 = Form1.blackContourMaps[ind2],
                     pic1 = Form1.blackCroppedImages[ind1], pic2 = Form1.blackCroppedImages[ind2]
                 };
                 tpma.blackOrWhite = blackOWhite;
                 tpma.Show();
             }
             else
             {
                 TwoPieceMatchAnalysis tpma = new TwoPieceMatchAnalysis {
                     map1 = Form1.whiteContourMaps[ind1], map2 = Form1.whiteContourMaps[ind2],
                     pic1 = Form1.whiteCroppedImages[ind1].Clone(),
                     pic2 = Form1.whiteCroppedImages[ind2].Clone()
                 };
                 tpma.blackOrWhite = blackOWhite;
                 tpma.Show();
             }
         }
     }
 }