calc_diameter {rcaiman}R Documentation

Calculate diameter

Description

Calculate the diameter in pixels of a 180º fisheye image.

Usage

calc_diameter(lens_coef, radius, angle)

Arguments

lens_coef

Numeric vector. Polynomial coefficients of the lens projection function. See calibrate_lens().

radius

Numeric vector. Distance in pixels from the zenith.

angle

Numeric vector. Zenith angle in degrees.

Details

This function helps handle devices with a field of view different than 180º. Given a lens projection function and data points consisting of radii (pixels) and their correspondent zenith angle (\theta), it returns the horizon radius (i.e., the radius for \theta equal to 90º).

When working with non-circular hemispherical photography, this function will help to find the diameter that a circular image would have if the equipment would record the whole hemisphere.

The required data (radius-angle data pairs) can be obtained following the instructions given in the user manual of Hemisfer software. The following is a slightly simpler alternative:

The line selection tool of ImageJ can be used to measure the distance in pixels between points on the image. Draw a line, and use the dropdown menu Analyze>Measure to obtain its length.

For obtaining the projection of a new lens, refer to calibrate_lens().

Value

Numeric vector of length one. Diameter adjusted to a whole number (see zenith_image() for details about that constrain).

See Also

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

Examples

# Nikon D50 and Fisheye Nikkor 10.5mm lens
calc_diameter(lens("Nikkor_10.5mm"), 1202, 54)

[Package rcaiman version 1.2.2 Index]