Description Usage Arguments Details Value Examples
A function that calculates the entropy of the image based on its histogram.
1 | imageEntropy(histogram)
|
histogram |
A histogram of the image pixel values, as calculated by the
|
The entropy of an image is a useful indicator of how visually complex the image is.
A value representing the entropy of the image.
1 2 3 4 5 6 7 | 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])
histogram<-hist(imageToIntensity(img), breaks=0:255/255, plot=FALSE)
entropy<-imageEntropy(histogram)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.