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); }