View source: R/crosscalibrate_lens.R
crosscalibrate_lens | R Documentation |
Given two photographs taken from the same point (matching entrance pupils and
aligned optical axes), with calibrated and uncalibrated cameras, derives a
polynomial projection for the uncalibrated device. Intended for cases where a
camera calibrated with a method of higher accuracy than calibrate_lens()
is
available, or when there is a main camera to which all other devices should
be adjusted.
Points must be digitized in tandem with ImageJ and saved as CSV files.
See calibrate_lens()
for background and general concepts.
crosscalibrate_lens(
path_to_csv_uncal,
path_to_csv_cal,
zenith_colrow_uncal,
zenith_colrow_cal,
diameter_cal,
lens_coef,
degree = 3
)
path_to_csv_uncal , path_to_csv_cal |
character vectors of length one. Paths to CSV files created with ImageJ’s point selection tool (uncalibrated and calibrated images, respectively). |
zenith_colrow_uncal , zenith_colrow_cal |
numeric vectors of length two.
Raster coordinates of the zenith for the uncalibrated and calibrated
images; see |
diameter_cal |
numeric vector of length one. Image diameter (pixels) of the calibrated camera. |
lens_coef |
numeric vector. Lens projection coefficients of the calibrated camera. |
degree |
numeric vector of length one. Polynomial degree for the uncalibrated model fit (default 3). |
Estimate a lens projection for an uncalibrated camera by referencing a calibrated camera photographed from the exact same location.
List with components:
ds
data.frame
with zenith angle (theta
, radians) and pixel radius
(px
) from the uncalibrated camera.
model
lm
object: polynomial fit of px
~ theta
.
horizon_radius
numeric vector of length one. Pixel radius at 90 deg.
lens_coef
numeric vector. Distortion coefficients normalized by
horizon_radius
.
calibrate_lens()
, calc_zenith_colrow()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.