Beispiel #1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.cmbSerials.Items.AddRange(SerialPort.GetPortNames());
            this.cmbSerials.SelectedIndex = this.cmbSerials.Items.Count - 1;//Arduino一般在最后一个串口

            //打开视频
            OpenCamera = new OpenCamera(pictureBox1);
            //动态加载图片到 pictureBox1
            OpenCamera.UpdatePictrueImage();
        }
Beispiel #2
0
 private void Button1_Click(object sender, EventArgs e)
 {
     OpenCamera = new OpenCamera(pictureBox1);
     //上摄像头截图到pictureBox2
     pictureBox2.Image = OpenCamera.SaveImage();
     //上摄像头左边透视变换到pictureBox3
     pictureBox3.Image = OpenCamera.SaveWarp();
     MessageBox.Show(OpenCamera.Font(1));
     //上摄像头右边透视变换到pictureBox4
     pictureBox4.Image = OpenCamera.SaveWarp_UPRight();
     MessageBox.Show(OpenCamera.Font(2));
     //棱和点构成列表
     OpenCamera.List_INPUT();
     //魔方计算步长
     //OpenCamera.List_OUPUT();
     //发送步长给arduino
     //OpenCamera.Send_COM();
 }