Пример #1
0
        public static Bitmap LaplacianOfGaussianFilter(this Bitmap sourceBitmap)
        {
            Bitmap resultBitmap = ExtBitmap.ConvolutionFilter(sourceBitmap,
                                                              Matrix.LaplacianOfGaussian, 1.0, 0, true);

            return(resultBitmap);
        }
Пример #2
0
        public static Bitmap Laplacian5x5Filter(this Bitmap sourceBitmap,
                                                bool grayscale = true)
        {
            Bitmap resultBitmap = ExtBitmap.ConvolutionFilter(sourceBitmap,
                                                              Matrix.Laplacian5x5, 1.0, 0, grayscale);

            return(resultBitmap);
        }
Пример #3
0
        public static Bitmap StaticMethodFilter(this Bitmap sourceBitmap)
        {
            Bitmap resultBitmap = ExtBitmap.ConvolutionFilter(sourceBitmap,
                                                              Matrix.Gaussian3x3, 1.0 / 16.0, 0, true);

            resultBitmap = ExtBitmap.ConvolutionFilter(resultBitmap,
                                                       Matrix.Laplacian5x5, 1.0, 0, false);

            return(resultBitmap);
        }
Пример #4
0
        public static Bitmap KirschFilter(this Bitmap sourceBitmap,
                                          bool grayscale = true)
        {
            Bitmap resultBitmap = ExtBitmap.ConvolutionFilter(sourceBitmap,
                                                              Matrix.Kirsch3x3Horizontal,
                                                              Matrix.Kirsch3x3Vertical,
                                                              1.0, 0, grayscale);

            return(resultBitmap);
        }
Пример #5
0
        public static Bitmap Laplacian5x5OfGaussian5x5Filter1(this Bitmap sourceBitmap)
        {
            Bitmap resultBitmap = ExtBitmap.ConvolutionFilter(sourceBitmap,
                                                              Matrix.Gaussian5x5Type1, 1.0 / 159.0, 0, true);

            resultBitmap = ExtBitmap.ConvolutionFilter(resultBitmap,
                                                       Matrix.Laplacian5x5, 1.0, 0, false);

            return(resultBitmap);
        }