private void MoudleFrm_Load(object sender, EventArgs e) { roi = new EROIBW8(); roi.SetPlacement(100, 100, 300, 300); mPicBox1.MRois.Add(roi); HideTabTitle(tabControl1); match = new EMatcher(); find = new EPatternFinder(); find.ContrastMode = EFindContrastMode.Normal; }
/// <summary> /// 初始化Find /// </summary> /// <param name="strTemplateFile">模版文件</param> internal void InitFind(string strTemplateFile) { m_find = new EPatternFinder(); if (!string.IsNullOrEmpty(strTemplateFile) && File.Exists(strTemplateFile)) { m_find.Load(strTemplateFile); } m_find.Interpolate = true; m_find.MaxInstances = 1; m_find.MinScore = GlobalVar.MinScore; m_find.ContrastMode = EFindContrastMode.Normal; }
public override void Initialize() { Roi = new EROIBW8(); Roi.SetPlacement(0, 0, 300, 300); Matcher = new EMatcher(); Finder = new EPatternFinder(); ResultData.Name = matcherConfig.ToolName; ResultData.ValueParams.Clear(); ResultData.ValueParams.Add("数量", new float[] { 0 }); ResultData.ValueParams.Add("中心X", new float[] { 0 }); ResultData.ValueParams.Add("中心Y", new float[] { 0 }); ResultData.ValueParams.Add("角度", new float[] { 0 }); ParentTask.ResultDatas.Add(ResultData); }
public clsEasyFindPattern(PictureBox display, EPatternFinder ePatternFinder) { Display = display; Base = ePatternFinder; inputImage = new EImageBW8(); trainROI = new EROIBW8(); trainImage = new EImageBW8(); dragHandle = EDragHandle.NoHandle; patternTable = new DataTable("PatternTable"); patternTable.Columns.Add("Index"); patternTable.Columns.Add("Score"); patternTable.Columns.Add("Center_X"); patternTable.Columns.Add("Center_Y"); patternTable.Columns.Add("Angle (Deg)"); patternTable.Columns.Add("Scale (%)"); }