Example #1
0
 public bool Save(string path)
 {
     if (Matching == null)
     {
         Matching = new MatchingModule();
     }
     //string tempName = path + "ModelImage.shm";
     return(Matching.SaveShapeModel(path));
 }
Example #2
0
 public bool Load(string path)
 {
     if (Matching == null)
     {
         Matching = new MatchingModule();
         Matching.InitMatchingParam(this);
     }
     //string tempName = path + "ModelImage.shm";
     TemplatePath = path;
     if (!FileLib.DirectoryEx.Exist(TemplatePath, false))
     {
         return(false);
     }
     IsLoadOK = Matching.LoadShapeModel(TemplatePath);
     return(IsLoadOK);
 }
Example #3
0
 public St_TemplateParam(bool isInit = true)
 {
     MatchingType  = En_TemplateMatchingType.形状匹配;
     StartAngle    = -10;
     EndAngle      = 10;
     Level         = 5;
     Score         = 70;
     Scale         = 1.0;
     CenterX       = 0;
     CenterY       = 0;
     TemplateAngle = 0;
     OffsetXMax    = 5;
     OffsetXMin    = -5;
     OffsetYMax    = 5;
     OffsetYMin    = -5;
     Matching      = new MatchingModule();
     IsLoadOK      = false;
     TemplatePath  = "";
     MaxError      = 50;
     Area          = 50;
     ContLength    = 0;
     Matching.InitMatchingParam(this);
 }