public void Append(ImageItemCollection images) { foreach (var image in images.ImageItems) { _images.Add(image); } }
public void Load(string filename) { using (Stream fileStream = new FileStream(filename, FileMode.Open)) { XmlSerializer serializer = new XmlSerializer(typeof(ImageItemCollection)); ImageItemCollection images = (ImageItemCollection)serializer.Deserialize(fileStream); _images = images.ImageItems; } }
public void AppendAnnotation(string filePath) { ImageItemCollection images = new ImageItemCollection(); images.Load(filePath); _images.Append(images); foreach (var image in images.ImageItems) { foreach (var label in image.DisplayLabels) { _labels.Add(label); } } }
public void AppendIndex(string filePath) { ImageItemCollection images = new ImageItemCollection(); images.Load(filePath); _images.Append(images); foreach (var image in images.ImageItems) { _imageLocalDescriptors.Add(image.PointDescriptors); _imageGlobalColorDescriptors.Add(image.ColorDescriptors); } _localSimilarityEngine.Index(_imageLocalDescriptors); _globalSimilarityEngine.Index(_imageGlobalColorDescriptors); }