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];
 }
示例#3
0
 public ErrorData(VectorPicture picture, ImageData source)
     : this(source)
 {
     AddPolygons(picture.Polygons);
     polygonOrder = picture.Polygons.ToList();
 }
示例#4
0
 public ErrorData(ImageData source)
 {
     polygonOrder = new List<Polygon>();
     CreatePixels(source);
 }
示例#5
0
 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);
 }