SignalOperations<T>.CreateRealKernelProcessor Method

Creates a kernel processor for real convolution and correlation operations.

Definition

Namespace: Numerics.NET.SignalProcessing
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
C#
public virtual RealKernelProcessor<T> CreateRealKernelProcessor(
	T[] kernel,
	KernelAnchor anchor = default,
	ConvolutionMode mode = ConvolutionMode.FullLength,
	SignalPadding padding = SignalPadding.Zero,
	KernelProcessingMethod processingMethod = KernelProcessingMethod.Auto,
	int fftThreshold = 256
)

Parameters

kernel  T[]
The convolution kernel array.
anchor  KernelAnchor  (Optional)
The anchor point of the kernel. Determines which kernel element aligns with the current signal sample. Default is Default, which adapts based on mode.
mode  ConvolutionMode  (Optional)
The output mode that determines the size and alignment of the result. Default is FullLength, returning output of length signalLength + kernelLength - 1.
padding  SignalPadding  (Optional)
The signal padding mode used for boundary extension. Default is Zero, padding with zeros outside the signal boundaries.
processingMethod  KernelProcessingMethod  (Optional)
The processing method selection strategy. Default is Auto, automatically choosing between direct and FFT methods.
fftThreshold  Int32  (Optional)
The threshold for switching to FFT-based implementation when using Auto. FFT is used when signalLength * kernelLength > fftThreshold. Default is 256.

Return Value

RealKernelProcessor<T>
A new RealKernelProcessor<T> instance.

Remarks

This factory method creates a kernel processor that uses this signal operations instance for FFT operations, allowing for provider-specific optimizations.

The anchor and mode interact to determine the alignment of the output:

  • With FullLength and Default, output[0] corresponds to the first possible overlap (kernel end aligned with signal start).
  • With SameAsSignal and Default, output has the same length as the signal with the kernel centered on each sample.
  • With NoPadding and Default, only positions with complete kernel overlap are computed.

Exceptions

ArgumentNullExceptionkernel is null.

See Also