8.2Csharp与VisionPro混合编程1(读取本地图像)

VisionPro读取本地图像
8.2Csharp与VisionPro混合编程1(读取本地图像)_第1张图片
主要代码段

 private CogImageFileTool m_ImageFileTool;

        public Form1()
        {
            InitializeComponent();
            m_ImageFileTool = new CogImageFileTool();
        }

        private void DisPicBtn_Click(object sender, EventArgs e)
        {
            m_ImageFileTool.Operator.Open(Directory.GetCurrentDirectory() + "/little2.bmp",CogImageFileModeConstants.Read);
            m_ImageFileTool.Run();
            cogRecordDisplay1.Image = m_ImageFileTool.OutputImage as CogImage8Grey;
            cogRecordDisplay1.Fit(true);
        }

你可能感兴趣的:(WinForm窗体,C#)