Beispiel #1
0
        private EnergyFunctionBase GetEnergyAlgorithm()
        {
            EnergyFunctionBase function;

            switch (algorithmDropDown.SelectedIndex)
            {
            case 1:
                function = new Sobel();
                break;

            case 2:
                function = new Prewitt();
                break;

            case 3:
                function = new PrewittSlanting();
                break;

            case 4:
                function = new Laplacian();
                break;

            default:
                function = new RobertsCross();
                break;
            }
            return(function);
        }
Beispiel #2
0
        private static void Main()
        {
            var input  = FileManager.ReadInput();
            var output = new OutputData(input.Images);

            var canny           = new Canny();
            var laplaceOperator = new LaplaceOperator();
            var robertsCross    = new RobertsCross();
            var sobelOperator   = new SobelOperator();

            canny.ProcessInput(input, output);
            laplaceOperator.ProcessInput(input, output);
            robertsCross.ProcessInput(input, output);
            sobelOperator.ProcessInput(input, output);

            Console.WriteLine();
            FileManager.WriteOutput(output);
            Console.ReadKey();
        }