Beispiel #1
0
        public int[][] CartoonizerImage(int[][] source)
        {
            source = GreyScaleImage(source);

            int[][] imageInvert = InvertColors(PhotoUtilities.RawImageClone(source));

            double[][] maskFilter = new double[3][];
            maskFilter[0] = new double[3] {
                1, 2, 1
            };
            maskFilter[1] = new double[3] {
                2, 4, 2
            };
            maskFilter[2] = new double[3] {
                1, 2, 1
            };

            imageInvert = FilterApply(imageInvert, maskFilter, 1.0 / 16.020, 0.0);

            int[][] result = ColorDodgeBlendOptimized(imageInvert, source);

            source      = null;
            imageInvert = null;
            GC.Collect();

            return(result);
        }