ovl.math.3d_math module¶
-
ovl.math.3d_math.
focal_length
(image_width, field_of_view)[source]¶ Calculates the focal length in pixels of the camera for a given an image width and field of view
Parameters: - image_width – width of the image in pixels
- field_of_view –
Returns: calculates the focal length, a float
-
ovl.math.3d_math.
horizon_angle
(point: Union[numpy.ndarray, Tuple[int, int]], field_of_view: float, image_width: int) → float[source]¶ Returns the angle compared to the center of the image for a given field of view image width and point
Parameters: - point – the contour or its center
- field_of_view – the horizontal field of view
- image_width – the image width
Returns: the angle compared to the center of the image , negative left positive right.
-
ovl.math.3d_math.
vertical_angle
(point: Union[numpy.ndarray, Tuple[int, int]], field_of_view: float, image_height: int) → float[source]¶ Returns the angle compared to the center of the image for a given field of view image height and point
Parameters: - point – the x val or center
- field_of_view – the vertical field of view
- image_height – the image height
Returns: the angle compared to the center of the image , negative up positive down.