fisheye_to_equidistant: Fisheye to equidistant

View source: R/fisheye_to_equidistant.R

fisheye_to_equidistantR Documentation

Fisheye to equidistant

Description

Fisheye to equidistant projection (also known as polar projection).

Usage

fisheye_to_equidistant(r, z, a, radius = 745)

reproject_to_equidistant(r, z, a, radius = 745)

Arguments

r

SpatRaster.

z

SpatRaster built with zenith_image.

a

SpatRaster built with azimuth_image.

radius

Numeric integer of length one. Radius of the reprojected hemispherical image (i.e., the output).

Details

There is no interpolation, so NA values may be generated depending on both the radius argument and how much the lens projection differs from the polar one. As a rule of thumb, increase radius as long as it does not produce NA values on the regions to be analyzed.

See Also

Other Lens Functions: azimuth_image(), calc_diameter(), calc_zenith_raster_coord(), calibrate_lens(), expand_noncircular(), fisheye_to_pano(), lens(), test_lens_coef(), zenith_image()

Examples

## Not run: 
caim <- read_caim()
caim <- normalize(caim, 0, 255)
z <- zenith_image(ncol(caim), lens("Nikon_FCE9"))
a <- azimuth_image(z)
bin <- apply_thr(caim$Blue, 0.5)
bin_equi <- fisheye_to_equidistant(bin, z, a, radius = 400)
bin_equi <- apply_thr(bin_equi, 0.5)
plot(bin)
plot(bin_equi)
# use write_bin(bin, "path/file_name") to have a file ready
# for calculating LAI with CIMES, GLA, CAN-EYE, etc.

## End(Not run)

rcaiman documentation built on Sept. 20, 2022, 1:05 a.m.