test_lens_coef {rcaiman} | R Documentation |
Test lens projection functions
Description
Test if a lens projection function will work between the 0-to-1 range.
Usage
test_lens_coef(lens_coef)
Arguments
lens_coef |
Numeric vector. Polynomial coefficients of the lens
projection function. See |
Details
The package tolerate a number very close to 1 but not exactly 1 as long as it
is greater than 1. Therefore, when the test fails at this "Test that
lens projection function does not predict values barely below one", the best
practice is to manually edit the last coefficient. For instance, changing it
from -0.0296 to -0.0295. See testthat::expect_equal()
for further details.
If it fails in "Test that lens projection function works between the 0-to-1 range", collecting data again might be necessary.
Value
Returns invisible(TRUE)
and print "Test passed" if all tests
pass, otherwise throws an error.
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()
,
fisheye_to_pano()
,
lens()
,
zenith_image()
Examples
test_lens_coef(lens("Nikon_FCE9"))
test_lens_coef(2/pi)