public LabeledImage DebugGetPixelValues(int index) { HWImage temp = new HWImage(28, 28); temp.AddPixelImage(data.ElementAt(index).Image); return(new LabeledImage(temp, data.ElementAt(index).Label)); }
public LabeledImage(HWImage img, int Label) { this.PixelValues = new float[Height * Width]; Array.Copy(img.PixelImageToList().ToArray(), this.PixelValues, Height * Width); this.Image = img.ToBitMapImage(); this.Label = Label; img.Dispose(); }
private List <HWImage> GetPixelValues(int amount) { List <HWImage> ret = new List <HWImage>(); int i = ClusterImageIndex; while (i < ClusterImageIndex + amount) { HWImage temp = new HWImage(28, 28); temp.AddPixelImage(data.ElementAt(i++).Image); ret.Add(temp); } ClusterImageIndex = i; return(ret); }