Description Usage Arguments Details Value Examples
Convert an image to an intensity map.
1 | imageToIntensity(image, method="perceptual")
|
image |
An RGB raster image. |
method |
A string naming the method to use for colour conversion. "mean" - Use the mean of the red, green and blue channels. "perceptual"- Weight the red, green and blue channels perceptually. |
Many algorithms require an intensity map of the image rather than the full-colour version of the image. An intensity map is a greyscale version of the image.
A greyscale image matrix.
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])
intensity<-imageToIntensity(img)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.