Example #1
0
        public static Bitmap filter(this Bitmap src, bool bnw)
        {
            if (src == null)
            {
                return(null);
            }

            //Bitmap ret = ExtBitmap.ConvolutionFilter(src, matrix, 1.0, 0, bnw);
            //Bitmap ret = ExtBitmap.Laplacian5x5OfGaussian5x5Filter1(src);
            Bitmap ret = ExtBitmap.AccordCanny(src);

            return(ret);
        }
Example #2
0
        public static Bitmap Laplacian5x5OfGaussian5x5Filter1(this Bitmap sourceBitmap)
        {
            Bitmap resultBitmap =
                ExtBitmap.ConvolutionFilter(sourceBitmap,
                                            Gaussian5x5Type1,
                                            1.0 / 159.0, 0, true);


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


            return(resultBitmap);
        }