public double Get4dDistanceL2(Color3d color, int distFromPoint) { if (this.GetType() != color.GetType()) { throw new Exception("Can't compare colors in different color spaces"); } double colorDist = 0; for (int i = 0; i < Spectrums.Length; i++) { var dist = Spectrums[i] - color.Spectrums[i]; colorDist += dist * dist; } return(Math.Sqrt(colorDist + distFromPoint)); }
public abstract double Distance(Colors.ColorRgb queryCircle, Colors.Color3d targetColor, int distX, int distY);