Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GaussianBlurProcessor{TPixel}"/> class.
        /// </summary>
        /// <param name="definition">The <see cref="GaussianBlurProcessor"/> defining the processor parameters.</param>
        public GaussianBlurProcessor(GaussianBlurProcessor definition)
        {
            int kernelSize = (definition.Radius * 2) + 1;

            this.KernelX = ConvolutionProcessorHelpers.CreateGaussianBlurKernel(kernelSize, definition.Sigma);
            this.KernelY = this.KernelX.Transpose();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="GaussianBlurProcessor{TPixel}"/> class.
        /// </summary>
        /// <param name="definition">The <see cref="GaussianBlurProcessor"/> defining the processor parameters.</param>
        /// <param name="source">The source <see cref="Image{TPixel}"/> for the current processor instance.</param>
        /// <param name="sourceRectangle">The source area to process for the current processor instance.</param>
        public GaussianBlurProcessor(GaussianBlurProcessor definition, Image <TPixel> source, Rectangle sourceRectangle)
            : base(source, sourceRectangle)
        {
            int kernelSize = (definition.Radius * 2) + 1;

            this.KernelX = ConvolutionProcessorHelpers.CreateGaussianBlurKernel(kernelSize, definition.Sigma);
            this.KernelY = this.KernelX.Transpose();
        }
Beispiel #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GaussianBlurProcessor{TPixel}"/> class.
        /// </summary>
        /// <param name="configuration">The configuration which allows altering default behaviour or extending the library.</param>
        /// <param name="definition">The <see cref="GaussianBlurProcessor"/> defining the processor parameters.</param>
        /// <param name="source">The source <see cref="Image{TPixel}"/> for the current processor instance.</param>
        /// <param name="sourceRectangle">The source area to process for the current processor instance.</param>
        public GaussianBlurProcessor(
            Configuration configuration,
            GaussianBlurProcessor definition,
            Image <TPixel> source,
            Rectangle sourceRectangle)
            : base(configuration, source, sourceRectangle)
        {
            int kernelSize = (definition.Radius * 2) + 1;

            this.Kernel = ConvolutionProcessorHelpers.CreateGaussianBlurKernel(kernelSize, definition.Sigma);
        }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GaussianSharpenProcessor"/> class.
 /// </summary>
 /// <param name="sigma">The 'sigma' value representing the weight of the blur.</param>
 public GaussianSharpenProcessor(float sigma)
     : this(sigma, ConvolutionProcessorHelpers.GetDefaultGaussianRadius(sigma))
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GaussianBlurProcessor"/> class.
 /// </summary>
 public GaussianBlurProcessor()
     : this(DefaultSigma, ConvolutionProcessorHelpers.GetDefaultGaussianRadius(DefaultSigma))
 {
 }