Learn R Programming

ripa (version 2.0-2)

imageType: Get information on color type of imagematrix

Description

This function returns color type ("rgb" or "grey") of a given imagematrix.

Usage

imageType(x)

Arguments

x
target image

Value

"rgb" or "grey"

Examples

Run this code
## Not run: 
#   x <- read.jpeg(system.file("extdata", "Rlogo.jpg", package="ripa"))
#   cat("Image Type", imageType(x))
# 
#   x.grey <- rgb2grey(x)
#   cat("Image Type", imageType(x.grey))
# ## End(Not run)

Run the code above in your browser using DataLab