public DiscreteSpiralPointMutation(ImageData sourceData, double exp = EXP) { this.sourceData = sourceData; var random = new Random(0); int pixelCount = 4 * sourceData.Height * sourceData.Width; DistributionCache = Distribution.DistinctSampling(random, pixelCount, exp).ToLazyList(); }
public PixelErrorData(IntVector2 point, ImageData source) { targetColor = source[point]; }
public ErrorData(VectorPicture picture, ImageData source) : this(source) { AddPolygons(picture.Polygons); polygonOrder = picture.Polygons.ToList(); }
public ErrorData(ImageData source) { polygonOrder = new List<Polygon>(); CreatePixels(source); }
private void CreatePixels(ImageData source) { pixelErrorDatas = new PixelErrorData[source.Width,source.Height]; foreach (var point in source.GetPoints()) { this[point] = new PixelErrorData(point, source); TotalError += this[point].GetError(polygonOrder); } }
public ErrorDataScoring(ImageData image) { this.image = image; errorData = new ErrorData(image); }