Sep-30-2019, 01:21 PM
Your parameter list for the extractFrames function is just two string literals. Parameters have to be valid Python tokens, not literal values. You can assign literal values to those tokens as default values for the parameters, so you could do something like this:
def extractFrames(input = 'args.input', output = 'args.output'): #directory path, where my video images will be stored #Capture vidoe from video file cap = cv2.VideoCapture(args["input"])However, looking at the code, I think what you really want is this:
def extractFrames(args): #directory path, where my video images will be stored #Capture vidoe from video file return cv2.VideoCapture(args["input"]) cap = extractFrames(args)You might want to check out the function tutorial for details on parameters and return values.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures