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]); } }
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]); } }
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); }
private void btWriteLabels_Click(object sender, RoutedEventArgs e) { DataSetWriter.WriteLabels(); listBox1.Items.Clear(); listBox1.Items.Add("Writing Labels Complete"); }