本文整理匯總了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);
}