frey_faces | R Documentation |
Converts Frey Faces Image dataset.
frey_faces()
A data frame with 1965 rows and 561 variables.
Returns the Frey Faces dataset in a data frame where each row is one image. This is a series of 1965 images (with dimension 20 x 28) of Brendan Frey's face taken from sequential frames of a video.
The variables are as follows:
px1
, px2
, px3
... px560
8-bit grayscale
pixel values (0-255). The pixel index starts at the top right of the image
(px1
) and are then stored row-wise.
color
A string representing a color in hex format. It can be
used directly with e.g. the col
parameter in the
plot
function. The color goes from hsl(0, 50, 50)
(red) at frame 1 to hsl(300, 50, 50) (purple) at frame 1965 and on a muted
rainbow scale.
The Frey Faces dataset as a dataframe.
Requires the RnavGraphImageData package to be installed and loaded.
Sam Roweis' dataset web page: http://www.cs.nyu.edu/~roweis/data.html.
Each row can be visualized as an image using show_frey_face
.
## Not run:
frey <- frey_faces()
# PCA Scores plot, with color indicating the frame index
frey_pca <- prcomp(frey[, -561], retx = TRUE, rank. = 2)
plot(frey_pca$x, col = frey$color, pch = 16, cex = 0.75)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.