from pathlib import Path import cv2 as cv input_path = Path("input/scene.png") output_path = Path("output/edges.png") gray = cv.imread(str(input_path), cv.IMREAD_GRAYSCALE) if gray is None: raise SystemExit(f"could not read image: {input_path}")