I have to input few parameters via command line. such as tileGridSize, clipLimit etc via command line. This is what my code looks like;
#!/usr/bin/env python
import numpy as np
import cv2 as cv
import sys #import Sys.
import matplotlib.pyplot as plt
img = cv.imread(sys.argv[1], 0) # reads image as grayscale
clipLimit = float(sys.argv[2])
tileGridSize = tuple(sys.argv[3])
clahe = cv.createCLAHE(clipLimit, tileGridSize)
cl1 = clahe.apply(img)
# show image
cv.imshow('image',cl1)
cv.waitKey(0)
cv.destroyAllWindows()
if I pass the arguments like,below (I want to give (8, 8) tuple);
python testing.py picture.jpg 3.0 8 8
I get the following error. I understand the error but dont know how to fix it.
TypeError: function takes exactly 2 arguments (1 given)