def __init__(self, filename, gray=True, invert=True): BaseFrames.__init__(self, filename, gray, invert) self.shape = (int(self.capture.get(cv2.cv.CV_CAP_PROP_FRAME_WIDTH)), int(self.capture.get(cv2.cv.CV_CAP_PROP_FRAME_HEIGHT))) self.count = int(self.capture.get(cv2.cv.CV_CAP_PROP_FRAME_COUNT))
def __init__(self, filename, gray=True, invert=True): BaseFrames.__init__(self, filename, gray, invert) dummy_instance = self._open(filename) self.count = dummy_instance._count self.shape = dummy_instance._shape
def __init__(self, directory, gray=True, invert=True): BaseFrames.__init__(self, directory, gray, invert) dummy_instance = self._open(directory) self.count = len(dummy_instance.files) self.shape = imread(dummy_instance.files[0]).shape