import math


def _get_fov(pillow_image) -> float:
    """Get the horizontal FOV of an image in radians."""
    exif_data = pillow_image.getexif()
    # 41989 is for 'FocalLengthIn35mmFilm'.
    focal_length = exif_data[41989]

    # FOV calculation, note 36 is the horizontal frame size for 35mm
    # film.
    return 2 * math.atan2(36, 2 * focal_length)