示例#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)
示例#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)
示例#3
0
 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_y(self, kernel, border_treatment)
示例#4
0
 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_y(self, kernel, border_treatment)