| tiger | R Documentation |
A grayscale tiger photograph for examining how low-rank approximation changes image detail. The image is stored as a matrix, so a factorization and its reconstruction can be compared directly with the original pixels. Intensities have been divided by 255 to lie between zero and one.
data("tiger")
A numeric matrix with 1600 rows and 1200 columns. There are no labels or color channels; each entry is a grayscale intensity.
The stored orientation is suitable for image as
shown below. Matrix rows and columns correspond to the horizontal and
vertical axes used by that function, respectively. For a decomposition,
use tiger directly and reconstruct the matrix in the same orientation.
The photograph is not exactly low rank. A low-rank factorization retains
part of its structure, and increasing the approximation rank preserves
more texture and fine detail. Storing only the factors can require much
less space than storing all pixels. See rsvd,
rid and rcur for decomposition examples.
Wikimedia image and attribution
S. Taheri (2006), edited by Fir0002. Panthera tigris altaica. Online photograph, distributed under Creative Commons Attribution-ShareAlike 2.5. The package supplies a grayscale conversion.
data("tiger")
dim(tiger)
range(tiger)
image(seq_len(nrow(tiger)), seq_len(ncol(tiger)), tiger,
col = gray((0:255) / 255), asp = 1,
axes = FALSE, useRaster = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.