calc_AFOV: Calculates the Angular Field of View

View source: R/calc_AFOV.R

calc_AFOVR Documentation

Calculates the Angular Field of View

Description

Calculates the angular field of view (in degrees) based on camera and lens properties. Can calculate horizontal, vertical, and diagonal angular field of view in either air or seawater. If d is unknown, it can be approximated by pix and pixel_size. If d is known, either aspect_ratio or pix can be used.

Usage

calc_AFOV(
  d = NULL,
  f = NULL,
  medium,
  type,
  pix = NULL,
  aspect_ratio = NULL,
  pixel_size,
  n_air = 1.000277,
  n_sea = 4/3
)

Arguments

d

length of diagonal of camera sensor (must be same units as f)

f

focal length of lens (must be same units as d or pixel size)

medium

"air" or "seawater"

type

Type of field of view. Either "horiz", "vert", or "diag" (diag does not need pix or aspect ratio)

pix

width and height of frame in number of pixels c(width, height)

aspect_ratio

aspect ratio e.g. c(16,9)

pixel_size

pixel size of camera sensor (must be same units as f)

n_air

index of refraction for air (default = 1.000277)

n_sea

index of refraction for seawater (default = 4/3)


ailich/mytools documentation built on Jan. 7, 2023, 11:16 a.m.