read_pfm {picohdr} | R Documentation |
Read PFM image
read_pfm(filename)
filename |
PFM filename or connection object. If filename ends with 'xz', 'bz2' or 'gz' suffix then it will be uncompressed automatically. |
If input PFM file is grayscale, a 2D numeric array is returned. If PFM file represents RGB color values, a 3D numeric array is returned.
Other PFM functions:
write_pfm()
file <- system.file("image/rstats.pfm.bz2", package = "picohdr")
arr <- read_pfm(file)
arr[1:5, 1:5, ]
# Tone-map the image, gamma correct and plot
arr <- tm_reinhard_basic(arr)
arr <- adj_gamma(arr)
plot(arr)