colorspace: The Color Space of an Image

View source: R/ImageClass.R

colorspaceR Documentation

The Color Space of an Image

Description

This function returns the color space of an Image object, that is the range of colors of an image.

Usage

colorspace(x)

Arguments

x

An Image object.

Value

A character string indicating the color space of the image. For now, it can only be one of the following:

  • BGR: an image with 3 channels, Blue, Green, and Red.

  • BGRA: an image with 3 channels, Blue, Green, Red, and Alpha (transparency).

  • GRAY: a grayscale image (1 channel only).

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image, bitdepth.

Examples

balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
colorspace(balloon)


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.