def __init__(self, input_image=numpy.ndarray, options=dict): Operation.__init__(self, input_image=input_image, options=options) if not self.options.has_key("window"): self.options["window"] = (15, 15) if not self.options.has_key("s_x"): self.options["s_x"] = 3 if not self.options.has_key("s_y"): self.options["s_y"] = 3
def __init__(self, input_image, options=dict): # call to superclass Operation.__init__(self, input_image=input_image, options=options) # Check the options variable has the required options and replace if not if not self.options.has_key('top'): self.options['top'] = 255 if not self.options.has_key('bottom'): self.options['bottom'] = 0
def __init__(self, input_image=numpy.ndarray, options=dict): Operation.__init__(self, input_image=input_image, options=options) if not self.options.has_key('window'): self.options['window'] = (15, 15) if not self.options.has_key('s_x'): self.options['s_x'] = 3 if not self.options.has_key('s_y'): self.options['s_y'] = 3
def __init__(self, input_image=numpy.ndarray, options=dict): ''' Sauvola(input_image, options) -> ndarray options: widow (x,y) - window of the kernel k - multiplaction factor for the Sauvola method ''' Operation.__init__(self, input_image=input_image, options=options) self.operation_name = 'GuoHall Thinning Method' # save the image to a know location cv2.imwrite(structure.Base.sample_dir + 'source.png', input_image)
def __init__(self, input_image=numpy.ndarray, options=dict): """ Sauvola(input_image, options) -> ndarray options: widow (x,y) - window of the kernel k - multiplaction factor for the Sauvola method """ Operation.__init__(self, input_image=input_image, options=options) self.operation_name = "GuoHall Thinning Method" # save the image to a know location cv2.imwrite(structure.Base.sample_dir + "source.png", input_image)
def __init__(self, input_image=numpy.ndarray, options=dict): ''' Sauvola(input_image, options) -> ndarray options: widow (x,y) - window of the kernel k - multiplaction factor for the Sauvola method ''' Operation.__init__(self, input_image=input_image, options=options) self.operation_name = 'Sauvola Method' # Check existence of values if not self.options.has_key('window'): options['window'] = (15, 15) if not self.options.has_key('k'): options['k'] = 0.03 # save the image to a know location self.dirname = structure.Base.sample_dir cv2.imwrite(self.dirname + 'source.png', input_image) self.k = options['k']
def __init__(self, input_image=numpy.ndarray, options=dict): Operation.__init__(self, input_image=input_image, options=options)
def __init__(self, input_image=numpy.ndarray, options=dict): Operation.__init__(self, input_image=input_image, options=options) if not self.options.has_key("ksize"): self.options["ksize"] = (15, 15)
def __init__(self, input_image=numpy.ndarray, options=dict): Operation.__init__(self, input_image=input_image, options=options) if not self.options.has_key('ksize'): self.options['ksize'] = (15, 15)