生成的C#白噪声图像噪声、图像

由网友(来自软萌系の仙女)分享简介:我需要能够产生在C#code白噪声的图像。是否有一个算法,我可以用它来填充白噪声的形象呢? I need to be able to generate a white noise image in C# code. Is there an algorithm I can use to fill the image w...

我需要能够产生在C#code白噪声的图像。是否有一个算法,我可以用它来填充白噪声的形象呢?

I need to be able to generate a white noise image in C# code. Is there an algorithm I can use to fill the image with white noise?

我已经找到了如何做到这一点这里 VB的例子,但我不能将它移植到.NET自己。

I have found the VB example of how to do it here, but I can't port it to .net myself.

推荐答案

应该是沿着这些路线很简单,不是吗?

Should be something very simple along these lines, no?

foreach(var pixel in image)
{
    pixel = rand()>0.5 ? white : black;
}
阅读全文

相关推荐

最新文章