/// <summary>
 /// Create a 2D kernel from two 1D kernels via outer product.
 ///
 /// Swapping the two 1D kernel parameters gives the transposed 2D kernel.
 /// </summary>
 public static Matrix <float> Create2DKernel(
     Vector <float> kernelX, Vector <float> kernelY)
 {
     return(Matrix <float> .CreateOuterProduct(kernelX, kernelY, (x, y) => x *y));
 }