I want to create a class that deals with OpenCV images.
For that, I was thinking of passing to class already an image.
img = cv2.imread(path, cv2.IMREAD_GRAYSCALE)
class myClass():
def __init__(self, frame):
self.frame = frame
inst = myClass(img)
But I want to pass my class only the path to the image. How can I do that my class can be able to take all the arguments taht cv2.imread takes?
Something like
inst = myClass(path, cv2.IMREAD_GRAYSCALE)