code: def read_captures(
      cls,
      images_txt_path,
      cameras_txt_path,
      images_dir,
      tgt_size,
      order="default",
  ):
      captures = []
      cameras = cls.read_cameras(cameras_txt_path)
      images_meta = cls.read_images_meta(images_txt_path, images_dir)
      if order == "default":
          keys = images_meta.keys()
      elif order == "video":
          keys = []
          frames = []
          for k, v in images_meta.items():
              keys.append(k)
              frames.append(os.path.basename(v.image_path))
          keys = [x for _, x in sorted(zip(frames, keys))]
      else:
          raise ValueError(f"unknown order: {order}")
      for i, key in enumerate(keys):
          cur_cam_id = images_meta[key].camera_id
          cur_cam = cameras[cur_cam_id]
          cur_camera_pose = images_meta[key].camera_pose
          cur_image_path = images_meta[key].image_path
          if tgt_size is None:
              cap = captures_module.RGBPinholeCapture(
                  cur_image_path, cur_cam, cur_camera_pose
              )
          else:
              cap = captures_module.ResizedRGBPinholeCapture(
                  cur_image_path, cur_cam, cur_camera_pose, tgt_size
              )
          if order == "video":
              cap.frame_id = {
                  "frame_id": i,
                  "total_frames": len(images_meta),
              }
          captures.append(cap)
      return captures
  
file_path: ml-neuman/data_io/colmap_helper.py
imports: import os
  import re
  from collections import namedtuple
  import numpy
  from tqdm import tqdm
  from geometry.basics import Translation, Rotation
  from cameras.camera_pose import CameraPose
  from cameras.pinhole_camera import PinholeCamera
  from cameras import captures
  from scenes import scene
label_desc: Use image node_id 4 for calling the ColmapAsciiReader obj's underlying member method code with example usage: obj.read_captures(cls, images_txt_path, cameras_txt_path, images_dir, tgt_size, order) and returns: captures