fisheye_to_pano: Fisheye to panoramic

View source: R/fisheye_to_pano.R

fisheye_to_panoR Documentation

Fisheye to panoramic

Description

Fisheye to panoramic (cylindrical projection)

Usage

fisheye_to_pano(r, z, a, fun = mean, angle_width = 1)

Arguments

r

SpatRaster. A fish-eye image.

z

SpatRaster built with zenith_image().

a

SpatRaster built with azimuth_image().

fun

A function that takes a vector as input and returns a one-length numeric or logical vector as output (e.g. mean).

angle_width

Numeric vector of length one. It should be ⁠30, 15, 10, 7.5, 6, 5, 3.75, 3, 2.5, 1.875, 1⁠ or 0.5 degrees. This constrain is rooted in the requirement of a value able to divide both the 0 to 360 and 0 to 90 ranges into a whole number of segments.

Details

An early version of this function was used in \insertCiteDiaz2021;textualrcaiman.

References

\insertAllCited

See Also

Other Lens Functions: azimuth_image(), calc_diameter(), calc_relative_radius(), calc_zenith_colrow(), calibrate_lens(), crosscalibrate_lens(), expand_noncircular(), extract_radiometry(), fisheye_to_equidistant(), lens(), test_lens_coef(), zenith_image()

Examples

## Not run: 
caim <- read_caim()
z <- zenith_image(ncol(caim), lens())
a <- azimuth_image(z)
pano <- fisheye_to_pano(caim, z, a)
plotRGB(pano %>% normalize() %>% multiply_by(255))

## End(Not run)

rcaiman documentation built on Nov. 15, 2023, 1:08 a.m.