當前位置: 首頁>>代碼示例>>C#>>正文


C# Matrix.SetAll方法代碼示例

本文整理匯總了C#中System.Matrix.SetAll方法的典型用法代碼示例。如果您正苦於以下問題:C# Matrix.SetAll方法的具體用法?C# Matrix.SetAll怎麽用?C# Matrix.SetAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Matrix的用法示例。


在下文中一共展示了Matrix.SetAll方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Blur

        public static bool Blur(Bitmap b, int nWeight)
        {
            // Blur the image bu taking the sharp edges of the pixel differences
            Matrix m = new Matrix();
            m.SetAll(1);
            m.Pixel = nWeight;
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = 2;
            m.Factor = nWeight + 12;

            return Filters.Conversion_Matrix(b, m);
        }
開發者ID:cynicandroid,項目名稱:UBImageProcessing,代碼行數:11,代碼來源:Filters.cs

示例2: Smooth

        public static bool Smooth(Bitmap b, int nWeight)
        {
            //Fuction to smoothify the image with all Surrounding pixels averaged to the center pixel
            Matrix m = new Matrix();
            m.SetAll(1);
            m.Pixel = nWeight;
            m.Factor = nWeight + 8;

            return Filters.Conversion_Matrix(b, m);
        }
開發者ID:cynicandroid,項目名稱:UBImageProcessing,代碼行數:10,代碼來源:Filters.cs

示例3: Sharpen

        public static bool Sharpen(Bitmap b, int nWeight)
        {
            //Fuction which changes the image characteristic by amplyfying the pixel weight difference
            //between surrounding pixels

            Matrix m = new Matrix();
            m.SetAll(0);
            m.Pixel = nWeight;
            m.TopMid = m.MidLeft = m.MidRight = m.BottomMid = -2;
            m.Factor = nWeight - 8;

            return Filters.Conversion_Matrix(b, m);
        }
開發者ID:cynicandroid,項目名稱:UBImageProcessing,代碼行數:13,代碼來源:Filters.cs

示例4: MeanRemoval

        public static bool MeanRemoval(Bitmap b, int nWeight)
        {
            //Opposite fuction to Sharping of Image with removal of mean value from all the pixels

            Matrix m = new Matrix();
            m.SetAll(-1);
            m.Pixel = nWeight;
            m.Factor = nWeight - 8;

            return Filters.Conversion_Matrix(b, m);
        }
開發者ID:cynicandroid,項目名稱:UBImageProcessing,代碼行數:11,代碼來源:Filters.cs


注:本文中的System.Matrix.SetAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。