在C#中生成白噪声图像

我需要能够用C#代码生成白噪声图像。 有没有算法可以用白噪声填充图像?

我已经找到了VB如何在这里做的例子,但我不能把它自己移植到.net。

沿着这些方向应该是非常简单的事情,不是吗?

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

白噪声不是黑色或白色(根据定义)。 它还包含灰度。

所以我们已经更接近:

 foreach(var pixel in image) { //do that for all RGB (depending on Image format) pixel = rand() * 255; } 

白噪声