randu | R Documentation |
randu
replaces the content of an Image
object with uniformly-distributed random pixel values.
randu(image, low = 0, high = 256)
image |
An |
low |
A vector indicating the inclusive lower boundary of the generated random numbers. It can have as many elements as the number of channels in the image. If it has less elements than the number of channels, it is recycled to match the number of channels. If it has more elements than the number of channels, the extra elements are ignored without warning (default: 0). |
high |
A vector indicating the exclusive upper boundary of the generated random numbers. It can have as many elements as the number of channels in the image. If it has less elements than the number of channels, it is recycled to match the number of channels. If it has more elements than the number of channels, the extra elements are ignored without warning (default: 256). |
This function returns nothing and modifies image in place.
Simon Garnier, garnier@njit.edu
Image
, randn
rnd <- zeros(100, 100)
randu(rnd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.