Exemplo n.º 1
0
        public static void EdgeDetect(string path)
        {
            PreProcessing(path);
            MagickImage img = new MagickImage(path);

            img.CannyEdge(0, 1, new Percentage(5), new Percentage(20));
            img.Negate();
            img.Write(path);
            PostProcessing(null, path, path);
        }
Exemplo n.º 2
0
        public Bitmap EdgeDetect(Bitmap myBitmap, float r, float s)
        {
            using (MagickImage image = new MagickImage(myBitmap))
            {
                image.ReduceNoise();
                image.Blur(r, s);
                image.CannyEdge();

                return(image.ToBitmap());
            }
        }