예제 #1
0
        /************************************************
        * Convenience method, that applies a filter to an
        * image.
        ************************************************/
        public static void Process(Filter filter, int[] srcPixels, int[] resultPixels, int width, int height, int yStart, int yEnd)
        {
            switch (filter)
            {
            case Filter.EDGE_DETECTION:
                ImageProcessing.EdgeDetection(srcPixels, resultPixels, width, height, yStart, yEnd);
                break;

            case Filter.MEDIAN_FILTER:
                ImageProcessing.MedianFilter(srcPixels, resultPixels, width, height, yStart, yEnd);
                break;

            case Filter.MEAN_FILTER:
                ImageProcessing.MeanFilter(srcPixels, resultPixels, width, height, yStart, yEnd);
                break;
            }
        }