//obtain L component as CIE1976 experiment, somewhere find coefficient, but less a bit ~ 2.4 :3 public static double[,] FakeCIE1976L(Bitmap img) { List <ArraysListDouble> lab = RGBandLab.RGB2Lab(img); double[,] L = lab[0].Color; L = L.ArrayMultByConst(2.57); return(L); }
private static int[,] Speckle(int[,] arr, double variance, double[,] noise) { int[,] result = new int[arr.GetLength(0), arr.GetLength(1)]; var temp = noise.ArrayMultByConst(Math.Sqrt(variance)).ArraySumWithConst(1); result = arr.ImageUint8ToDouble().ArrayMultElements(temp).ImageDoubleToUint8(); return(result); }