Segmentation.py 865 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
"""
  Nome: Segmentation.py
  Autor: Alessandro dos Santos Ferreira ( santosferreira.alessandro@gmail.com )

  Descricão: Classe abstrata para os modulos de segmentacao.
"""
from abc import ABCMeta, abstractmethod

class Segmentation(object):
    
    __metaclass__ = ABCMeta
    
    def get_name(self):
        return self.__class__.__name__
    
    @abstractmethod
    def get_config(self):
        pass
    
    @abstractmethod
    def set_config(self, configs):
        pass
    
    @abstractmethod
    def get_summary_config(self):
        pass
    
31 32 33 34 35 36 37 38
    @abstractmethod
    def get_segment(self, px, py, idx_segment):
        pass
    
    @abstractmethod
    def paint_segment(self, image, color, px, py, idx_segment, border, clear):
        pass
    
39 40 41
    @abstractmethod
    def run(self, image):
        pass