Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def __call__(self, kernel, border_treatment=3):
     from gamera.gameracore import FLOAT
     if type(kernel) == list:
         kernel = image_utilities.nested_list_to_image(kernel, FLOAT)
     return _convolution.convolve(self, kernel, border_treatment)
Exemplo n.º 4
0
def nested_list_to_image(l, t=-1):
    return image_utilities.nested_list_to_image(l, t)
Exemplo n.º 5
0
Arquivo: core.py Projeto: DDMAL/Gamera
def nested_list_to_image(l, t=-1):
    from gamera.plugins import image_utilities

    return image_utilities.nested_list_to_image(l, t)
Exemplo n.º 6
0
 def __call__(self, kernel, border_treatment=3):
     from gamera.gameracore import FLOAT
     if type(kernel) is list:
         kernel = image_utilities.nested_list_to_image(kernel, FLOAT)
     return _convolution.convolve(self, kernel, border_treatment)
Exemplo n.º 7
0
def nested_list_to_image(l, t=-1):
    return image_utilities.nested_list_to_image(l, t)
Exemplo n.º 8
0
def nested_list_to_image(l, t=-1):
    from gamera.plugins import image_utilities
    return image_utilities.nested_list_to_image(l, t)