Esempio n. 1
0
        public static void GaussianSmooth(IImage <double> source, IImage <double> target, double scale)
        {
            Kernel1D        smooth = Kernel1D.CreateGaussian(scale);
            IImage <double> tempor = source.CloneSize();

            SeparableConvolveX(source, tempor, smooth);
            SeparableConvolveY(tempor, target, smooth);
        }
Esempio n. 2
0
        public static void GaussianGradient(IImage <double> source, IImage <double> targetX, IImage <double> targetY, double scale)
        {
            Kernel1D smooth = Kernel1D.CreateGaussian(scale);
            Kernel1D grad   = Kernel1D.CreateGaussianDerivative(scale, 1);

            IImage <double> tempor = source.CloneSize();

            SeparableConvolveX(source, tempor, grad);
            SeparableConvolveY(tempor, targetX, smooth);

            SeparableConvolveX(source, tempor, smooth);
            SeparableConvolveY(tempor, targetY, grad);
        }
Esempio n. 3
0
        public static void HessianMatrixOfGaussian(IImage <double> source, IImage <double> targetXX, IImage <double> targetYY, IImage <double> targetXY, double scale)
        {
            Kernel1D smooth = Kernel1D.CreateGaussian(scale);
            Kernel1D deriv1 = Kernel1D.CreateGaussianDerivative(scale, 1);
            Kernel1D deriv2 = Kernel1D.CreateGaussianDerivative(scale, 2);

            IImage <double> tempor = source.CloneSize();

            SeparableConvolveX(source, tempor, deriv2);
            SeparableConvolveY(tempor, targetXX, smooth);

            SeparableConvolveX(source, tempor, smooth);
            SeparableConvolveY(tempor, targetYY, deriv2);

            SeparableConvolveX(source, tempor, deriv1);
            SeparableConvolveY(tempor, targetXY, deriv1);
        }