estimate_fov_from_vanishing_points#

deltacamera.estimate_fov_from_vanishing_points(vp1, vp2, imshape)[source]#

Estimate camera FOV from two orthogonal vanishing points.

Given two vanishing points corresponding to orthogonal directions in 3D space, estimates the camera’s field of view assuming the principal point is at the image center.

Parameters:
  • vp1 – First vanishing point as (x, y) in pixel coordinates.

  • vp2 – Second vanishing point as (x, y) in pixel coordinates.

  • imshape – Image shape as (height, width) or (height, width, channels).

Returns:

  • ‘f’: Focal length in pixels
    • ’fov_h’: Horizontal field of view in degrees

    • ’fov_v’: Vertical field of view in degrees

    • ’fov_d’: Diagonal field of view in degrees

    • ’K’: 3x3 intrinsic matrix

Returns None if the vanishing points don’t satisfy the orthogonality constraint (i.e., they would imply an imaginary focal length).

Return type:

Dictionary with keys