def __call__(self, kernel_x, kernel_y=None, border_treatment=1): from gamera.gameracore import FLOAT if kernel_y is None: kernel_y = kernel_x if kernel_y == kernel_x: if type(kernel_y) == list: kernel_x = kernel_y = image_utilities.nested_list_to_image(kernel_y, FLOAT) else: if type(kernel_y) == list: kernel_y = image_utilities.nested_list_to_image(kernel_y, FLOAT) if type(kernel_x) == list: kernel_x = image_utilities.nested_list_to_image(kernel_x, FLOAT) result = _convolution.convolve_x(self, kernel_x, border_treatment) return _convolution.convolve_y(result, kernel_y, border_treatment)
def __call__(self, kernel_x, kernel_y=None, border_treatment=1): from gamera.gameracore import FLOAT if kernel_y is None: kernel_y = kernel_x if kernel_y == kernel_x: if kernel_y is list: kernel_x = kernel_y = image_utilities.nested_list_to_image( kernel_y, FLOAT) else: if kernel_y is list: kernel_y = image_utilities.nested_list_to_image( kernel_y, FLOAT) if kernel_x is list: kernel_x = image_utilities.nested_list_to_image( kernel_x, FLOAT) result = _convolution.convolve_x(self, kernel_x, border_treatment) return _convolution.convolve_y(result, kernel_y, border_treatment)
def __call__(self, kernel, border_treatment=1): from gamera.gameracore import FLOAT if type(kernel) == list: kernel = image_utilities.nested_list_to_image(kernel, FLOAT) return _convolution.convolve_x(self, kernel, border_treatment)
def __call__(self, kernel, border_treatment=1): from gamera.gameracore import FLOAT if kernel is list: kernel = image_utilities.nested_list_to_image(kernel, FLOAT) return _convolution.convolve_x(self, kernel, border_treatment)