如何将Rectangle []输出到ImageBox或PictureBox?

时间:2016-01-25 07:22:39

标签: c# emgucv

我有一个由图像组成的矩形数组,现在我需要以弹出形式显示它。如何将矩形输出到ImageBox或PictureBox?谢谢!

 results = FindPeople.Find(frameImage, tryUseCuda, tryuseOpenCL, out processingTime, out peopleCount);

if (captureFrame)
      {
       popUpForm popUp = new popUpForm(results);
       popUp.Show();
       captureFrame = false;
      }

弹出表格

public popUpForm(Rectangle[] images)
    {


        foreach (Rectangle rect in images)
       {



       }

    }

1 个答案:

答案 0 :(得分:0)

public popUpForm(Rectangle[] images)
{
   Pen pen = new Pen(Color.Red, 2);
   using (var g = pictureBox.CreateGraphics())
     foreach (Rectangle rect in images)
       g.DrawRectangle(pen, rect);
}