Пример #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
Пример #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
Пример #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
Пример #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
Пример #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)   
Пример #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)
Пример #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']
Пример #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']
Пример #9
0
 def __init__(self, input_image=numpy.ndarray, options=dict):
     Operation.__init__(self, input_image=input_image, options=options)
Пример #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)
Пример #11
0
 def __init__(self, input_image=numpy.ndarray, options=dict):
     Operation.__init__(self, input_image=input_image, options=options)
Пример #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)