image_to_mat | R Documentation |
Given an object image, converts it into a data frame where each row corresponds to the intensity values of each pixel in the image.
image_to_mat(img, parallel = FALSE, workers = NULL, verbose = TRUE)
img |
An image object. |
parallel |
Processes the images asynchronously (in parallel) in separate
R sessions running in the background on the same machine. It may speed up
the processing time when |
workers |
A positive numeric scalar or a function specifying the maximum number of parallel processes that can be active at the same time. |
verbose |
If |
A list containing three matrices (R, G, and B), and a data frame
containing four columns: the name of the image in image
and the R, G, B
values.
Tiago Olivoto tiagoolivoto@gmail.com
library(pliman)
img <- image_pliman("sev_leaf.jpg")
dim(img)
mat <- image_to_mat(img)
dim(mat[[1]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.