Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 /// <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;
 }
Esempio n. 3
0
 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);
 }
Esempio n. 4
0
        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 (%)");
        }