Example #1
0
        private void btFilePaths_Click(object sender, RoutedEventArgs e)
        {
            List <string> tp = DataSetWriter.GetFilePaths();

            for (int i = 0; i < ImageSet.imageSets.Count; i++)
            {
                listBox1.Items.Add(tp[i]);
            }
        }
Example #2
0
        private void btGet_Click(object sender, RoutedEventArgs e)
        {
            List <string> tp = DataSetWriter.GetClassList(ImageSet.imageSets);

            listBox1.Items.Clear();
            for (int i = 0; i < tp.Count; i++)
            {
                listBox1.Items.Add(tp[i]);
            }
        }
Example #3
0
        private void getLabels(ImageSet imageSet)
        {
            List <string> tp = DataSetWriter.GetClassList(ImageSet.imageSets);

            for (int i = 0; i < imageSet.classes.Count; i++)
            {
                int   id    = tp.IndexOf(imageSet.classes[i]);
                Point start = new Point(imageSet.rects[i].Margin.Left, imageSet.rects[i].Margin.Top);
                Point end   = new Point(imageSet.rects[i].Margin.Right, imageSet.rects[i].Margin.Bottom);
                listBox1.Items.Add(DataSetWriter.GetLine(id, start, end, imageSet.image.Source.Width, imageSet.image.Source.Height));
            }
        }
        public static List <string> getLabels(ImageSet imageSet)
        {
            List <string> tp     = DataSetWriter.GetClassList(ImageSet.imageSets);
            List <string> result = new List <string>()
            {
            };

            for (int i = 0; i < imageSet.classes.Count; i++)
            {
                int   id    = tp.IndexOf(imageSet.classes[i]);
                Point start = new Point(imageSet.rects[i].Margin.Left, imageSet.rects[i].Margin.Top);
                Point end   = new Point(imageSet.rects[i].Margin.Right, imageSet.rects[i].Margin.Bottom);
                result.Add(DataSetWriter.GetLine(id, start, end, imageSet.image.Source.Width, imageSet.image.Source.Height));
            }
            return(result);
        }
Example #5
0
 private void btWriteLabels_Click(object sender, RoutedEventArgs e)
 {
     DataSetWriter.WriteLabels();
     listBox1.Items.Clear();
     listBox1.Items.Add("Writing Labels Complete");
 }