def __call__(self): if self.data.pixel_type == GREYSCALE: return self.image_copy() return _image_conversion.to_greyscale(self)
def __call__(self, storage_format=DENSE): if self.data.pixel_type == ONEBIT: return self.image_copy() if self.data.pixel_type != GREYSCALE: self = _image_conversion.to_greyscale(self) return self.otsu_threshold(storage_format)