当前位置: 首页>>代码示例>>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;未经允许,请勿转载。