Description Usage Arguments Value Examples
This function converts the channels of a raster image to a vector of colorspace library RGB objects. These objects can be processed using colorspace functions and vector processing functions.
1 |
image |
An RGB raster image |
A vector of colorspace RGB objects, one for each pixel in the image. Rows can be extracted from this as ranges within the vector.
1 2 3 4 5 6 | library(CulturalAnalytics)
library(jpeg)
imgdir<-paste(system.file(package = "CulturalAnalytics"), "images", sep = "/")
imgs<-paste(imgdir, dir(path = imgdir, pattern = ".jpg"), sep = "/")
img<-readJPEG(imgs[1])
rgbs<-imageToRgb(img)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.