Description Usage Arguments Value Examples
Extract an image file ("png", "tiff", "jpeg", "bmp"
) and turn it into an enjoyable data set, pixels being rows (subjects) and columns (variables) being their coordinate positions (x and y axis) and their respective color (in hex codes).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
path |
Path to image file. |
type |
Type of extraction of data. |
scaling |
Scale the data to a standardized form, μ = 0, σ = 1 (default is |
showplot |
Show a preliminary plot of the data (default is |
reduce |
|
A |
Transparency, otherwise known as α. By default, only non transparent ( |
R, G, B |
Color to return with |
Grey |
Grey range to be returned with |
precision |
Set precision of |
seed |
Set seed value for random pixel returned with |
A data frame with pixels as rows and columns are x and y coordinates and g is their color in hex (factors).
1 2 3 4 5 6 7 8 | path <- system.file(file.path("extdata", "success.png"), package = "image2data")
image2data(path = path, type = "line")
image2data(path = path, type = "line", Grey = c(0,.50))
## Not run:
image2data(path = file.choose())
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.