expand_noncircular | R Documentation |
Add NA
margins to a hemispherical photograph to align radiance at the zenith
with the image center. In this context, “zenith” denotes the location in the image
that corresponds to the projection of the vertical direction when the optical
axis is aligned vertically. Intended for non-circular images.
expand_noncircular(caim, z, zenith_colrow)
caim |
terra::SpatRaster. Typically the output of |
z |
terra::SpatRaster generated with |
zenith_colrow |
numeric vector of length two. Raster coordinates of the
zenith (column, row). See |
terra::SpatRaster with the same layers and pixel values as caim
,
but with NA
margins added to center the zenith.
rcaiman
uses terra without geographic semantics: rasters are kept with
unit resolution (cell size = 1) and a standardized extent
ext(0, ncol, 0, nrow)
with CRS EPSG:7589.
## Not run:
# Non-circular fisheye images from a smartphone with an auxiliary Lens
# (also applicable to non-circular fisheye images from DSLR cameras)
path <- system.file("external/APC_0836.jpg", package = "rcaiman")
caim <- read_caim(path)
z <- zenith_image(2132/2, lens("Olloclip"))
a <- azimuth_image(z)
zenith_colrow <- c(1063, 771)/2
caim <- expand_noncircular(caim, z, zenith_colrow)
plot(caim$Blue, col = seq(0, 1, 1/255) %>% grey())
m <- !is.na(caim$Red) & !is.na(z)
plot(m, add = TRUE, alpha = 0.3, legend = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.