FSP.image_ef: Projection of an 'image_ef' object onto a set of orthogonal...

Description Usage Arguments Value Examples

View source: R/FeatureSpaceProjection.R

Description

The projection of the vector onto the linear span of the eigenfaces is computed by projecting an 'image_ef' onto every single vector of the set of eigenfaces. A given average face is substracted before the projection and added onto the projection afterwards.

Usage

1
2
## S3 method for class 'image_ef'
FSP(obj, eigenfaces, avgFace, showCoefficients = FALSE, ...)

Arguments

obj

an object of class 'image_ef'

eigenfaces

an object of class 'imageset_ef', eigenfaces of an 'imageset_ef' object td

avgFace

an object of class 'image_ef', average face of td

showCoefficients

(optional) logical vector of length 1 (TRUE or FALSE)

...

additional arguments

Value

case showCoefficients=FALSE: a list of length 1 containing an object of class 'image_ef', projection of img onto the linear span of eigenfaces case showCoefficients=TRUE: a list of length 2 additionally containing a numeric vector where the coefficients for the representation with the eigenfaces are saved

Examples

1
2
3
4
5
6
7
# Import Olivetti-faces
olivetti <- system.file("extdata","olivetti_X.csv",package="eigenfaces")
td <- load_imageset_ef(olivetti, c(64,64))
img <- td[[42]]
eigenfaces <- get_eigenfaces(td, nfaces = 50, quick=TRUE)
avgFace <- avg_face(td)
projection <- FSP(img, eigenfaces, avgFace, showCoefficients=FALSE)[[1]]

Osburg/eigenfaces documentation built on Aug. 26, 2020, 4:41 p.m.