示例#1
0
 public static ImageData FromImage(Bitmap img, ImageWindowScheme iws, FeatureSet feature_set)
 {
     SiteFeatureSet[,] sitefeatures = new SiteFeatureSet[iws.XSites, iws.YSites];
     for(int x = 0; x < iws.XSites; x++) for(int y = 0; y < iws.YSites; y++)
     {
         sitefeatures[x,y] = new SiteFeatureSet(feature_set.ApplyToBitmap(img, x, y), feature_set);
     }
     return new ImageData(sitefeatures, feature_set.Length);
 }
示例#2
0
 public SiteFeatureSet(List<double> features, FeatureSet feature_set)
 {
     Features = GetDenseVector(features);
     _feature_set = feature_set;
 }
示例#3
0
 public SiteFeatureSet(double[] features, FeatureSet feature_set)
 {
     Features = features;
     _feature_set = feature_set;
     //TODO: Assert _feature_set.Length == Features.Count
 }
示例#4
0
 public Factory(int xsites, int ysites, FeatureSet f)
 {
     XSites = xsites;
     YSites = ysites;
     if(XSites == 0 || YSites == 0) throw new ArgumentException("site_features must not be size zero");
     FeatureCount = f.Length;
     Features = f;
     SitesSeen = 0;
     ImagesSeen = 0;
 }