Ejemplo n.º 1
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.skeletonInPort = self.createInputPort('skeleton', 'buffered')
        self.skeletonOutPort = self.createOutputPort('skeleton', 'buffered')
        return True
Ejemplo n.º 2
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.skeletonInPort  = self.createInputPort('skeleton',  'buffered')
        self.skeletonOutPort = self.createOutputPort('skeleton', 'buffered')
        return True
Ejemplo n.º 3
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.facesPort     = self.createOutputPort('faces')
        self.skeletonPort  = self.createOutputPort('skeleton')

        self.imgInPort     = self.createInputPort('img')
        self.imgOutPort    = self.createOutputPort('img')

        self.bufImageIn,  self.bufArrayIn  = self.createImageBuffer(640, 480, 3)
        self.bufImageOut, self.bufArrayOut = self.createImageBuffer(640, 480, 3)

        return True
Ejemplo n.º 4
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.facesPort = self.createOutputPort('faces')
        self.skeletonPort = self.createOutputPort('skeleton')

        self.imgInPort = self.createInputPort('img')
        self.imgOutPort = self.createOutputPort('img')

        self.bufImageIn, self.bufArrayIn = self.createImageBuffer(640, 480, 3)
        self.bufImageOut, self.bufArrayOut = self.createImageBuffer(
            640, 480, 3)

        return True
Ejemplo n.º 5
0
    def __init__(self, args):
        BaseModule.__init__(self, args)
        self.memory_length = args.memory
        self.translation = args.translation
        self.translation_db = {}

        if self.translation:

            # check that we got a file
            if not op.isfile(self.translation):
                raise ValueError, 'Path [%s] does not point to a file.' % self.translation

            # read translation database
            with open(self.translation, 'r') as _file:
                for line in _file.read().split('\n'):
                    mid, word = line.split()
                    self.translation_db[int(mid)] = word
Ejemplo n.º 6
0
    def __init__(self, args):
        BaseModule.__init__(self, args)
        self.memory_length = args.memory
        self.translation = args.translation
        self.translation_db = {}

        if self.translation:

            # check that we got a file
            if not op.isfile(self.translation):
                raise ValueError, "Path [%s] does not point to a file." % self.translation

            # read translation database
            with open(self.translation, "r") as _file:
                for line in _file.read().split("\n"):
                    mid, word = line.split()
                    self.translation_db[int(mid)] = word
Ejemplo n.º 7
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.markersPort = self.createOutputPort("markers")
        self.orderPort = self.createOutputPort("order")
        self.translationPort = self.createOutputPort("translation")

        self.imgInPort = self.createInputPort("img")
        self.imgOutPort = self.createOutputPort("img")

        self.bufImageIn, self.bufArrayIn = self.createImageBuffer(640, 480, 3)
        self.bufImageOut, self.bufArrayOut = self.createImageBuffer(640, 480, 3)

        self.order = HCMarker.O_HORIZONTAL
        self.orderIsReversed = False

        self.memory = {}

        return True
Ejemplo n.º 8
0
    def configure(self, rf):

        BaseModule.configure(self, rf)

        self.markersPort = self.createOutputPort('markers')
        self.orderPort = self.createOutputPort('order')
        self.translationPort = self.createOutputPort('translation')

        self.imgInPort = self.createInputPort('img')
        self.imgOutPort = self.createOutputPort('img')

        self.bufImageIn, self.bufArrayIn = self.createImageBuffer(640, 480, 3)
        self.bufImageOut, self.bufArrayOut = self.createImageBuffer(
            640, 480, 3)

        self.order = HCMarker.O_HORIZONTAL
        self.orderIsReversed = False

        self.memory = {}

        return True