コード例 #1
0
        private void createSmoothingKernel()
        {
            BestCS.Math.Gaussian g = new BestCS.Math.Gaussian(smoothingSigma);
            gaussianKernel = g.Kernel(smoothingKernelSize);

            // Normalize
            double norm = gaussianKernel.Euclidean();

            gaussianKernel = gaussianKernel.Divide(norm);
        }
コード例 #2
0
 private void createGaussian()
 {
     double[] aforgeKernel = new BestCS.Math.Gaussian(sigma).Kernel(size);
     this.kernel = Array.ConvertAll <double, float>(aforgeKernel, Convert.ToSingle);
 }