correct_vignetting: Correct vignetting effect

View source: R/correct_vignetting.R

correct_vignettingR Documentation

Correct vignetting effect

Description

Correct vignetting effect

Usage

correct_vignetting(r, z, lens_coef_v)

Arguments

r

SpatRaster. A fish-eye image.

z

SpatRaster built with zenith_image().

lens_coef_v

Numeric vector. Coefficients of a vignetting function (f_v) of the type f_v = 1 + a \cdot \theta + b \cdot \theta^2 + ... + m \cdot \theta^n, where \theta is the zenith angle, a, b, c and m are the coefficients. The maximum polynomial degree supported is fifth. See extract_radiometry() for additional details.

Value

The argument r but with corrected values.

See Also

Other Tool Functions: colorfulness(), defuzzify(), extract_dn(), extract_feature(), extract_rl(), extract_sky_points_simple(), extract_sky_points(), extract_sun_coord(), find_sky_pixels_nonnull(), find_sky_pixels(), masking(), optim_normalize(), percentage_of_clipped_highlights(), read_bin(), read_caim_raw(), read_caim(), write_bin(), write_caim()

Examples

path <- system.file("external/DSCN4500.JPG", package = "rcaiman")
caim <- read_caim(path, c(1250, 1020) - 745, 745 * 2, 745 * 2)
z <- zenith_image(ncol(caim), lens("Nikon_FCE9"))
r <- gbc(caim$Blue)
r
r <- correct_vignetting(r, z, c(0.0638, -0.101))
r

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