예제 #1
0
파일: ImageItem.cs 프로젝트: battyone/visa
 public void Append(ImageItemCollection images)
 {
     foreach (var image in images.ImageItems)
     {
         _images.Add(image);
     }
 }
예제 #2
0
파일: ImageItem.cs 프로젝트: battyone/visa
 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;
     }
 }
예제 #3
0
        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);
                }
            }
        }
예제 #4
0
        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);
        }