Exemplo n.º 1
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
Exemplo n.º 2
0
 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
Exemplo n.º 3
0
    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
Exemplo n.º 4
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
Exemplo n.º 5
0
 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)   
Exemplo n.º 6
0
    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)
Exemplo n.º 7
0
 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']
Exemplo n.º 8
0
    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']
Exemplo n.º 9
0
 def __init__(self, input_image=numpy.ndarray, options=dict):
     Operation.__init__(self, input_image=input_image, options=options)
Exemplo n.º 10
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("ksize"):
         self.options["ksize"] = (15, 15)
Exemplo n.º 11
0
 def __init__(self, input_image=numpy.ndarray, options=dict):
     Operation.__init__(self, input_image=input_image, options=options)
Exemplo n.º 12
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('ksize'):
         self.options['ksize'] = (15, 15)