def parse(self): args = sys.argv for i in range(len(args)): if args[i] == "-h": self.help() elif args[i] == "-t": camera = Camera() checkboard = (6, 9) winSize = (5, 5) print(args) camera.Calibration(args[i + 1], checkboard, winSize) camera.save() elif args[i] == "-i": if not args[i + 1]: raise Exception( "need path after -i type -h for more information") camera = Camera() camera.load() img = cv2.imread(args[i + 1]) camera.imgCamToWorld(img)