private void btnProcess_Click(object sender, RoutedEventArgs e)
        {
            double[,] matrix = new double[3, 3];

            matrix[0, 0] = double.Parse(txt00.Text, CultureInfo.InvariantCulture);
            matrix[0, 1] = double.Parse(txt01.Text, CultureInfo.InvariantCulture);
            matrix[0, 2] = double.Parse(txt02.Text, CultureInfo.InvariantCulture);
            matrix[1, 0] = double.Parse(txt10.Text, CultureInfo.InvariantCulture);
            matrix[1, 1] = double.Parse(txt11.Text, CultureInfo.InvariantCulture);
            matrix[1, 2] = double.Parse(txt12.Text, CultureInfo.InvariantCulture);
            matrix[2, 0] = double.Parse(txt20.Text, CultureInfo.InvariantCulture);
            matrix[2, 1] = double.Parse(txt21.Text, CultureInfo.InvariantCulture);
            matrix[2, 2] = double.Parse(txt22.Text, CultureInfo.InvariantCulture);

            GenericFilter sharpen = new GenericFilter();
            sharpen.FilterName = "Sharpen";
            sharpen.FilterMatrix = matrix;
            //sharpen.FilterMatrix = new double[,] {{ 0.0,  0.2, 0.0 },
            //                                      { 0.2,  0.2, 0.2 },
            //                                      { 0.0,  0.2, 0.2 }};

            resultImage = previewImage.ConvolutionFilter(sharpen);

            image.Source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(resultImage.GetHbitmap(), IntPtr.Zero, Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions());

            previewImage = resultImage;
        }