Exemplo n.º 1
0
        private void 实时匹配ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ContoursForm contoursForm = new ContoursForm();

            contoursForm.doSACFind += ContoursForm_doSACFind1;
            contoursForm.Show();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 找轮廓
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void 查找轮廓ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (bitmap == null)
            {
                MessageBox.Show("没有打开图片...");
                return;
            }
            if (hasROI)
            {
                if (MessageBox.Show("当前ROI Location X:" + rectangleROI.X + "\r\nLocation Y:" + rectangleROI.Y + "\r\nWidth:" + rectangleROI.Width + "\r\n" + "Height:" + rectangleROI.Height, "ROI", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
                {
                    return;
                }
            }
            //if (contoursForm==null) {
            contoursForm = new ContoursForm();
            //}

            contoursForm.doFindContours += ContoursForm_doFindContours;
            //  contoursForm.doFindMark += ContoursForm_doFindMark;
            contoursForm.doSACFind  += ContoursForm_doSACFind;
            contoursForm.sourceImage = new Image <Gray, byte>(bitmap);
            contoursForm.Show();
        }