Description Usage Arguments Details Value Examples
View source: R/ImageQuantize.R
discretizeImage
Scales the grey values of an image into a specified number of values.
1 | discretizeImage(data, n_grey = 32, verbose = TRUE)
|
data |
A numeric 2D matrix. |
n_grey |
an integer value, the number of grey levels the image should be quantized into. |
verbose |
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 glcm
, glrlm
, glszm
, and mglszm
.
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 | image(psf)
image(discretizeImage(psf, n_grey=5, verbose=F))
image(tumor)
image(discretizeImage(tumor, n_grey=8, verbose=F))
|
radiomics: Functions for texture analysis of greyscale images.
Enter ?calc_features to see available texture features.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.