RGBtoLab: RGBtoLab

Description Usage Arguments Value Note Author(s) Examples

View source: R/RGBtoLab.R

Description

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

Usage

1
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.

Note

In order to save space, images associated to names in imgnames were not provided in this bundle. Caltech-256 should be retrieved first, converted to .ppm (e.g. with imageMagick), and then values in imgnames associated to relevants file paths, before using RGBtoLab.

Author(s)

Pierrick Bruneau

Examples

1
2
3
# 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)

VBmix documentation built on May 30, 2017, 2:34 a.m.

Related to RGBtoLab in VBmix...