showFace: Displays Image

Description Usage Arguments Examples

Description

This function uses PCA to compute the eigenfaces and recognizes the data.

Usage

1
showFace(x, all = TRUE, method = "raster", ...)

Arguments

x

a data frame consisting the suitability scores of a given characteristics (terrain, soil, water and temperature) for a given crop (e.g. coconut, cassava, etc.);

method

the method for computing the overall suitability, which includes the "minimum", "maximum", "sum", "product", "average", "exponential" and "gamma". If NULL, "minimum" is used.

interval

if NULL, the interval used are the following: 0-25 suitable, N), 25 75 the values of the end points of the intervals.

output

the output to be returned, either the scores or class. If NULL, both are returned.

Examples

1
2
3
4
5
6
7
8
9
library(fr)

rawData <- list()
for (i in 1:101) {
  rawData[[i]] <- melt(t(readImage(paste("~/Documents/Data/faces94/", i, ".jpg", sep = ""))[,,1]))[-c(1,2)]
}

face_mat <- matrix(unlist(rawData), ncol = 101)
recognize("~/Documents/Data/faces94/42.jpg", face_mat)

alstat/face documentation built on May 11, 2019, 11:29 p.m.