crosscalibrate_lens: Cross-calibrate lens

View source: R/crosscalibrate_lens.R

crosscalibrate_lensR Documentation

Cross-calibrate lens

Description

Cross-calibrate lens

Usage

crosscalibrate_lens(
  path_to_csv_uncal,
  path_to_csv_cal,
  zenith_colrow_uncal,
  zenith_colrow_cal,
  diameter_cal,
  lens_coef,
  degree = 3
)

Arguments

path_to_csv_uncal, path_to_csv_cal

Character vector of length one. Path to a CSV file created with the point selection tool of ‘ImageJ’ software (cal and uncal stand for calibrated and uncalibrated, respectively).

zenith_colrow_uncal, zenith_colrow_cal

Numeric vector of length two. Raster coordinates of the zenith. See calc_zenith_colrow() (cal and uncal stand for calibrated and uncalibrated, respectively).

diameter_cal

Numeric vector of length one. Diameter in pixels of the image taken with the calibrated camera.

lens_coef

numeric

degree

Numeric vector of length one. Polynomial model degree.

Details

Read the help page of calibrate_lens() for understanding the theory being this function.

This function is intended to be used when a camera calibrated with a method of higher accuracy than the one proposed in calibrate_lens() is available or there is a main camera to which all other devices should be adjusted.

It requires two photographs taken from the exact same location with the calibrated and uncalibrated camera. This means that the lens entrance pupils should match and the optical axes should be aligned.

Points should be digitized in tandem with ImageJ and saved as CSV files.

Value

An object of class list with named elements. ds is the dataset used to fit the model, model is the fitted model (class lm, see stats::lm()), horizon_radius is the radius at 90º, lens_coef is a numeric vector of length equal to the degree argument containing the polynomial model coefficients for predicting relative radius (coefficients(model)/horizon_radius).

See Also

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


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