public static MatrixData GetEmbossEdge(this MatrixData input)
        {
            MatrixData d      = input.ApplyConvolutionFilter(embossfilter);
            MatrixData d1     = input.ApplyConvolutionFilter(embossfilter1);
            MatrixData d2     = input.ApplyConvolutionFilter(embossfilter2);
            MatrixData d3     = input.ApplyConvolutionFilter(embossfilter3);
            MatrixData output = d.SubtractIfLessThanMode(d1).SubtractIfLessThanMode(d2).SubtractIfLessThanMode(d3);

            return(output);
        }
        public static MatrixData GetSobelEdge(this MatrixData input)
        {
            MatrixData output    = new MatrixData(input.NumberOfRows, input.NumberOfColumns);
            MatrixData sobelXimg = input.ApplyConvolutionFilter(sobelX);
            MatrixData sobelYimg = input.ApplyConvolutionFilter(sobelY);

            for (int r = 0; r < input.NumberOfRows; r++)
            {
                for (int c = 0; c < input.NumberOfColumns; c++)
                {
                    output[r, c] = Math.Sqrt(Math.Pow(sobelXimg[r, c], 2) + Math.Pow(sobelYimg[r, c], 2));
                    if (output[r, c] > 255)
                    {
                        output[r, c] = 255;
                    }
                }
            }
            return(output);
        }