code: def read_video(data_path):
      raw_img_sequences = []
      files = []
      frame_index = 0
  
      cap = cv2.VideoCapture(data_path)
      while cap.isOpened():
          ret, frame = cap.read()
          # if frame is read correctly ret is True
          if not ret:
              print("Can't receive frame (stream end?). Exiting ...")
              break
  
          img = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
          img = pil.fromarray(img)
          raw_img_sequences.append(img)
  
          f_str = "{:010d}.png".format(frame_index)
          files.append(f_str)
          frame_index += 1
          if cv2.waitKey(1) == ord("q"):
              break
      cap.release()
      cv2.destroyAllWindows()
  
      original_width, original_height = raw_img_sequences[0].size
  
      return raw_img_sequences, files, original_width, original_height
  
file_path: gluon-cv/scripts/depth/demo.py
imports: import os
  import argparse
  import time
  import PIL.Image
  import numpy
  import mxnet
  from mxnet.gluon.data.vision import transforms
  import gluoncv
  from gluoncv.model_zoo.monodepthv2.layers import disp_to_depth
  import matplotlib
  import matplotlib.cm
  import cv2
label_desc: Use image node_id 3 for calling a global function with example usage: read_video(data_path) and returns: raw_img_sequences,  files,  original_width,  original_height