realsense_scan_profiles

Intel RealSense scan profile utilities.

robotblockset.cameras.realsense_scan_profiles.calculate_fov(width: int, height: int, fx: float, fy: float) Tuple[float, float][source]

Compute horizontal and vertical field-of-view angles in degrees.

Parameters:
  • width (int) – Image width in pixels.

  • height (int) – Image height in pixels.

  • fx (float) – Focal length in x direction (pixels).

  • fy (float) – Focal length in y direction (pixels).

Returns:

Horizontal and vertical FoV in degrees.

Return type:

tuple[float, float]

robotblockset.cameras.realsense_scan_profiles.scan_profiles(stream_profiles: List[pyrealsense2.stream_profile]) Tuple[Dict[Tuple[int, int], List[float]], Dict[Tuple[int, int], Tuple[float, float]]][source]

Scan stream profiles and collect supported resolution/FPS/FoV values.

Parameters:

stream_profiles (List[rs.stream_profile]) – RealSense stream profiles to inspect.

Returns:

Two mappings: supported FPS values per resolution and FoV per resolution.

Return type:

tuple[dict[tuple[int, int], list[float]], dict[tuple[int, int], tuple[float, float]]]

robotblockset.cameras.realsense_scan_profiles.print_profile_info(resolution_fps_combinations: Dict[Tuple[int, int], List[float]], resolution_fov_combinations: Dict[Tuple[int, int], Tuple[float, float]]) None[source]

Print available frame rates and FoV grouped by resolution.

Parameters:
  • resolution_fps_combinations (Dict[Tuple[int, int], List[float]]) – Supported FPS values per resolution.

  • resolution_fov_combinations (Dict[Tuple[int, int], Tuple[float, float]]) – Horizontal and vertical FoV per resolution.

Return type:

None

Functions

calculate_fov(width, height, fx, fy)

Compute horizontal and vertical field-of-view angles in degrees.

print_profile_info(...)

Print available frame rates and FoV grouped by resolution.

scan_profiles(stream_profiles)

Scan stream profiles and collect supported resolution/FPS/FoV values.