在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
1 /// <summary> 2 ///1#相机实时显示 3 /// </summary> 4 /// <param name="sender"></param> 5 /// <param name="e"></param> 6 private void checkBox1_CheckedChanged(object sender, EventArgs e) 7 { 8 //首先判断相机是否连接好了。 9 10 //调用实时显示方法 11 if (checkBox1.Checked) 12 { 13 ICogAcqFifo myCamera; 14 CogAcqFifoTool myAcqFifoTooL = Variable.myToolBlock[0].Tools["CogAcqFifoTool1"] as CogAcqFifoTool; 15 try 16 { 17 myAcqFifoTooL.Run(); 18 if (myAcqFifoTooL.OutputImage == null) 19 { 20 MessageBox.Show("1#相机连接异常!!!"); 21 ShowMsg("1#相机连接异常!!!"); 22 return; 23 } 24 } 25 catch 26 { 27 ShowMsg("1#实时显示失败!!"); 28 return; 29 } 30 myCamera = myAcqFifoTooL.Operator; 31 cogRecordDisplay1.StartLiveDisplay(myCamera, false);//实时显示 32 cogRecordDisplay1.AutoFit = true; 33 } 34 else 35 { 36 //停止实时显示 37 cogRecordDisplay1.StopLiveDisplay(); 38 } 39 40 }
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论