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); }
public SiteFeatureSet(List<double> features, FeatureSet feature_set) { Features = GetDenseVector(features); _feature_set = feature_set; }
public SiteFeatureSet(double[] features, FeatureSet feature_set) { Features = features; _feature_set = feature_set; //TODO: Assert _feature_set.Length == Features.Count }
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; }