コード例 #1
0
 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();
 }
コード例 #2
0
 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);
     }
 }
コード例 #6
0
 public ErrorDataScoring(ImageData image)
 {
     this.image = image;
     errorData = new ErrorData(image);
 }