RandomImage

RandomImage[max]

gives an image with pseudorandom pixel values in the range 0 to max.

RandomImage[{min,max}]

generates pseudorandom pixel values in the range min to max.

RandomImage[dist]

generates pixel values using a symbolic distribution dist.

RandomImage[,size]

generates a random image of the specified size.

Details and Options

  • RandomImage gives an image where pixel values are drawn from a specified distribution. The pixel values are not correlated spatially.
  • Random images can be used for creating synthetic noise images and image effects.
  • RandomImage by default gives an image of a real type.
  • RandomImage[] is equivalent to RandomImage[1,{150,150}].
  • RandomImage[] is equivalent to RandomImage[,{150,150}].
  • The size specification can be one of the following:
  • side2D image of size {side,side}
    {width,height}2D image size specification
    {width,depth,height}3D image size specification
  • The following options are supported:
  • ColorSpaceAutomaticcolor space of the output image
    ImageSizeAutomaticdisplay image size
    MagnificationAutomatichow to magnify the displayed image

Examples

open allclose all

Basic Examples  (3)

Generate a random image:

In[1]:=
Click for copyable input
Out[1]=

Generate a random RGB image:

In[1]:=
Click for copyable input
Out[1]=

Generate a random 3D image:

In[1]:=
Click for copyable input
Out[1]=

Scope  (7)

Options  (5)

Applications  (4)

Properties & Relations  (5)

Possible Issues  (1)

Neat Examples  (1)

See Also

RandomVariate  ImageEffect  RandomReal  RandomColor  ConstantImage  Image

Introduced in 2010
(8.0)
| Updated in 2017
(11.1)