code: def read_intrinsics_binary(path_to_model_file):
      """
      see: src/base/reconstruction.cc
          void Reconstruction::WriteCamerasBinary(const std::string& path)
          void Reconstruction::ReadCamerasBinary(const std::string& path)
      """
      cameras = {}
      with open(path_to_model_file, "rb") as fid:
          num_cameras = read_next_bytes(fid, 8, "Q")[0]
          for _ in range(num_cameras):
              camera_properties = read_next_bytes(
                  fid, num_bytes=24, format_char_sequence="iiQQ"
              )
              camera_id = camera_properties[0]
              model_id = camera_properties[1]
              model_name = CAMERA_MODEL_IDS[
                  camera_properties[1]
              ].model_name
              width = camera_properties[2]
              height = camera_properties[3]
              num_params = CAMERA_MODEL_IDS[model_id].num_params
              params = read_next_bytes(
                  fid,
                  num_bytes=8 * num_params,
                  format_char_sequence="d" * num_params,
              )
              cameras[camera_id] = Camera(
                  id=camera_id,
                  model=model_name,
                  width=width,
                  height=height,
                  params=np.array(params),
              )
          assert len(cameras) == num_cameras
      return cameras
  
file_path: gaussian-splatting/scene/colmap_loader.py
imports: import numpy
  import collections
  import struct
label_desc: Use image node_id 8 for calling a global function with example usage: read_intrinsics_binary(path_to_model_file) and returns: cameras