public static Bitmap Laplacian5x5Filter(this Bitmap sourceBitmap,
                                                bool grayscale = true)
        {
            Bitmap resultBitmap = ExtBitmap.ConvolutionFilter(sourceBitmap,
                                                              Matrix.Laplacian5x5, 1.0, 0, grayscale);

            return(resultBitmap);
        }
Beispiel #2
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);
        }
Beispiel #3
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);
        }
Beispiel #4
0
        public static Bitmap Laplacian3x3OfGaussian3x3Filter(this Bitmap sourceBitmap)
        {
            Bitmap resultBitmap = ExtBitmap.ConvolutionFilter(sourceBitmap,
                                                              Matrix.Gaussian3x3, 1.0 / 16.0, 0, true);

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

            return(resultBitmap);
        }
Beispiel #5
0
        public static Bitmap Sobel3x3Filter(this Bitmap sourceBitmap,
                                            bool grayscale = true)
        {
            //Test added to avoid the use of a null image
            if (sourceBitmap == null)
            {
                return(null);
            }

            Bitmap resultBitmap = ExtBitmap.ConvolutionFilter(sourceBitmap,
                                                              Matrix.Sobel3x3Horizontal,
                                                              Matrix.Sobel3x3Vertical,
                                                              1.0, 0, grayscale);

            return(resultBitmap);
        }
Beispiel #6
0
 //Test if the generated method and the test method matches to control results
 public bool CompareTwoImages(Bitmap img1, Bitmap img2)
 {
     return(ExtBitmap.CompareTwoImages(img1, img2));
 }
Beispiel #7
0
 //Test Laplacian3x3Filter Edge Detection
 public Bitmap Laplacian3x3Filter(Bitmap sourceBitmap, bool grayscale = true)
 {
     return(ExtBitmap.Laplacian3x3Filter(sourceBitmap, grayscale));
 }
Beispiel #8
0
 //Test SobelFilter Edge Detection
 public Bitmap SobelFilter(Bitmap sourceBitmap, bool grayscale = true)
 {
     return(ExtBitmap.Sobel3x3Filter(sourceBitmap, grayscale));
 }
Beispiel #9
0
 //Test Night Filter
 public Bitmap NightFilter(Bitmap sourceBitmap, bool grayscale = true)
 {
     return(ExtBitmap.NightFilter(sourceBitmap, grayscale));
 }
Beispiel #10
0
 //Test KirschFilter Edge Detection
 public Bitmap KirschFilter(Bitmap image)
 {
     return(ExtBitmap.KirschFilter(image));
 }