/// <summary> /// Returns the correction mask. /// </summary> /// <param name="a">Factor (0, 1]</param> /// <param name="b">Offset (0, 1]</param> /// <param name="length">Length</param> /// <returns>Matrix</returns> public static float[,] LocalContrastInversion(float a, float b, int length) { float[,] table = new float[length, length]; float w, v; int x, y; for (x = 0; x < length; x++) { w = x / (float)length; for (y = 0; y < length; y++) { v = y / (float)length; table[x, y] = Intensity.LocalContrastInversion(w, v, a, b); } } return(table); }
/// <summary> /// Implements filter rebuilding. /// </summary> protected override void Rebuild() { this.values = Intensity.LocalContrastInversion(this.a, this.b, 256); }