#!/usr/bin/env python3 import argparse from pathlib import Path import cv2 STATUS_NAMES = { 0: "OK", 1: "ERR_NEED_MORE_IMGS", 2: "ERR_HOMOGRAPHY_EST_FAIL", 3: "ERR_CAMERA_PARAMS_ADJUST_FAIL", } def load_images(paths): images = [] for path in paths: image = cv2.imread(str(path)) if image is None: raise SystemExit(f"cannot_read: {path}") images.append(image) return images