print("> -c: Calibrate the camera") print("> -e: Explore pipeline and plot inner stages") print("> Do not enter flag to run the pipeline") print() def parseCommands(): '''Parse the command line arguments''' command = Commands.NONE if len(sys.argv) > 1: if sys.argv[1] == '-c': command = Commands.CALIBRATE elif sys.argv[1] == '-e': command = Commands.EXPLORE else: help() exit(0) return command if __name__ == '__main__': command = parseCommands() if command == Commands.CALIBRATE: Camera.calibrate() elif command == Commands.EXPLORE: exploratory_pipeline() else: createVideo(video_in, video_out)