discretizeImage Scales the grey values of an image into a specified number of values.
A numeric 2D matrix.
an integer value, the number of grey levels the image should be quantized into.
Logical, a message is given when the user supplies more grey values than exist in the image. Setting this value to FALSE will suppress this message.
This function is called in
If n_grey is greater than the number of unique grey levels in the matrix then no action is taken.
A matrix of the same dimensions as the input matrix. The entries of the matrix will be set to begin at 1, and go up to the specified value. There is no guarantee that each gray level between 1 and n_grey will have pixels of that value (for example, although n_grey = 32 may be specified, certain images may contain fewer than 32 grey levels).
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.