plotIntensityHistogram: Plots a histogram of the intensity of an image's pixels

Description Usage Arguments Value Examples

Description

This function calculates a histogram for the pixel values of an intensity map (a greyscale image) and plots it. It should not be called on a colour image.

Usage

1
plotIntensityHistogram(image, bins = 255, main = "", xlab = "Value", col = grey(0))

Arguments

image

An intensity map. A greyscale image created using imageToIntensity .

bins

The number of bins to use for the histogram.

main

The main title label.

xlab

The X axis label.

col

The R color to use for the histogram.

Value

The histogram (generated by hist() ).

Examples

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])
intensity<-imageToIntensity(img)
plotIntensityHistogram(intensity)

CulturalAnalytics documentation built on May 2, 2019, 5:24 p.m.