randn | R Documentation |
randn
replaces the content of an Image
object with normally-distributed random pixel values.
randn(image, mean = 127, sd = 1)
image |
An |
mean |
A vector indicating the mean value (expectation) 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). |
sd |
A vector indicating the standard deviation 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
, randu
rnd <- zeros(100, 100)
randn(rnd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.