C#与Emgu从当前窗口打开另一个窗口并在其窗口打开图片

    xiaoxiao2023-03-24  4

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Emgu.CV; using Emgu.CV.Structure; using Emgu.CV.ML;

     

    namespace WindowsFormsApplication20 {     public partial class Form1 : Form     {                  public Form1()         {             InitializeComponent();           

            }              

            private void button2_Click(object sender, EventArgs e)         {             Form2 frm = new Form2(); //新建Form2 实例              frm.Show(); //打开窗口             Mat m = new Mat("ball.png",Emgu .CV .CvEnum .LoadImageType .AnyColor );             frm.imageBox4.Image = m; //打开 imageBox4时需要把的 Modifier 属性值改成Public才能访问         }             } }

    转载请注明原文地址: https://ju.6miu.com/read-1201293.html
    最新回复(0)