Learn R Programming

VBmix (version 0.3.2)

RGBtoLab:

Description

transform a .ppm file into a matrix of (L,a,b) pixel intensities (1 row-element per pixel).

Usage

RGBtoLab(filename, filterWhite = FALSE, addCoords = TRUE)

Arguments

filename
path to a .ppm file. Alternatively, if needed, R file path manipulating routines are documented in document r-lang.pdf, section 7.1)
filterWhite
if TRUE, filter white points from result to return.
addCoords
if TRUE, append 2 normalized (x,y) coordinates for each pixel.

Value

matrix of pixel row-elements.

Examples

Run this code
# image collections are large, thus not provided. 
# The following commented example relates to a member of this image collection.
#temp <- RGBtoLab(imgnames[[2]], filterWhite=TRUE)

Run the code above in your browser using DataLab