public static byte[] Serialized(SampleFingerprint fp) { return(PersistentCache.Get("templates", fp.Path + ".cbor", () => { return new FingerprintTemplate(fp.Decode()).ToByteArray(); })); }
public static byte[] Extractor(string key, SampleFingerprint fp) { return(PersistentCache.Get(Path.Combine("extractor-transparency-files", key), ExtractorPath(key, fp), () => { using (var collector = new FileCollector(key)) { new FingerprintTemplate(fp.Decode()); return collector.Files[0]; } })); }
public static Table ExtractorTable(SampleFingerprint fp) { return(PersistentCache.Get <Table>("extractor-transparency-stats", fp.Path, () => { using (var collector = new TableCollector()) { new FingerprintTemplate(fp.Decode()); return collector.Sum(); } })); }
public static Table ExtractorTable(SampleFingerprint fp) { return(PersistentCache.Get <Table>("extractor-transparency-stats", fp, () => { var image = fp.Load(); using (var collector = new TableCollector()) { new FingerprintTemplate(fp.Decode()); return collector.Accumulator.Summarize(); } })); }