public bool ProcessImage(string strStep, HObject image, VisionControl ctl) { VisionBase vb = null; if (m_dicVision.TryGetValue(strStep, out vb)) { vb.SetSrcImage(image); if (vb.Process(ctl)) { return(true); } } return(false); }
private void btnReadImage_Click(object sender, EventArgs e) { if (vision == null) { MessageBox.Show("请选择流程"); return; } OpenFileDialog f = new OpenFileDialog(); if (f.ShowDialog() == DialogResult.OK) { HObject image; HOperatorSet.ReadImage(out image, f.FileName.Replace('\\', '/')); vision.SetSrcImage(image); visionControl1.DispImageFull(image); } }