本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}