Beispiel #1
0
            public PtypeMetadata(string id)
            {
                Examples = new List <Example>();

                Ptype       = new Ptype.Mutable();
                Ptype.Id    = id;
                NeedsUpdate = false;
            }
Beispiel #2
0
        public static List <Tree> FindPrototypeOccurrences(Bitmap bitmap, Ptype.Mutable ptype)
        {
            List <Ptype.Mutable> ptypes = new List <Ptype.Mutable>();

            ptypes.Add(ptype);
            List <Ptype> lib = Ptype.CreatePrototypeLibrary(ptypes);

            List <Tree> foundPtypes = new List <Tree>();

            try {
                FeatureTree tree          = FeatureTree.BuildTree(lib[0].Features());
                List <Tree> foundFeatures = new List <Tree>();
                tree.MultiThreadedMatch(bitmap, foundFeatures);

                foreach (Ptype p in lib)
                {
                    p.Model.Finder.FindOccurrences(p, bitmap, foundFeatures, foundPtypes);
                }
            } catch {
            }

            return(foundPtypes);
        }
			public PtypeMetadata(string id){
				Examples = new List<Example>();

				Ptype = new Ptype.Mutable();
				Ptype.Id = id;
				NeedsUpdate = false;
			}