Ejemplo n.º 1
0
        public void TestShowResult()
        {
            ied.When(x => x.startDetection(Arg.Any <Bitmap>())).Do(x => { });
            ied.getImage().Returns <Bitmap>(imageAvecLaplacian5x5);

            program.applyDetection(null);
        }
Ejemplo n.º 2
0
        public void applyDetection(Bitmap img)
        {
            try
            {
                if (img != null)
                {
                    edgeDetection.startDetection(img);
                }
                else
                {
                    edgeDetection.startDetection(originalImage);
                }

                resultImage = edgeDetection.getImage();
            }catch (Exception e)
            {
                Console.WriteLine("EdgeDetection Error");
                resultImage = originalImage;
            }

            applyResult(resultImage, "save");
        }