code: def read_intrinsics_text(path):
      """
      Taken from https://github.com/colmap/colmap/blob/dev/scripts/python/read_write_model.py
      """
      cameras = {}
      with open(path, "r") as fid:
          while True:
              line = fid.readline()
              if not line:
                  break
              line = line.strip()
              if len(line) > 0 and line[0] != "#":
                  elems = line.split()
                  camera_id = int(elems[0])
                  model = elems[1]
                  assert (
                      model == "PINHOLE"
                  ), "While the loader support other types, the rest of the code assumes PINHOLE"
                  width = int(elems[2])
                  height = int(elems[3])
                  params = np.array(tuple(map(float, elems[4:])))
                  cameras[camera_id] = Camera(
                      id=camera_id,
                      model=model,
                      width=width,
                      height=height,
                      params=params,
                  )
      return cameras
  
file_path: gaussian-splatting/scene/colmap_loader.py
imports: import numpy
  import collections
  import struct
label_desc: Use image node_id 6 for calling a global function with example usage: read_intrinsics_text(path) and returns: cameras