Learn R Programming

ripa (version 2.0-1)

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
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))

Run the code above in your browser using DataLab