private static Matrix4x4 CreateCombinedTestFilterMatrix() { Matrix4x4 brightness = MatrixFilters.CreateBrightnessFilter(0.9F); Matrix4x4 hue = MatrixFilters.CreateHueFilter(180F); Matrix4x4 saturation = MatrixFilters.CreateSaturateFilter(1.5F); Matrix4x4 m = brightness * hue * saturation; return(m); }
private void button_generate_gauss_Click(object sender, EventArgs e) { var xValue = textBox_gauss_x.Text; if (Int32.TryParse(xValue, out int x)) { var matrix = MatrixFilters.GaussianBlur(x, x); FilterJson.Text = JsonConvert.SerializeObject(matrix, Formatting.Indented); } }
/// <summary> /// Initializes a new instance of the <see cref="InvertProcessor{TPixel}"/> class. /// </summary> /// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param> public InvertProcessor(float amount) : base(MatrixFilters.CreateInvertFilter(amount)) { this.Amount = amount; }
/// <summary> /// Initializes a new instance of the <see cref="ContrastProcessor{TPixel}"/> class. /// </summary> /// <remarks> /// A value of 0 will create an image that is completely gray. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing results with more contrast. /// </remarks> /// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param> public ContrastProcessor(float amount) : base(MatrixFilters.CreateContrastFilter(amount)) { this.Amount = amount; }
/// <summary> /// Initializes a new instance of the <see cref="OpacityProcessor{TPixel}"/> class. /// </summary> /// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param> public OpacityProcessor(float amount) : base(MatrixFilters.CreateOpacityFilter(amount)) { this.Amount = amount; }
/// <summary> /// Initializes a new instance of the <see cref="BrightnessProcessor{TPixel}"/> class. /// </summary> /// <remarks> /// A value of 0 will create an image that is completely black. A value of 1 leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of an amount over 1 are allowed, providing brighter results. /// </remarks> /// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param> public BrightnessProcessor(float amount) : base(MatrixFilters.CreateBrightnessFilter(amount)) { this.Amount = amount; }
/// <summary> /// Initializes a new instance of the <see cref="SepiaProcessor{TPixel}"/> class. /// </summary> /// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param> public SepiaProcessor(float amount) : base(MatrixFilters.CreateSepiaFilter(amount)) { this.Amount = amount; }
/// <summary> /// Initializes a new instance of the <see cref="GrayscaleBt709Processor{TPixel}"/> class. /// </summary> /// <param name="amount">The proportion of the conversion. Must be between 0 and 1.</param> public GrayscaleBt709Processor(float amount) : base(MatrixFilters.CreateGrayscaleBt709Filter(amount)) { this.Amount = amount; }
/// <summary> /// Initializes a new instance of the <see cref="SaturateProcessor{TPixel}"/> class. /// </summary> /// <remarks> /// A value of <value>0</value> is completely un-saturated. A value of <value>1</value> leaves the input unchanged. /// Other values are linear multipliers on the effect. Values of amount over 1 are allowed, providing super-saturated results /// </remarks> /// <param name="amount">The proportion of the conversion. Must be greater than or equal to 0.</param> public SaturateProcessor(float amount) : base(MatrixFilters.CreateSaturateFilter(amount)) { this.Amount = amount; }
public void Filter_rect_CorrectProcessor() { this.operations.Filter(MatrixFilters.AchromatomalyFilter * MatrixFilters.CreateHueFilter(90F), this.rect); FilterProcessor <Rgba32> p = this.Verify <FilterProcessor <Rgba32> >(this.rect); }
/// <summary> /// Initializes a new instance of the <see cref="HueProcessor{TPixel}"/> class. /// </summary> /// <param name="degrees">The angle of rotation in degrees</param> public HueProcessor(float degrees) : base(MatrixFilters.CreateHueFilter(degrees)) { this.Degrees = degrees; }