创建“视觉噪声矩阵”在数学中

发布于 2024-12-22 05:04:55 字数 205 浏览 2 评论 0原文

为了避免出现刺激后出现“视网膜暂留”,我需要创建一个视觉噪声掩模。

在此处输入图像描述

这适用于尺寸为(以像素为单位)的屏幕:1280 * 960

我相信我可以随机(统一)将灰色阴影分配给像素,但我的尝试仍然失败。

感谢您的关注。

In order to avoid "retinal persistence" after the presentation of a stimuli, I need to create a visual noise mask.

enter image description here

This for a screen that has a dimension, in pixel of : 1280 * 960

I believe I could randomly (uniform) assign gray shade to pixels but my attempts yet failed.

Thank you for your attention.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

梦初启 2024-12-29 05:04:56

其他人已经向您展示了创建随机图像的方法。如果您将应用程序设计为使用全屏(或基于当前屏幕的尺寸),您可能会发现不对值进行硬编码而是以编程方式捕获屏幕尺寸很方便。下面的示例展示了如何操作:

screenSize = Last /@ ("FullScreenArea" /. 
   Flatten@SystemInformation["Devices", "ScreenInformation"]);
RandomImage[1, screenSize]

Others have already shown you ways of creating a random image. In case you were designing your application to use up the full screen (or based on the current screen's dimensions), you might find it convenient to not hard code the values, but to capture the screen size programmatically. Here's an example showing how:

screenSize = Last /@ ("FullScreenArea" /. 
   Flatten@SystemInformation["Devices", "ScreenInformation"]);
RandomImage[1, screenSize]
短暂陪伴 2024-12-29 05:04:55

刚刚注意到:

RandomImage[1, {1280, 960}]

Mathematica 8 中的新功能,显然......

Just noticed:

RandomImage[1, {1280, 960}]

New in Mathematica 8, apparently...

满栀 2024-12-29 05:04:55

该死,终于有一个关于 Stack Overflow 的问题我本可以回答,但我太晚了……:)

哦,好吧,这是一个替代解决方案……

ImageEffect[Image[Table[{0.5, 0.5, 0.5}, {i, 1, 960}, {j, 1, 1280}] ], "GaussianNoise"]

noisy

可能颜色太多?

ImageEffect 也适用于灰度图像。

ImageEffect[Image[Table[0.5, {400}, {600}]], "GaussianNoise"]

Mathematica 图形

Damn, at last a question on Stack Overflow I could have answered and I was too late... :)

Oh well, here's an alternative solution...

ImageEffect[Image[Table[{0.5, 0.5, 0.5}, {i, 1, 960}, {j, 1, 1280}] ], "GaussianNoise"]

noisy

Probably got too many colours in it?

ImageEffect also works on greyscale images.

ImageEffect[Image[Table[0.5, {400}, {600}]], "GaussianNoise"]

Mathematica graphics

梦明 2024-12-29 05:04:55

您是否尝试查看帮助文档? Image 的第一个示例应该已经完成​​了。

Image@RandomReal[1, {960, 1280}]

您可以指定不同的值范围:

Image@RandomReal[{0.4, 1}, {400, 600}]

Mathematicagraphics

Did you try looking in the help docs? One of the first examples for Image should have done it.

Image@RandomReal[1, {960, 1280}]

You can specify a different range of values:

Image@RandomReal[{0.4, 1}, {400, 600}]

Mathematica graphics

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文